/Source/Bifrost.Specs/Events/for_EventStream/when_appending_an_event_to_an_uncommitted_event_stream_which_has_been_attached_to_an_event_source.cs

# · C# · 20 lines · 17 code · 3 blank · 0 comment · 0 complexity · 8a0692a9380f84982cd2352143da2334 MD5 · raw file

  1. using System;
  2. using Bifrost.Fakes.Events;
  3. using Machine.Specifications;
  4. namespace Bifrost.Specs.Events.for_EventStream
  5. {
  6. public class when_appending_an_event_to_an_uncommitted_event_stream_which_has_been_attached_to_an_event_source
  7. : given.an_empty_uncommitted_event_stream
  8. {
  9. private static Exception Exception;
  10. Because of = () =>
  11. {
  12. var attachedEvent = new SimpleEvent(Guid.NewGuid());
  13. Exception = Catch.Exception(() => EventStream.Append(attachedEvent));
  14. };
  15. It should_throw_an_exception = () => Exception.ShouldNotBeNull();
  16. }
  17. }