PageRenderTime 10ms CodeModel.GetById 2ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

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