-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathActualTestRunnerStatement.java
More file actions
39 lines (33 loc) · 1.43 KB
/
ActualTestRunnerStatement.java
File metadata and controls
39 lines (33 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
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 ActualTestRunnerStatement extends AbstractTestRunnerStatement {
public ActualTestRunnerStatement(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;";
}
}