예제 #1
0
 public static IThenStateBuilder Then(this IThenStateBuilder builder, params IEvent[] events)
 {
     if (events == null)
     {
         throw new ArgumentNullException("events");
     }
     return(events.Aggregate(builder, (current, @event) => current.Then(@event.Id.ToString(), @event)));
 }
예제 #2
0
        public static void Assert(this IThenStateBuilder builder)
        {
            using (var scope = CompositionRoot.Instance.BeginLifetimeScope()) {
                var specification = builder.Build();
                StoreGivens(scope, specification.Givens);

                HandleWhen(scope, specification.When);

                CompareActualAndExpectedThens(scope, specification.Thens);
            }
        }
예제 #3
0
 public static void Assert(this IThenStateBuilder builder)
 {
     //ommitted for brevity.
 }