PageRenderTime 39ms CodeModel.GetById 12ms RepoModel.GetById 1ms app.codeStats 0ms

/Source/Bifrost.Specs/Events/for_EventStore/when_creating_an_instance_and_an_event_is_in_repository_and_a_subscription_has_not_received_it.cs

#
C# | 30 lines | 23 code | 6 blank | 1 comment | 0 complexity | eb9290309e6946f05767e045e4734680 MD5 | raw file
Possible License(s): CC-BY-SA-3.0
  1. using Machine.Specifications;
  2. using Bifrost.Events;
  3. using Moq;
  4. using It = Machine.Specifications.It;
  5. namespace Bifrost.Specs.Events.for_EventStore
  6. {
  7. [Subject(typeof(EventStore))]
  8. public class when_creating_an_instance_and_an_event_is_in_repository_and_a_subscription_has_not_received_it : Globalization.given.a_localizer_mock
  9. {
  10. protected static EventStore event_store;
  11. protected static Mock<IEventRepository> event_repository;
  12. protected static Mock<IEventStoreChangeManager> event_store_change_manager_mock;
  13. protected static Mock<IEventSubscriptionManager> event_subscription_manager_mock;
  14. Establish context = () =>
  15. {
  16. event_repository = new Mock<IEventRepository>();
  17. event_store_change_manager_mock = new Mock<IEventStoreChangeManager>();
  18. event_subscription_manager_mock = new Mock<IEventSubscriptionManager>();
  19. //event_repository.Setup(e=>e.
  20. };
  21. Because of = () => event_store = new EventStore(event_repository.Object, event_store_change_manager_mock.Object, event_subscription_manager_mock.Object, localizer_mock.Object);
  22. It should_delegate_the_processing_of_the_event_to_the_subscription_manager = () => { };
  23. }
  24. }