public class MongoResource
extends org.junit.rules.ExternalResource
| Constructor and Description |
|---|
MongoResource(Supplier<String> host,
int port) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
after() |
protected void |
before() |
String |
host() |
MongoResource |
importCollectionContent(String exportResource,
String db,
String collection) |
com.mongodb.MongoClient |
newClient() |
int |
port() |
MongoResource |
testCollection(String dbname,
String collectionName) |
MongoResource |
testDB(String dbname) |
public String host()
public int port()
public com.mongodb.MongoClient newClient()
public MongoResource testDB(String dbname)
public MongoResource testCollection(String dbname, String collectionName)
protected void before()
throws Throwable
before in class org.junit.rules.ExternalResourceThrowableprotected void after()
after in class org.junit.rules.ExternalResourcepublic MongoResource importCollectionContent(String exportResource, String db, String collection)
Copyright © 2019. All rights reserved.