Class JdbcDatabaseWrapper
- java.lang.Object
-
- liquibase.extension.testing.testsystem.wrapper.DatabaseWrapper
-
- liquibase.extension.testing.testsystem.wrapper.JdbcDatabaseWrapper
-
public class JdbcDatabaseWrapper extends DatabaseWrapper
Implementation ofDatabaseWrapperfor databases that are connected to via a JDBC url and are not "started" in a traditional sense.
-
-
Constructor Summary
Constructors Constructor Description JdbcDatabaseWrapper(String url, String username, String password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringdescribe()Describes the configuration of this wrapper.StringgetPassword()StringgetUrl()StringgetUsername()voidstart()Start the database if possible and ensure it can be connected to.voidstop()Stop the database if possible.
-
-
-
Constructor Detail
-
JdbcDatabaseWrapper
public JdbcDatabaseWrapper(String url, String username, String password) throws SQLException
- Throws:
SQLException
-
-
Method Detail
-
describe
public String describe()
Description copied from class:DatabaseWrapperDescribes the configuration of this wrapper. Used in outputting to user how this connection is configured.- Specified by:
describein classDatabaseWrapper
-
start
public void start() throws ExceptionDescription copied from class:DatabaseWrapperStart the database if possible and ensure it can be connected to. If the database is managed externally, just ensure it can be connected to.- Specified by:
startin classDatabaseWrapper- Throws:
Exception
-
stop
public void stop() throws ExceptionDescription copied from class:DatabaseWrapperStop the database if possible. If the database is managed externally, do not actually stop it.- Specified by:
stopin classDatabaseWrapper- Throws:
Exception
-
getUsername
public String getUsername()
- Specified by:
getUsernamein classDatabaseWrapper
-
getPassword
public String getPassword()
-
getUrl
public String getUrl()
- Specified by:
getUrlin classDatabaseWrapper
-
-