This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace MSub.Domain.Tests.Subscriptions.for_Subscription | |
{ | |
[TestFixture] | |
public class when_renewing_a_recurring_monthly_subscription : given.a_recurring_monthly_subscription_and_future_renewal_date | |
{ | |
bool raisedSubscriptionRenewedEvent = false; | |
[TestFixtureSetUp] | |
public void because_of() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace MSub.Domain.Tests.Subscriptions.for_Subscription.given | |
{ | |
public class a_recurring_monthly_subscription_and_future_renewal_date | |
{ | |
protected ISubscription Subscription = new SubscriptionFactory().CreateSubscription( | |
SubscriptionType.Recurring, SubscriptionLength.Monthly, "Product-Ref" | |
); | |
protected DateTime RenewalDate = DateTime.Now.AddMonths(2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public IFluentValidationBuilder<T> Then(Action execute, ExecuteThread options = ExecuteThread.Current) | |
{ | |
var conditionsCopy = Conditions.ToList(); | |
Func<T, bool> derived = f => | |
{ | |
if (conditionsCopy.All(c => _expressionBuilder.Invoke(_expressionBuilder.Compile(c.Condition), _fluentValidation.GetTarget()))) | |
{ | |
if (options == ExecuteThread.Current) | |
{ | |
execute(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OrderWorkflow | |
{ | |
readonly IFluentWorkflowBuilder<OrderStatus> _workflow; | |
public OrderWorkflow(OrderStatus orderStatus) | |
{ | |
_workflow = new FluentWorkflowFactory().CreateFor(orderStatus); | |
} | |
public IFluentWorkflowBuilder<OrderStatus> Configure() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
validator | |
.When(f => f.Check(u => u.Age).IsLessThan(18)) | |
.Check(u => u.ParentalConsent).IsEqualTo(true) | |
.Check(u => u.AgreedToTerms).IsEqualTo(true) | |
.When(f => f.Check(u => u.Age).IsGreaterThan(18)) | |
.Check(u => u.AgreedToTerms).IsNotEqualTo(true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn- watch | |
[client watch-fn channel {:keys [wait] | |
:or {wait 500}}] | |
(let [keep-watching? (atom true) | |
f (future | |
(loop [last-value {}] | |
(let [latest (watch-fn)] | |
(if (and (not= last-value {}) | |
(not= last-value latest)) | |
(go (>! channel latest))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defproject ravendb-test "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:dependencies [[org.clojure/clojure "1.5.1"] | |
[clj-ravendb "0.4.0"]]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require '[clj-ravendb.client :refer :all]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def northwind (client "http://localhost:8080" "northwind")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
:replicated? false | |
:master-only-writes? true | |
:address "http://localhost:8080/Databases/northwind" | |
:replications () | |
} |
OlderNewer