File tree Expand file tree Collapse file tree
src/test/java/org/utplsql/maven/plugin Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111
1212import 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}
You can’t perform that action at this time.
0 commit comments