public class MongodForTestsFactory
extends java.lang.Object
Constructor and Description |
---|
MongodForTestsFactory()
Create the testing utility using the latest production version of
MongoDB.
|
MongodForTestsFactory(IFeatureAwareVersion version)
Create the testing utility using the specified version of MongoDB.
|
Modifier and Type | Method and Description |
---|---|
com.mongodb.client.MongoDatabase |
newDatabase(com.mongodb.MongoClient mongo)
Creates a new DB with unique name for connection.
|
com.mongodb.DB |
newDB(com.mongodb.Mongo mongo)
Deprecated.
|
com.mongodb.MongoClient |
newMongo()
Creates a new Mongo connection.
|
protected IMongodConfig |
newMongodConfig(IFeatureAwareVersion version) |
void |
shutdown()
Cleans up the resources created by the utility.
|
static MongodForTestsFactory |
with(IFeatureAwareVersion version) |
public MongodForTestsFactory() throws java.io.IOException
java.io.IOException
public MongodForTestsFactory(IFeatureAwareVersion version) throws java.io.IOException
version
- version of MongoDB.java.io.IOException
public static MongodForTestsFactory with(IFeatureAwareVersion version) throws java.io.IOException
java.io.IOException
protected IMongodConfig newMongodConfig(IFeatureAwareVersion version) throws java.io.IOException
java.io.IOException
public com.mongodb.MongoClient newMongo() throws java.net.UnknownHostException
java.net.UnknownHostException
@Deprecated public com.mongodb.DB newDB(com.mongodb.Mongo mongo)
public com.mongodb.client.MongoDatabase newDatabase(com.mongodb.MongoClient mongo)
public void shutdown()
Copyright © 2018. All Rights Reserved.