public class MongosForTestsFactory extends Object
| Constructor and Description |
|---|
MongosForTestsFactory()
Create the testing utility using the latest production version of
MongoDB.
|
MongosForTestsFactory(de.flapdoodle.embed.process.distribution.IVersion version)
Create the testing utility using the specified version of MongoDB.
|
| Modifier and Type | Method and Description |
|---|---|
com.mongodb.DB |
newDB(com.mongodb.Mongo mongo)
Creates a new DB with unique name for connection.
|
com.mongodb.Mongo |
newMongo()
Creates a new Mongo connection.
|
void |
shutdown()
Cleans up the resources created by the utility.
|
static MongosForTestsFactory |
with(de.flapdoodle.embed.process.distribution.IVersion version) |
public MongosForTestsFactory()
throws IOException
IOExceptionpublic MongosForTestsFactory(de.flapdoodle.embed.process.distribution.IVersion version)
throws IOException
version - version of MongoDB.IOExceptionpublic static MongosForTestsFactory with(de.flapdoodle.embed.process.distribution.IVersion version) throws IOException
IOExceptionpublic com.mongodb.Mongo newMongo()
throws UnknownHostException,
com.mongodb.MongoException
com.mongodb.MongoExceptionUnknownHostExceptionpublic com.mongodb.DB newDB(com.mongodb.Mongo mongo)
public void shutdown()
Copyright © 2013. All Rights Reserved.