/Source/Bifrost.Specs/Events/for_EventMigrationHierarchyManager/when_getting_the_logical_type_for_an_event_that_is_unregistered.cs

# · C# · 18 lines · 15 code · 3 blank · 0 comment · 0 complexity · 1948aa27833b9a783ffa8f2e20dcf2cb MD5 · raw file

  1. using System;
  2. using Bifrost.Events;
  3. using Machine.Specifications;
  4. namespace Bifrost.Specs.Events.for_EventMigrationHierarchyManager
  5. {
  6. public class when_getting_the_logical_type_for_an_event_that_is_unregistered : given.an_event_migration_hierarchy_manager_with_two_logical_events
  7. {
  8. static Exception exception;
  9. Because of = () =>
  10. {
  11. exception = Catch.Exception(() => event_migration_hierarchy_manager.GetLogicalTypeForEvent(typeof(Event)));
  12. };
  13. It should_throw_an_unregistered_event_exception = () => exception.ShouldBeOfType(typeof(UnregisteredEventException));
  14. }
  15. }