public void SetUp() { BsonClassMapHelper.Clear(); var config = new DocumentStoreTestConfiguration(); MongoDbTestConnectionProvider.DropTestsTenant(); config.SetTestAddress(TestConfig.ServerAddress); _documentStoreService = new DocumentStoreBootstrapper(); _documentStoreService.Start(config); TenantContext.Enter(new TenantId(TestConfig.Tenant)); var tenant = ContainerAccessor.Instance.Resolve<TenantManager>().Current; _writer = tenant.Container.Resolve<IDocumentWriter>(); }
public void SetUp() { var config = new DocumentStoreTestConfiguration(); MongoDbTestConnectionProvider.DropTestsTenant(); config.SetTestAddress(TestConfig.ServerAddress); _documentStoreService = new DocumentStoreBootstrapper(); _documentStoreService.Start(config); TenantContext.Enter(new TenantId(TestConfig.Tenant)); var tenant = ContainerAccessor.Instance.Resolve<TenantManager>().Current; _bus = tenant.Container.Resolve<ICommandBus>(); _filestore = tenant.Container.Resolve<IBlobStore>(); Assert.IsTrue(_bus is IInProcessCommandBus); _projections = tenant.Container.Resolve<ITriggerProjectionsUpdate>(); _handleWriter = tenant.Container.Resolve<IDocumentWriter>(); _documentReader = tenant.Container.Resolve<IReader<DocumentDescriptorReadModel, DocumentDescriptorId>>(); }
public void SetUp() { var config = new DocumentStoreTestConfiguration(_engineVersion); MongoDbTestConnectionProvider.DropTestsTenant(); config.SetTestAddress(TestConfig.ServerAddress); _documentStoreService = new DocumentStoreBootstrapper(); _documentStoreService.Start(config); _documentStoreClient = new DocumentStoreServiceClient( TestConfig.ServerAddress, TestConfig.Tenant ); _tenant = ContainerAccessor.Instance.Resolve<TenantManager>().Current; _projections = _tenant.Container.Resolve<ITriggerProjectionsUpdate>(); _documentDescriptorCollection = MongoDbTestConnectionProvider.ReadModelDb.GetCollection<DocumentDescriptorReadModel>("rm.DocumentDescriptor"); _documentCollection = MongoDbTestConnectionProvider.ReadModelDb.GetCollection<DocumentReadModel>("rm.Document"); _commitCollection = MongoDbTestConnectionProvider.ReadModelDb.GetCollection<BsonDocument>("Commits"); _blobStore = _tenant.Container.Resolve<IBlobStore>(); MongoFlatMapper.EnableFlatMapping(true); }