Skip to content

Commit e13c192

Browse files
committed
Added assertion
1 parent 4df068f commit e13c192

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

src/test/java/org/utplsql/maven/plugin/UtPLSQLMojoTest.java

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,40 @@
22

33
import org.apache.maven.plugin.MojoExecutionException;
44
import org.apache.maven.project.MavenProject;
5+
import org.junit.BeforeClass;
56
import org.junit.Test;
67
import org.utplsql.api.reporter.CoreReporters;
78
import org.utplsql.maven.plugin.model.ReporterParameter;
89

10+
import java.io.File;
11+
12+
import static org.junit.Assert.assertTrue;
13+
914
public 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
}

0 commit comments

Comments
 (0)