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
(DatabasePreparer preparer) Deprecated.preparedInstance
(EmbeddedPostgresPreparer<DataSource> databasePreparer) Create a builder and register aEmbeddedPostgresPreparer<DataSource>
to set up the database.preparedInstanceWithDefaults
(DatabasePreparer preparer) Deprecated.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
@Deprecated @NonNull public static DatabaseManager.Builder<EmbeddedPgExtension> preparedInstance(@NonNull DatabasePreparer preparer) Deprecated. -
preparedInstanceWithDefaults
@Deprecated @NonNull public static DatabaseManager.Builder<EmbeddedPgExtension> preparedInstanceWithDefaults(@NonNull DatabasePreparer preparer) Deprecated. -
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.
-
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.
-
preparedInstance(EmbeddedPostgresPreparer)
.