Class StartLocalMongoDbClassExtension
java.lang.Object
org.sdase.commons.server.mongo.testing.StartLocalMongoDb
org.sdase.commons.server.mongo.testing.StartLocalMongoDbClassExtension
- All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterAllCallback
,org.junit.jupiter.api.extension.BeforeAllCallback
,org.junit.jupiter.api.extension.Extension
,MongoDb
,MongoDbClassExtension
public class StartLocalMongoDbClassExtension
extends StartLocalMongoDb
implements MongoDbClassExtension
JUnit Test extension for running a MongoDB instance alongside the (integration) tests. This
instance starts a local mongo db which is the default behavior of
MongoDbClassExtension
.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.sdase.commons.server.mongo.testing.MongoDb
MongoDb.Builder<T extends MongoDb>
Nested classes/interfaces inherited from interface org.sdase.commons.server.mongo.testing.MongoDbClassExtension
MongoDbClassExtension.Builder
-
Field Summary
Fields inherited from class org.sdase.commons.server.mongo.testing.StartLocalMongoDb
database, mongoConnectionString, password, username, version
Fields inherited from interface org.sdase.commons.server.mongo.testing.MongoDb
OVERRIDE_MONGODB_CONNECTION_STRING_SYSTEM_PROPERTY_NAME
-
Method Summary
Methods inherited from class org.sdase.commons.server.mongo.testing.StartLocalMongoDb
getConnectionString, getMongoConnectionString, startMongo, stopMongo
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.sdase.commons.server.mongo.testing.MongoDb
clearCollections, clearDatabase, createClient, getConnectionString, getMongoConnectionString, getServerVersion
-
Method Details
-
beforeAll
public void beforeAll(org.junit.jupiter.api.extension.ExtensionContext context) - Specified by:
beforeAll
in interfaceorg.junit.jupiter.api.extension.BeforeAllCallback
-
afterAll
public void afterAll(org.junit.jupiter.api.extension.ExtensionContext context) - Specified by:
afterAll
in interfaceorg.junit.jupiter.api.extension.AfterAllCallback
-