@Before public void initialize() throws Exception { defaultDatabase = TestUtils.getDatabases().getDefaultDatabase(); dataSource = defaultDatabase.getDataSource(); executedScriptInfoSource = getDefaultExecutedScriptInfoSource(defaultDatabase, true); executedScriptInfoSource.registerExecutedScript(createScript("1_folder/1_script.sql")); executedScriptInfoSource.registerExecutedScript(createScript("1_folder/2_script.sql")); executedScriptInfoSource.registerExecutedScript(createScript("2_folder/1_script.sql")); executedScriptInfoSource.registerExecutedScript(createScript("repeatable/script.sql")); executedScriptInfoSource.registerExecutedScript(createScript("postprocessing/script.sql")); }
@Before public void setUp() throws Exception { databases = getDatabases("PUBLIC", "SCHEMA_A", "SCHEMA_B"); defaultDatabase = databases.getDefaultDatabase(); dataSource = defaultDatabase.getDataSource(); ConstraintsDisabler constraintsDisabler = new DefaultConstraintsDisabler(databases); ExecutedScriptInfoSource executedScriptInfoSource = getDefaultExecutedScriptInfoSource(defaultDatabase, true); defaultDBClearer = new DefaultDBClearer( databases, new HashSet<DbItemIdentifier>(), new HashSet<DbItemIdentifier>(), constraintsDisabler, executedScriptInfoSource); dropTestDatabase(); createTestDatabase(); }