Class DatabaseWrapper
- java.lang.Object
-
- liquibase.extension.testing.testsystem.wrapper.DatabaseWrapper
-
- Direct Known Subclasses:
DockerDatabaseWrapper,JdbcDatabaseWrapper,UnimplementedWrapper
public abstract class DatabaseWrapper extends Object
Wraps the external database used byDatabaseTestSystemso that HOW the database is interacted with is independent of WHAT we do with that connection. For example, the same setup logic can be applied regardless of whether the wrapped database is accessed viaJdbcDatabaseWrapperorDockerDatabaseWrapper.
-
-
Constructor Summary
Constructors Constructor Description DatabaseWrapper()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract Stringdescribe()Describes the configuration of this wrapper.abstract StringgetUrl()abstract StringgetUsername()abstract voidstart()Start the database if possible and ensure it can be connected to.abstract voidstop()Stop the database if possible.
-
-
-
Method Detail
-
start
public abstract void start() throws ExceptionStart the database if possible and ensure it can be connected to. If the database is managed externally, just ensure it can be connected to.- Throws:
Exception
-
stop
public abstract void stop() throws ExceptionStop the database if possible. If the database is managed externally, do not actually stop it.- Throws:
Exception
-
getUsername
public abstract String getUsername()
-
getUrl
public abstract String getUrl()
-
describe
public abstract String describe()
Describes the configuration of this wrapper. Used in outputting to user how this connection is configured.
-
-