@Test public void should_insert_special_entities_with_custom_end_line() throws Exception { ArgumentCaptor<String> statementsCaptor = ArgumentCaptor.forClass(String.class); scriptingConfiguration.setSqlStatementDelimiter("GO"); scriptExecutor.execute(FileLoader.loadAsString("scripts/insert-html-special-chars-with-custom-end-line.sql")); verify(connection, times(1)).createStatement(); verify(connection.createStatement(), times(1)).execute(statementsCaptor.capture()); assertThat(statementsCaptor.getAllValues()).containsSequence( "insert into useraccount (id, firstname, lastname, username, password)" + " values (1, 'John', 'Smith & Company', 'doovde;;', '&amp;test&copy;')\nGO" ); }
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);  }