public void Setup() { _commandHandlerProvider = MockRepository.GenerateMock <ICommandHandlerProvider>(); _dbSessionManager = MockRepository.GenerateMock <IDbSessionManager>(); _prerequisitesChecker = MockRepository.GenerateMock <IPrerequisitesChecker>(); _bus = new CommandBus(_commandHandlerProvider, _dbSessionManager, _prerequisitesChecker); }
public CommandBus( ICommandHandlerProvider commandHandlerProvider, IDbSessionManager dbSessionManager, IPrerequisitesChecker prerequisitesChecker) { _commandHandlerProvider = commandHandlerProvider; _dbSessionManager = dbSessionManager; _prerequisitesChecker = prerequisitesChecker; }
public void Setup() { _dbSessionManager = MockRepository.GenerateMock<IDbSessionManager>(); _serviceLocator = MockRepository.GenerateMock<IServiceLocator>(); _serviceLocator .Stub( x => x.GetInstance<IDbSessionManager>() ) .Return( _dbSessionManager ); ServiceLocator.SetLocatorProvider( () => _serviceLocator ); }
public void Setup() { _dbSessionManager = MockRepository.GenerateMock <IDbSessionManager>(); _serviceLocator = MockRepository.GenerateMock <IServiceLocator>(); _serviceLocator .Stub(x => x.GetInstance <IDbSessionManager>()) .Return(_dbSessionManager); ServiceLocator.SetLocatorProvider(() => _serviceLocator); }
public EventPublisher(ISubscriptionService subscriptionService, IDbSessionManager dbSessionManager) { _subscriptionService = subscriptionService; _dbSessionManager = dbSessionManager; }
public void Setup() { _subscriptionService = MockRepository.GenerateMock <ISubscriptionService>(); _dbSessionManager = MockRepository.GenerateMock <IDbSessionManager>(); _publisher = new EventPublisher(_subscriptionService, _dbSessionManager); }
public InsightsModelFactory(IDbSessionManager dbSessionManager) { this.dbSessionManager = dbSessionManager; strategies = new Dictionary <LocalListingEngagement, Func <IDbSessionManager, IModelBuilder> >(); //...populate available builders or create an abstraction that can be injected. }