Esempio n. 1
0
 public SubscriptionService(
     IObjectLookupCache cache,
     IEventSubscriberAssembliesProvider eventSubscriberAssembliesProvider)
 {
     _cache = cache;
     _eventSubscriberAssembliesProvider = eventSubscriberAssembliesProvider;
 }
Esempio n. 2
0
        public void Setup()
        {
            _mockedServiceLocator = MockRepository.GenerateMock <IServiceLocator>();
            _eventSubscriberAssembliesProvider = MockRepository.GenerateMock <IEventSubscriberAssembliesProvider>();

            _eventSubscriberAssembliesProvider.Stub(x => x.GetEventSubscriberAssemblies()).Return(new List <Assembly>()
            {
                this.GetType().Assembly
            });

            ServiceLocator.SetLocatorProvider(() => _mockedServiceLocator);

            _cache = MockRepository.GenerateMock <IObjectLookupCache>();

            _service = new SubscriptionService(_cache, _eventSubscriberAssembliesProvider);
        }
Esempio n. 3
0
 public void Setup()
 {
     _commandHandlerFinder = MockRepository.GenerateMock <ICommandHandlerFinder>();
     _cache    = MockRepository.GenerateMock <IObjectLookupCache>();
     _provider = new CommandHandlerProvider(_commandHandlerFinder, _cache);
 }
Esempio n. 4
0
 public CommandHandlerProvider(ICommandHandlerFinder commandHandlerFinder, IObjectLookupCache cache)
 {
     _commandHandlerFinder = commandHandlerFinder;
     _cache = cache;
 }
 public void Setup()
 {
     _commandHandlerFinder = MockRepository.GenerateMock<ICommandHandlerFinder>();
     _cache = MockRepository.GenerateMock<IObjectLookupCache>();
     _provider = new CommandHandlerProvider( _commandHandlerFinder, _cache );
 }