public SubscriptionService( IObjectLookupCache cache, IEventSubscriberAssembliesProvider eventSubscriberAssembliesProvider) { _cache = cache; _eventSubscriberAssembliesProvider = eventSubscriberAssembliesProvider; }
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); }
public void Setup() { _commandHandlerFinder = MockRepository.GenerateMock <ICommandHandlerFinder>(); _cache = MockRepository.GenerateMock <IObjectLookupCache>(); _provider = new CommandHandlerProvider(_commandHandlerFinder, _cache); }
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 ); }