Skip to content

Commit dd7822d

Browse files
committed
Changed from List to varargs on RunTests method and added default values to RunTestsWithCoverage
1 parent af5cd5c commit dd7822d

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

utPLSQL.Api/utPLSQL.Api.Test/RealTimeTestRunnerTest.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public void TestRunTests()
1414
var testRunner = new RealTimeTestRunner();
1515
testRunner.Connect(username: "toscamtest", password: "toscamtest", database: "CA40");
1616

17-
testRunner.RunTests(paths: new List<string>() { "toscamtest" });
17+
testRunner.RunTests(paths: "toscamtest");
1818

1919
var events = new List<@event>();
2020
testRunner.ConsumeResult(@event =>
@@ -34,8 +34,7 @@ public void TestRunTestsWithCoverage()
3434

3535
testRunner.RunTestsWithCoverage(paths: new List<string>() { "toscamtest" },
3636
coverageSchemas: new List<string>() { "toscam" },
37-
includeObjects: new List<string>() { "pa_m720", "pa_m770" },
38-
excludeObjects: null);
37+
includeObjects: new List<string>() { "pa_m720", "pa_m770" });
3938

4039
var events = new List<@event>();
4140
testRunner.ConsumeResult(@event =>

utPLSQL.Api/utPLSQL.Api/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.3.0.0")]
36-
[assembly: AssemblyFileVersion("1.3.0.0")]
35+
[assembly: AssemblyVersion("1.4.0.0")]
36+
[assembly: AssemblyFileVersion("1.4.0.0")]

utPLSQL.Api/utPLSQL.Api/RealTimeTestRunner.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ namespace utPLSQL
1212
/// </summary>
1313
public class RealTimeTestRunner : TestRunner<@event>
1414
{
15-
public override void RunTests(List<string> paths)
15+
public override void RunTests(params string[] paths)
1616
{
17-
if (paths != null && paths.Count > 0)
17+
if (paths != null && paths.Length > 0)
1818
{
1919
realtimeReporterId = Guid.NewGuid().ToString().Replace("-", "");
2020

@@ -23,7 +23,7 @@ public override void RunTests(List<string> paths)
2323
BEGIN
2424
l_reporter.set_reporter_id(:id);
2525
l_reporter.output_buffer.init();
26-
ut_runner.run(a_paths => ut_varchar2_list({ConvertToUtVarchar2List(paths)}),
26+
ut_runner.run(a_paths => ut_varchar2_list({ConvertToUtVarchar2List(new List<string>(paths))}),
2727
a_reporters => ut_reporters(l_reporter));
2828
END;";
2929

@@ -33,7 +33,7 @@ public override void RunTests(List<string> paths)
3333
}
3434
}
3535

36-
public override void RunTestsWithCoverage(List<string> paths, List<string> coverageSchemas, List<string> includeObjects, List<string> excludeObjects)
36+
public override void RunTestsWithCoverage(List<string> paths, List<string> coverageSchemas = null, List<string> includeObjects = null, List<string> excludeObjects = null)
3737
{
3838
if (paths != null && paths.Count > 0)
3939
{

utPLSQL.Api/utPLSQL.Api/TestRunner.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ public String GetVersion()
6161
/// <summary>
6262
/// Run tests
6363
/// </summary>
64-
/// <param name="paths">List of path expressions</param>
65-
public abstract void RunTests(List<string> paths);
64+
/// <param name="paths">Path expressions</param>
65+
public abstract void RunTests(params string[] paths);
6666

6767
/// <summary>
6868
/// Run tests with coveage
@@ -71,7 +71,7 @@ public String GetVersion()
7171
/// <param name="coverageSchemas">List of schemas to cover</param>
7272
/// <param name="includeObjects">List of objects to include</param>
7373
/// <param name="excludeObjects">List of objects to exclude</param>
74-
public abstract void RunTestsWithCoverage(List<string> paths, List<string> coverageSchemas, List<string> includeObjects, List<string> excludeObjects);
74+
public abstract void RunTestsWithCoverage(List<string> paths, List<string> coverageSchemas = null, List<string> includeObjects = null, List<string> excludeObjects = null);
7575

7676
/// <summary>
7777
/// Consumes the results and calls the callback action on each result

utPLSQL.Api/utPLSQL.Api/utPLSQL.Api.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package >
33
<metadata>
44
<id>utPLSQL.Api</id>
5-
<version>1.3.0</version>
5+
<version>1.4.0</version>
66
<title>utPLSQL API</title>
77
<authors>Simon Martinelli</authors>
88
<requireLicenseAcceptance>false</requireLicenseAcceptance>

0 commit comments

Comments
 (0)