Class JdbcDatabaseWrapper
- java.lang.Object
-
- liquibase.extension.testing.testsystem.wrapper.DatabaseWrapper
-
- liquibase.extension.testing.testsystem.wrapper.JdbcDatabaseWrapper
-
public class JdbcDatabaseWrapper extends DatabaseWrapper
Implementation ofDatabaseWrapper
for 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 String
describe()
Describes the configuration of this wrapper.String
getPassword()
String
getUrl()
String
getUsername()
void
start()
Start the database if possible and ensure it can be connected to.void
stop()
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:DatabaseWrapper
Describes the configuration of this wrapper. Used in outputting to user how this connection is configured.- Specified by:
describe
in classDatabaseWrapper
-
start
public void start() throws Exception
Description copied from class:DatabaseWrapper
Start 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:
start
in classDatabaseWrapper
- Throws:
Exception
-
stop
public void stop() throws Exception
Description copied from class:DatabaseWrapper
Stop the database if possible. If the database is managed externally, do not actually stop it.- Specified by:
stop
in classDatabaseWrapper
- Throws:
Exception
-
getUsername
public String getUsername()
- Specified by:
getUsername
in classDatabaseWrapper
-
getPassword
public String getPassword()
-
getUrl
public String getUrl()
- Specified by:
getUrl
in classDatabaseWrapper
-
-