Search in sources :

Example 16 with MongoClientFactoryBean

use of org.springframework.data.mongodb.core.MongoClientFactoryBean in project spring-data-mongodb by spring-projects.

the class MongoNamespaceTests method testMongoSingleton.

@Test
public void testMongoSingleton() throws Exception {
    assertThat(ctx.containsBean("noAttrMongo")).isTrue();
    MongoClientFactoryBean mfb = (MongoClientFactoryBean) ctx.getBean("&noAttrMongo");
    assertThat(getField(mfb, "host")).isNull();
    assertThat(getField(mfb, "port")).isNull();
}
Also used : MongoClientFactoryBean(org.springframework.data.mongodb.core.MongoClientFactoryBean) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)16 MongoClientFactoryBean (org.springframework.data.mongodb.core.MongoClientFactoryBean)16 MongoClientSettings (com.mongodb.MongoClientSettings)10 ServerAddress (com.mongodb.ServerAddress)3 SSLSocketFactory (javax.net.ssl.SSLSocketFactory)3 ConnectionString (com.mongodb.ConnectionString)1 ArrayList (java.util.ArrayList)1