-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathPre317TestRunnerStatement.java
More file actions
50 lines (41 loc) · 1.72 KB
/
Pre317TestRunnerStatement.java
File metadata and controls
50 lines (41 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package org.utplsql.api.testRunner;
import org.utplsql.api.TestRunnerOptions;
import java.sql.Connection;
import java.sql.SQLException;
/**
* Provides the call to run tests for the most actual Framework version.
* Includes fail on error
*
* @author pesse
*/
class Pre317TestRunnerStatement extends AbstractTestRunnerStatement {
public Pre317TestRunnerStatement(TestRunnerOptions options, Connection connection) throws SQLException {
super(options, connection);
}
@Override
protected String getSql() {
// Workaround because Oracle JDBC doesn't support passing boolean to stored procedures.
String colorConsoleStr = Boolean.toString(options.colorConsole);
String failOnErrors = Boolean.toString(options.failOnErrors);
return
"BEGIN " +
"ut_runner.run(" +
"a_paths => ?, " +
"a_reporters => ?, " +
"a_color_console => " + colorConsoleStr + ", " +
"a_coverage_schemes => ?, " +
"a_source_file_mappings => ?, " +
"a_test_file_mappings => ?, " +
"a_include_objects => ?, " +
"a_exclude_objects => ?, " +
"a_fail_on_errors => " + failOnErrors + ", " +
"a_client_character_set => ?); " +
"END;";
}
@Override
protected int createStatement() throws SQLException {
int curParamIdx = super.createStatement();
callableStatement.setString(++curParamIdx, options.clientCharacterSet);
return curParamIdx;
}
}