Class TestLiquibaseRunner
java.lang.Object
no.priv.bang.ukelonn.db.liquibase.test.TestLiquibaseRunner
- All Implemented Interfaces:
org.ops4j.pax.jdbc.hook.PreHook
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String(package private) static final Stringprivate org.osgi.service.log.LoggerFields inherited from interface org.ops4j.pax.jdbc.hook.PreHook
CONFIG_KEY_NAME, KEY_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid(package private) Stringprivate liquibase.changelog.ChangeLogHistoryServicefindChangeLogService(liquibase.database.Database database) private liquibase.database.DatabasefindCorrectDatabaseImplementation(liquibase.database.jvm.JdbcConnection databaseConnection) (package private) List<liquibase.changelog.RanChangeSet> getChangeLogHistory(DataSource datasource) Package private method to let the unit test determine if the Liquibase changesets have been run.booleaninsertMockData(DataSource datasource, no.priv.bang.ukelonn.db.liquibase.UkelonnLiquibase liquibase) voidprepare(DataSource datasource) booleanrollbackMockData(DataSource datasource) voidsetLogService(org.osgi.service.log.LogService logService)
-
Field Details
-
DEFAULT_DUMMY_DATA_CHANGELOG
- See Also:
-
logger
private org.osgi.service.log.Logger logger -
databaselanguage
-
-
Constructor Details
-
TestLiquibaseRunner
public TestLiquibaseRunner()
-
-
Method Details
-
setLogService
public void setLogService(org.osgi.service.log.LogService logService) -
activate
-
prepare
- Specified by:
preparein interfaceorg.ops4j.pax.jdbc.hook.PreHook- Throws:
SQLException
-
insertMockData
public boolean insertMockData(DataSource datasource, no.priv.bang.ukelonn.db.liquibase.UkelonnLiquibase liquibase) -
rollbackMockData
-
getChangeLogHistory
List<liquibase.changelog.RanChangeSet> getChangeLogHistory(DataSource datasource) throws liquibase.exception.DatabaseException, SQLException Package private method to let the unit test determine if the Liquibase changesets have been run.- Returns:
- A list of all changesets run by liqubase in the derby database
- Throws:
liquibase.exception.DatabaseExceptionSQLException
-
findCorrectDatabaseImplementation
private liquibase.database.Database findCorrectDatabaseImplementation(liquibase.database.jvm.JdbcConnection databaseConnection) throws liquibase.exception.DatabaseException - Throws:
liquibase.exception.DatabaseException
-
findChangeLogService
private liquibase.changelog.ChangeLogHistoryService findChangeLogService(liquibase.database.Database database) -
dummyDataResourceName
String dummyDataResourceName()
-