Skip to content

Commit f2e1e01

Browse files
committed
Two more parameters in the new DynamicStatement
1 parent b3d5779 commit f2e1e01

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ private DynamicParameterList initParameterList() throws SQLException {
5252
return DynamicParameterList.builder()
5353
.addIfNotEmpty("a_paths", options.pathList.toArray(), CustomTypes.UT_VARCHAR2_LIST, oracleConnection)
5454
.addIfNotEmpty("a_reporters", options.reporterList.toArray(), CustomTypes.UT_REPORTERS, oracleConnection)
55+
.addIfNotEmpty("a_color_console", options.colorConsole)
56+
.addIfNotEmpty("a_coverage_schemes", options.coverageSchemes.toArray(), CustomTypes.UT_VARCHAR2_LIST, oracleConnection)
5557
.build();
5658
}
5759

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,12 @@ void explore() throws SQLException {
5555
verify(oracleConnection).createOracleArray(CustomTypes.UT_REPORTERS, options.reporterList.toArray());
5656

5757
assertThat(testRunnerStatement.getSql(), containsString("a_color_console => (case ? when 1 then true else false)"));
58-
verify(callableStatement).setArray(1, null);
59-
verify(oracleConnection).createOracleArray(CustomTypes.UT_VARCHAR2_LIST, options.pathList.toArray());
58+
verify(callableStatement).setInt(3, 0);
59+
60+
assertThat(testRunnerStatement.getSql(), containsString("a_coverage_schemes => ?"));
61+
verify(callableStatement).setArray(4, null);
62+
verify(oracleConnection).createOracleArray(CustomTypes.UT_VARCHAR2_LIST, options.coverageSchemes.toArray());
63+
64+
6065
}
6166
}

0 commit comments

Comments
 (0)