@Test public void should_execute_script_with_new_line_as_statement_delimiter() throws Exception { scriptingConfiguration.setSqlStatementDelimiter(ScriptingConfiguration.NEW_LINE_SYMBOL); scriptExecutor = spy(new ScriptExecutor(connection, scriptingConfiguration, new DefaultStatementSplitter(ScriptingConfiguration.NEW_LINE_SYMBOL))); scriptExecutor.execute(FileLoader.loadAsString("scripts/new-line-delimiter.sql")); verify(connection, times(6)).createStatement(); }
public void execute(String script) { final List<String> statements = statementSplitter.splitStatements(script); for (String statement : statements) { executeStatement(statement); } }
ScriptExecutor { public void execute(String script) { final List<String> statements = statementSplitter.splitStatements(script); for (String statement : statements) { executeStatement(statement); } } }
ScriptExecutor { public void execute(String script) { final List<String> statements = statementSplitter.splitStatements(script); for (String statement : statements) { executeStatement(statement); } } ScriptExecutor(final Connection connection, final ScriptingConfiguration scriptingConfiguration,
        final StatementSplitter statementSplitter); }
ScriptExecutor { public void execute(String script) { final List<String> statements = statementSplitter.splitStatements(script); for (String statement : statements) { executeStatement(statement); } } ScriptExecutor(final Connection connection, final ScriptingConfiguration scriptingConfiguration,
        final StatementSplitter statementSplitter); void execute(String script); }
ScriptExecutor { public void execute(String script) { final List<String> statements = statementSplitter.splitStatements(script); for (String statement : statements) { executeStatement(statement); } } ScriptExecutor(final Connection connection, final ScriptingConfiguration scriptingConfiguration,
        final StatementSplitter statementSplitter); void execute(String script);  }