-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathPre312TestRunnerStatement.java
More file actions
40 lines (34 loc) · 1.43 KB
/
Pre312TestRunnerStatement.java
File metadata and controls
40 lines (34 loc) · 1.43 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
package org.utplsql.api.testRunner;
import org.utplsql.api.TestRunnerOptions;
import java.sql.Connection;
import java.sql.SQLException;
/**
* TestRunner-Statement for Framework version before 3.0.3
* Does not know about client character set
*
* @author pesse
*/
class Pre312TestRunnerStatement extends AbstractTestRunnerStatement {
public Pre312TestRunnerStatement(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 + "); " +
"END;";
}
}