PageRenderTime 21ms CodeModel.GetById 10ms app.highlight 7ms 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
 1using Machine.Specifications;
 2using Bifrost.Events;
 3using Moq;
 4using It = Machine.Specifications.It;
 5
 6namespace Bifrost.Specs.Events.for_EventStore
 7{
 8    [Subject(typeof(EventStore))]
 9    public class when_creating_an_instance_and_an_event_is_in_repository_and_a_subscription_has_not_received_it : Globalization.given.a_localizer_mock
10    {
11        protected static EventStore    event_store;
12        protected static Mock<IEventRepository> event_repository;
13        protected static Mock<IEventStoreChangeManager> event_store_change_manager_mock;
14        protected static Mock<IEventSubscriptionManager> event_subscription_manager_mock;
15
16        Establish context = () => 
17        {
18            event_repository = new Mock<IEventRepository>();
19            event_store_change_manager_mock = new Mock<IEventStoreChangeManager>();
20            event_subscription_manager_mock = new Mock<IEventSubscriptionManager>();
21
22            //event_repository.Setup(e=>e.
23            
24        };
25
26        Because of = () => event_store = new EventStore(event_repository.Object, event_store_change_manager_mock.Object, event_subscription_manager_mock.Object, localizer_mock.Object);
27        
28        It should_delegate_the_processing_of_the_event_to_the_subscription_manager = () => { };
29    }
30}