Esempio n. 1
0
        public void Setup()
        {
            _commandHandlerProvider = MockRepository.GenerateMock <ICommandHandlerProvider>();
            _dbSessionManager       = MockRepository.GenerateMock <IDbSessionManager>();
            _prerequisitesChecker   = MockRepository.GenerateMock <IPrerequisitesChecker>();

            _bus = new CommandBus(_commandHandlerProvider, _dbSessionManager, _prerequisitesChecker);
        }
Esempio n. 2
0
 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 );
        }
Esempio n. 4
0
        public void Setup()
        {
            _dbSessionManager = MockRepository.GenerateMock <IDbSessionManager>();
            _serviceLocator   = MockRepository.GenerateMock <IServiceLocator>();
            _serviceLocator
            .Stub(x => x.GetInstance <IDbSessionManager>())
            .Return(_dbSessionManager);

            ServiceLocator.SetLocatorProvider(() => _serviceLocator);
        }
Esempio n. 5
0
 public EventPublisher(ISubscriptionService subscriptionService, IDbSessionManager dbSessionManager)
 {
     _subscriptionService = subscriptionService;
     _dbSessionManager    = dbSessionManager;
 }
Esempio n. 6
0
 public void Setup()
 {
     _subscriptionService = MockRepository.GenerateMock <ISubscriptionService>();
     _dbSessionManager    = MockRepository.GenerateMock <IDbSessionManager>();
     _publisher           = new EventPublisher(_subscriptionService, _dbSessionManager);
 }
Esempio n. 7
0
 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.
 }