use of org.springframework.data.mongodb.MongoDbFactory in project spring-cloud-connectors by spring-cloud.
the class MongoDbFactoryConfigWithServiceConfig method withConfigAllOptionsSpecifiedWriteConcernSafe.
@Test
public void withConfigAllOptionsSpecifiedWriteConcernSafe() {
ApplicationContext testContext = getTestApplicationContext(MongoDbFactoryConfigWithServiceConfig.class, createService("my-service"));
MongoDbFactory connector = testContext.getBean("connectionPerHost50_MaxWait200_WriteConcernSafe", getConnectorType());
MongoDbFactoryCloudConfigTestHelper.assertConfigProperties(connector, "safe", 50, 200);
}
use of org.springframework.data.mongodb.MongoDbFactory in project spring-cloud-connectors by spring-cloud.
the class MongoDbFactoryConfigWithServiceConfig method withConfigAllOptionsSpecifiedWriteConcernUnspecified.
@Test
public void withConfigAllOptionsSpecifiedWriteConcernUnspecified() {
ApplicationContext testContext = getTestApplicationContext(MongoDbFactoryConfigWithServiceConfig.class, createService("my-service"));
MongoDbFactory connector = testContext.getBean("connectionPerHost50_MaxWait200_WriteConcernUnspecified", getConnectorType());
MongoDbFactoryCloudConfigTestHelper.assertConfigProperties(connector, null, 50, 200);
}
use of org.springframework.data.mongodb.MongoDbFactory in project spring-cloud-connectors by spring-cloud.
the class MongoDbFactoryConfigWithServiceConfig method withConfigOnlyMaxWaitSpecified.
@Test
public void withConfigOnlyMaxWaitSpecified() {
ApplicationContext testContext = getTestApplicationContext(MongoDbFactoryConfigWithServiceConfig.class, createService("my-service"));
MongoDbFactory connector = testContext.getBean("connectionPerHostUnspecified_MaxWait200_WriteConcernUnspecified", getConnectorType());
MongoDbFactoryCloudConfigTestHelper.assertConfigProperties(connector, null, 100, /* default*/
200);
}
use of org.springframework.data.mongodb.MongoDbFactory in project spring-cloud-connectors by spring-cloud.
the class MongoDbFactoryXmlConfigTest method withConfigAllOptionsSpecifiedWriteConcernUnspecified.
@Test
public void withConfigAllOptionsSpecifiedWriteConcernUnspecified() {
ApplicationContext testContext = getTestApplicationContext("cloud-mongo-with-config.xml", createService("my-service"));
MongoDbFactory connector = testContext.getBean("service-maxWait200-connectionPerHost50-WriteConcernUnspecified", getConnectorType());
MongoDbFactoryCloudConfigTestHelper.assertConfigProperties(connector, null, 50, 200);
}
use of org.springframework.data.mongodb.MongoDbFactory in project spring-cloud-connectors by spring-cloud.
the class MongoDbFactoryXmlConfigTest method withConfigOnlyConnectionPerHostSpecified.
@Test
public void withConfigOnlyConnectionPerHostSpecified() {
ApplicationContext testContext = getTestApplicationContext("cloud-mongo-with-config.xml", createService("my-service"));
MongoDbFactory connector = testContext.getBean("service-maxWaitUnspecified-connectionPerHost50-WriteConcernUnspecified", getConnectorType());
MongoDbFactoryCloudConfigTestHelper.assertConfigProperties(connector, null, 50, null);
}
Aggregations