Class MultiDatabaseBuilder
java.lang.Object
de.softwareforge.testing.postgres.junit5.MultiDatabaseBuilder
Create a new PostgreSQL server that supports multiple databases. Each database is cloned from a template.
-
Method Summary
Modifier and TypeMethodDescriptioninstance()
Create a builder without any customizations applied.Create a builder with standard initializations (EmbeddedPostgres.Builder.withDefaults()
) applied.preparedInstance
(EmbeddedPostgresPreparer<DataSource> databasePreparer) Create a builder and register aEmbeddedPostgresPreparer<DataSource>
to set up the template database.preparedInstanceWithDefaults
(EmbeddedPostgresPreparer<DataSource> databasePreparer) Create a builder with standard initializations (EmbeddedPostgres.Builder.withDefaults()
) applied and register aEmbeddedPostgresPreparer<DataSource>
to set up the template database.
-
Method Details
-
instance
Create a builder without any customizations applied.- Returns:
- A
DatabaseManager.Builder<EmbeddedPgExtension>
instance that can be customized further.
-
instanceWithDefaults
Create a builder with standard initializations (EmbeddedPostgres.Builder.withDefaults()
) applied.- Returns:
- A
DatabaseManager.Builder<EmbeddedPgExtension>
instance that can be customized further.
-
preparedInstance
@Nonnull public static DatabaseManager.Builder<EmbeddedPgExtension> preparedInstance(@Nonnull EmbeddedPostgresPreparer<DataSource> databasePreparer) Create a builder and register aEmbeddedPostgresPreparer<DataSource>
to set up the template database.- Parameters:
databasePreparer
- AEmbeddedPostgresPreparer<DataSource>
instance. Must not be null.- Returns:
- A
DatabaseManager.Builder<EmbeddedPgExtension>
instance that can be customized further. - Since:
- 3.0
-
preparedInstanceWithDefaults
@Nonnull public static DatabaseManager.Builder<EmbeddedPgExtension> preparedInstanceWithDefaults(@Nonnull EmbeddedPostgresPreparer<DataSource> databasePreparer) Create a builder with standard initializations (EmbeddedPostgres.Builder.withDefaults()
) applied and register aEmbeddedPostgresPreparer<DataSource>
to set up the template database.- Parameters:
databasePreparer
- AEmbeddedPostgresPreparer<DataSource>
instance. Must not be null.- Returns:
- A
DatabaseManager.Builder<EmbeddedPgExtension>
instance that can be customized further. - Since:
- 3.0
-