Skip to content

Commit 8a9b66f

Browse files
committed
Api package changes
1 parent 4f14802 commit 8a9b66f

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

src/main/java/io/github/utplsql/cli/ReporterOptions.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package io.github.utplsql.cli;
22

3-
import io.github.utplsql.api.types.BaseReporter;
3+
import io.github.utplsql.api.reporter.Reporter;
44

55
/**
66
* Created by Vinicius on 20/05/2017.
@@ -12,7 +12,7 @@ public class ReporterOptions {
1212
private boolean outputToScreen;
1313
private boolean forceOutputToScreen;
1414

15-
private BaseReporter reporterObj = null;
15+
private Reporter reporterObj = null;
1616

1717
public ReporterOptions(String reporterName, String outputFileName, boolean outputToScreen) {
1818
setReporterName(reporterName);
@@ -25,11 +25,11 @@ public ReporterOptions(String reporterName) {
2525
this(reporterName, null, true);
2626
}
2727

28-
public BaseReporter getReporterObj() {
28+
public Reporter getReporterObj() {
2929
return reporterObj;
3030
}
3131

32-
public void setReporterObj(BaseReporter reporterObj) {
32+
public void setReporterObj(Reporter reporterObj) {
3333
this.reporterObj = reporterObj;
3434
}
3535

src/main/java/io/github/utplsql/cli/RunCommand.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
import com.beust.jcommander.Parameter;
44
import com.beust.jcommander.Parameters;
5+
import io.github.utplsql.api.CustomTypes;
56
import io.github.utplsql.api.OutputBuffer;
67
import io.github.utplsql.api.TestRunner;
7-
import io.github.utplsql.api.types.BaseReporter;
8-
import io.github.utplsql.api.types.CustomTypes;
8+
import io.github.utplsql.api.reporter.Reporter;
9+
import io.github.utplsql.api.reporter.ReporterFactory;
910

1011
import java.io.FileNotFoundException;
1112
import java.io.FileOutputStream;
@@ -83,15 +84,15 @@ public void run() throws Exception {
8384
System.out.println("Running Tests For: " + ci.toString());
8485

8586
final List<ReporterOptions> reporterOptionsList = getReporterOptionsList();
86-
final List<BaseReporter> reporterList = new ArrayList<>();
87+
final List<Reporter> reporterList = new ArrayList<>();
8788
final List<String> testPaths = getTestPaths();
8889

8990
if (testPaths.isEmpty()) testPaths.add(ci.getUser());
9091

9192
// Do the reporters initialization, so we can use the id to run and gather results.
9293
try (Connection conn = ci.getConnection()) {
9394
for (ReporterOptions ro : reporterOptionsList) {
94-
BaseReporter reporter = CustomTypes.createReporter(ro.getReporterName());
95+
Reporter reporter = ReporterFactory.createReporter(ro.getReporterName());
9596
reporter.init(conn);
9697
ro.setReporterObj(reporter);
9798
reporterList.add(reporter);

src/test/java/io/github/utplsql/cli/RunCommandTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package io.github.utplsql.cli;
22

33
import com.beust.jcommander.JCommander;
4-
import io.github.utplsql.api.types.CustomTypes;
4+
import io.github.utplsql.api.CustomTypes;
55
import org.junit.Assert;
66
import org.junit.Test;
77

@@ -38,7 +38,7 @@ public void reporterOptions_Default() {
3838

3939
@Test
4040
public void reporterOptions_OneReporter() {
41-
RunCommand runCmd = createCommand("run", "app/app@docker/xe", "-f=ut_documentation_reporter", "-o=output.txt");
41+
RunCommand runCmd = createCommand("run", "app/app", "-f=ut_documentation_reporter", "-o=output.txt");
4242

4343
List<ReporterOptions> reporterOptionsList = runCmd.getReporterOptionsList();
4444

@@ -51,7 +51,7 @@ public void reporterOptions_OneReporter() {
5151

5252
@Test
5353
public void reporterOptions_OneReporterForceScreen() {
54-
RunCommand runCmd = createCommand("run", "app/app@docker/xe", "-f=ut_documentation_reporter", "-o=output.txt", "-s");
54+
RunCommand runCmd = createCommand("run", "app/app", "-f=ut_documentation_reporter", "-o=output.txt", "-s");
5555

5656
List<ReporterOptions> reporterOptionsList = runCmd.getReporterOptionsList();
5757

@@ -64,7 +64,7 @@ public void reporterOptions_OneReporterForceScreen() {
6464

6565
@Test
6666
public void reporterOptions_OneReporterForceScreenInverse() {
67-
RunCommand runCmd = createCommand("run", "app/app@docker/xe", "-f=ut_documentation_reporter", "-s", "-o=output.txt");
67+
RunCommand runCmd = createCommand("run", "app/app", "-f=ut_documentation_reporter", "-s", "-o=output.txt");
6868

6969
List<ReporterOptions> reporterOptionsList = runCmd.getReporterOptionsList();
7070

@@ -77,7 +77,7 @@ public void reporterOptions_OneReporterForceScreenInverse() {
7777

7878
@Test
7979
public void reporterOptions_TwoReporters() {
80-
RunCommand runCmd = createCommand("run", "app/app@docker/xe",
80+
RunCommand runCmd = createCommand("run", "app/app",
8181
"-f=ut_documentation_reporter",
8282
"-f=ut_coverage_html_reporter", "-o=coverage.html", "-s");
8383

0 commit comments

Comments
 (0)