Package com.opentable.db.postgres.junit5
Class PreparedDbExtension
- java.lang.Object
-
- com.opentable.db.postgres.junit5.PreparedDbExtension
-
- All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterAllCallback,org.junit.jupiter.api.extension.BeforeAllCallback,org.junit.jupiter.api.extension.Extension
public class PreparedDbExtension extends Object implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.AfterAllCallback
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterAll(org.junit.jupiter.api.extension.ExtensionContext extensionContext)voidbeforeAll(org.junit.jupiter.api.extension.ExtensionContext extensionContext)PreparedDbExtensioncustomize(Consumer<EmbeddedPostgres.Builder> customizer)ConnectionInfogetConnectionInfo()PreparedDbProvidergetDbProvider()DataSourcegetTestDatabase()
-
-
-
Method Detail
-
customize
public PreparedDbExtension customize(Consumer<EmbeddedPostgres.Builder> customizer)
-
beforeAll
public void beforeAll(org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws Exception- Specified by:
beforeAllin interfaceorg.junit.jupiter.api.extension.BeforeAllCallback- Throws:
Exception
-
afterAll
public void afterAll(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
- Specified by:
afterAllin interfaceorg.junit.jupiter.api.extension.AfterAllCallback
-
getTestDatabase
public DataSource getTestDatabase()
-
getConnectionInfo
public ConnectionInfo getConnectionInfo()
-
getDbProvider
public PreparedDbProvider getDbProvider()
-
-