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 22
33import org .apache .maven .plugin .MojoExecutionException ;
44import org .apache .maven .project .MavenProject ;
5+ import org .junit .BeforeClass ;
56import org .junit .Test ;
67import org .utplsql .api .reporter .CoreReporters ;
78import org .utplsql .maven .plugin .model .ReporterParameter ;
89
10+ import java .io .File ;
11+
12+ import static org .junit .Assert .assertTrue ;
13+
914public class UtPLSQLMojoTest {
1015
11- @ Test
12- public void execute () throws MojoExecutionException {
13- UtPLSQLMojo utPLSQLMojo = new UtPLSQLMojo ();
16+ private static UtPLSQLMojo utPLSQLMojo ;
17+
18+ @ BeforeClass
19+ public static void setUp () {
20+ utPLSQLMojo = new UtPLSQLMojo ();
1421 utPLSQLMojo .project = new MavenProject ();
1522 utPLSQLMojo .targetDir = "target" ;
1623
1724 utPLSQLMojo .url = "jdbc:oracle:thin:@127.0.0.1:1521:XE" ;
1825 utPLSQLMojo .user = "UT3" ;
1926 utPLSQLMojo .password = "UT3" ;
27+ }
2028
29+ @ Test
30+ public void junitReporter () throws MojoExecutionException {
2131 ReporterParameter junitReporter = new ReporterParameter ();
2232 junitReporter .setConsoleOutput (true );
2333 junitReporter .setFileOutput ("junit-report.xml" );
2434 junitReporter .setName (CoreReporters .UT_JUNIT_REPORTER .name ());
2535 utPLSQLMojo .reporters .add (junitReporter );
2636
2737 utPLSQLMojo .execute ();
38+
39+ assertTrue (new File ("target/junit-report.xml" ).exists ());
2840 }
2941}
You can’t perform that action at this time.
0 commit comments