Class EmbeddedMongo
java.lang.Object
org.ikasan.component.endpoint.mongo.test.EmbeddedMongo
Allows the port and download location of the mongo distribution to be configured Also ensures that only a single
embedded mongo instance is started for all tests
- Author:
- Kieron Edwards
-
Constructor Summary
ConstructorsConstructorDescriptionThis will automatically allocated a free port to the mongo instanceEmbeddedMongo(int port) Deprecated.- use the configuration object constructor or the empty constructor insteadEmbeddedMongo(EmbeddedMongoConfiguration configuration) If you need to configure embedded mongo distribution and db settings use this constructor -
Method Summary
-
Constructor Details
-
EmbeddedMongo
Deprecated.- use the configuration object constructor or the empty constructor instead -
EmbeddedMongo
public EmbeddedMongo()This will automatically allocated a free port to the mongo instance -
EmbeddedMongo
If you need to configure embedded mongo distribution and db settings use this constructor
-
-
Method Details
-
start
public com.mongodb.client.MongoClient start()This will check for the singleton instance and wont instantiate a new mongo database each time start is called by a test.- Returns:
-
stop
public static void stop() -
getConfiguration
-