/Source/Bifrost.Specs/Events/for_EventSource/when_fast_fowarding_a_stateful_aggregate_root.cs

# · C# · 18 lines · 14 code · 4 blank · 0 comment · 0 complexity · a792f1c364d28048d3833910d0d4ce80 MD5 · raw file

  1. using Bifrost.Events;
  2. using Machine.Specifications;
  3. namespace Bifrost.Specs.Events.for_EventSource
  4. {
  5. [Subject(typeof (EventSource))]
  6. public class when_fast_fowarding_a_stateful_aggregate_root : given.a_stateful_event_source
  7. {
  8. static InvalidFastForwardException exception;
  9. static EventSourceVersion last_commit;
  10. Establish context = () => last_commit = new EventSourceVersion(1,1);
  11. Because of = () => exception = Catch.Exception(() => event_source.FastForward(last_commit)) as InvalidFastForwardException;
  12. It should_throw_an_invalid_fast_forward_exception = () => exception.ShouldNotBeNull();
  13. }
  14. }