public void Setup()
 {
     _connectionString = ConfigurationManager.AppSettings["MongoEventStoreConnectionString"];
     _database = ConfigurationManager.AppSettings["MongoEventStoreDatabaseName"];
     var mockPublisher = MockRepository.GenerateMock<IEventPublisher>();
     var eventPersistence = new MongoEventPersistence(_connectionString, _database);
     _domainRepository = new DomainRepository(new EventStore(eventPersistence, mockPublisher));
 }
コード例 #2
0
        public void Setup()
        {
            _connectionString = ConfigurationManager.AppSettings["MongoEventStoreConnectionString"];
            _database         = ConfigurationManager.AppSettings["MongoEventStoreDatabaseName"];
            var mockPublisher    = MockRepository.GenerateMock <IEventPublisher>();
            var eventPersistence = new MongoEventPersistence(_connectionString, _database);

            _domainRepository = new DomainRepository(new EventStore(eventPersistence, mockPublisher));
        }