示例#1
0
        public MongoEventStoreFixture()
        {
            mongoDatabase = mongoClient.GetDatabase("EventStoreTest");

            BsonJsonConvention.Register(JsonSerializer.Create(JsonHelper.DefaultSettings()));

            EventStore = new MongoEventStore(mongoDatabase, notifier);
            EventStore.InitializeAsync().Wait();
        }
        protected MongoEventStoreFixture(string connectionString)
        {
            mongoClient   = new MongoClient(connectionString);
            mongoDatabase = mongoClient.GetDatabase($"EventStoreTest");

            BsonJsonConvention.Register(JsonSerializer.Create(TestUtils.DefaultSettings()));

            EventStore = new MongoEventStore(mongoDatabase, notifier);
            EventStore.InitializeAsync().Wait();
        }