Class SingleDatabaseBuilder
java.lang.Object
de.softwareforge.testing.postgres.junit5.SingleDatabaseBuilder
Create a new PostgreSQL server that supports a single database.
-
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 database.preparedInstanceWithDefaults
(EmbeddedPostgresPreparer<DataSource> databasePreparer) Create a builder with standard initializations (EmbeddedPostgres.Builder.withDefaults()
) applied and register aEmbeddedPostgresPreparer<DataSource>
to set up the 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 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 database.- Parameters:
databasePreparer
- AEmbeddedPostgresPreparer<DataSource>
instance. Must not be null.- Returns:
- A
DatabaseManager.Builder<EmbeddedPgExtension>
instance that can be customized further. - Since:
- 3.0
-