public class MongoDBForTestsFactory extends Object implements org.springframework.beans.factory.FactoryBean<com.mongodb.DB>, org.springframework.beans.factory.DisposableBean
MongoDB instances in order to make use of it via Spring contexts or in tests.| Constructor and Description |
|---|
MongoDBForTestsFactory()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
String |
getMongoHost()
Get a Mongo host string e.g.
|
de.flapdoodle.embed.mongo.distribution.Version.Main |
getMongoTestFeatureVersion()
returns the Mongo version to test against
|
String |
getMongoURI()
Utility method to build a MongoDB URI that references the
DB provided by this factory |
String |
getMongoURIWithoutDB()
Utility method to build a MongoDB URI that can be used to construct a
mongo client. |
com.mongodb.DB |
getObject() |
Class<?> |
getObjectType() |
com.mongodb.ServerAddress |
getServerAddress()
Utility method to build a MongoDB host string (IP:PORT)
|
boolean |
isSingleton() |
public com.mongodb.DB getObject()
getObject in interface org.springframework.beans.factory.FactoryBean<com.mongodb.DB>public de.flapdoodle.embed.mongo.distribution.Version.Main getMongoTestFeatureVersion()
public String getMongoURI()
DB provided by this factorypublic String getMongoURIWithoutDB()
mongo client.public String getMongoHost()
public com.mongodb.ServerAddress getServerAddress()
public Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<com.mongodb.DB>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<com.mongodb.DB>public void destroy()
destroy in interface org.springframework.beans.factory.DisposableBeanCopyright © 2005–2018 Alfresco Software. All rights reserved.