8000 Some more params of TestRunner handeled · utPLSQL/utPLSQL-java-api@4aba265 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4aba265

Browse files
committed
Some more params of TestRunner handeled
1 parent 4f591ef commit 4aba265

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

src/main/java/org/utplsql/api/testRunner/DynamicTestRunnerStatement.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ private DynamicParameterList initParameterList() throws SQLException {
5151
*/
5252
return DynamicParameterList.builder()
5353
.addIfNotEmpty("a_paths", options.pathList.toArray(), CustomTypes.UT_VARCHAR2_LIST, oracleConnection)
54+
.addIfNotEmpty("a_reporters", options.reporterList.toArray(), CustomTypes.UT_REPORTERS, oracleConnection)
5455
.build();
5556
}
5657

src/test/java/org/utplsql/api/testRunner/DynamicTestRunnerStatementTest.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,33 @@ void explore() throws SQLException {
2828
DynamicTestRunnerStatement testRunnerStatement = DynamicTestRunnerStatement
2929
.forVersion(Version.V3_1_7, oracleConnection, options, callableStatement);
3030

31+
/*
32+
"ut_runner.run(" +
33+
"a_paths => ?, " +
34+
"a_reporters => ?, " +
35+
"a_color_console => " + colorConsoleStr + ", " +
36+
"a_coverage_schemes => ?, " +
37+
"a_source_file_mappings => ?, " +
38+
"a_test_file_mappings => ?, " +
39+
"a_include_objects => ?, " +
40+
"a_exclude_objects => ?, " +
41+
"a_fail_on_errors => " + failOnErrors + ", " +
42+
"a_client_character_set => ?, " +
43+
"a_random_test_order => " + randomExecutionOrder + ", " +
44+
"a_random_test_order_seed => ?, "+
45+
"a_tags => ?"+
46+
"); " +
47+
"END;";
48+
*/
3149
assertThat(testRunnerStatement.getSql(), containsString("a_paths => ?"));
50+
verify(callableStatement).setArray(1, null);
51+
verify(oracleConnection).createOracleArray(CustomTypes.UT_VARCHAR2_LIST, options.pathList.toArray());
52+
53+
assertThat(testRunnerStatement.getSql(), containsString("a_reporters => ?"));
54+
verify(callableStatement).setArray(2, null);
55+
verify(oracleConnection).createOracleArray(CustomTypes.UT_REPORTERS, options.reporterList.toArray());
3256

57+
assertThat(testRunnerStatement.getSql(), containsString("a_color_console => (case ? when 1 then true else false)"));
3358
verify(callableStatement).setArray(1, null);
3459
verify(oracleConnection).createOracleArray(CustomTypes.UT_VARCHAR2_LIST, options.pathList.toArray());
3560
}

0 commit comments

Comments
 (0)
0