Skip to content

Commit bd7798c

Browse files
committed
Renamed test
1 parent 0c36e59 commit bd7798c

1 file changed

Lines changed: 27 additions & 1 deletion

File tree

src/test/java/org/utplsql/maven/plugin/UtPLSQLMojoTest.java renamed to src/test/java/org/utplsql/maven/plugin/ReportWriterTest.java

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
import static org.junit.Assert.assertTrue;
1313

14-
public class UtPLSQLMojoTest {
14+
public class ReportWriterTest {
1515

1616
private static UtPLSQLMojo utPLSQLMojo;
1717

@@ -73,4 +73,30 @@ public void parentDoesNotExist() throws MojoExecutionException {
7373

7474
assertTrue(new File("target/not-exist/junit-report.xml").exists());
7575
}
76+
77+
@Test
78+
public void onlyConsoleOutput() throws MojoExecutionException {
79+
ReporterParameter junitReporter = new ReporterParameter();
80+
junitReporter.setConsoleOutput(true);
81+
junitReporter.setName(CoreReporters.UT_JUNIT_REPORTER.name());
82+
utPLSQLMojo.reporters.add(junitReporter);
83+
84+
utPLSQLMojo.execute();
85+
86+
assertTrue(new File("target/not-exist/junit-report.xml").exists());
87+
}
88+
89+
@Test
90+
public void onlyFileOutput() throws MojoExecutionException {
91+
ReporterParameter junitReporter = new ReporterParameter();
92+
junitReporter.setConsoleOutput(false);
93+
junitReporter.setFileOutput("not-exist/junit-report.xml");
94+
junitReporter.setName(CoreReporters.UT_JUNIT_REPORTER.name());
95+
utPLSQLMojo.reporters.add(junitReporter);
96+
97+
utPLSQLMojo.execute();
98+
99+
assertTrue(new File("target/not-exist/junit-report.xml").exists());
100+
}
101+
76102
}

0 commit comments

Comments
 (0)