|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.flapdoodle.embedmongo.tests.MongodForTestsFactory
public class MongodForTestsFactory
This class encapsulates everything that would be needed to do embedded MongoDB testing.
| Constructor Summary | |
|---|---|
MongodForTestsFactory()
Create the testing utility using the latest production version of MongoDB. |
|
MongodForTestsFactory(IVersion version)
Create the testing utility using the specified version of MongoDB. |
|
| Method Summary | |
|---|---|
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 MongodForTestsFactory |
with(IVersion version)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MongodForTestsFactory()
throws IOException
IOException
public MongodForTestsFactory(IVersion version)
throws IOException
version - version of MongoDB.
IOException| Method Detail |
|---|
public static MongodForTestsFactory with(IVersion version)
throws IOException
IOException
public com.mongodb.Mongo newMongo()
throws UnknownHostException,
com.mongodb.MongoException
com.mongodb.MongoException
UnknownHostExceptionpublic com.mongodb.DB newDB(com.mongodb.Mongo mongo)
public void shutdown()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||