public SettingsMemoryPersistenceTest() { _persistence = new SettingsMemoryPersistence(); _persistence.OpenAsync(null).Wait(); _persistence.ClearAsync(null).Wait(); _fixture = new SettingsPersistenceFixture(_persistence); }
public SettingsMongoDbPersistenceTest() { var MONGODB_COLLECTION = Environment.GetEnvironmentVariable("MONGODB_COLLECTION") ?? "test_settings"; var MONGODB_SERVICE_URI = Environment.GetEnvironmentVariable("MONGODB_SERVICE_URI") ?? "mongodb://localhost:27017/test"; var config = ConfigParams.FromTuples( "collection", MONGODB_COLLECTION, "connection.uri", MONGODB_SERVICE_URI ); _persistence = new SettingsMongoDbPersistence(); _persistence.Configure(config); _persistence.OpenAsync(null).Wait(); _persistence.ClearAsync(null).Wait(); _fixture = new SettingsPersistenceFixture(_persistence); }