public class MongosForTestsFactory
extends java.lang.Object
| Constructor and Description |
|---|
MongosForTestsFactory()
Create the testing utility using the latest production version of
MongoDB.
|
MongosForTestsFactory(IFeatureAwareVersion 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(IFeatureAwareVersion version) |
public MongosForTestsFactory()
throws java.io.IOException
java.io.IOExceptionpublic MongosForTestsFactory(IFeatureAwareVersion version) throws java.io.IOException
version - version of MongoDB.java.io.IOExceptionpublic static MongosForTestsFactory with(IFeatureAwareVersion version) throws java.io.IOException
java.io.IOExceptionpublic com.mongodb.Mongo newMongo()
throws java.net.UnknownHostException,
com.mongodb.MongoException
com.mongodb.MongoExceptionjava.net.UnknownHostExceptionpublic com.mongodb.DB newDB(com.mongodb.Mongo mongo)
public void shutdown()
Copyright © 2018. All Rights Reserved.