Skip to content

Commit

Permalink
Add JUnit 5.11.0 integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
sormuras committed Nov 27, 2024
1 parent 4798ba0 commit 27588f5
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
37 changes: 37 additions & 0 deletions src/it/jupiter-5.11.0-platform-1.11.0/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>it</groupId>
<artifactId>setup</artifactId>
<version>0</version>
</parent>

<artifactId>jupiter-5.11.0-platform-1.11.0</artifactId>

<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.11.0</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>@project.groupId@</groupId>
<artifactId>@project.artifactId@</artifactId>
<configuration>
<versions>
<!-- Help to auto-detection of versions, by setting them here. -->
<junit.vintage.version>5.11.0</junit.vintage.version>
</versions>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import org.junit.jupiter.api.Test;

class Tests {

@Test
void test() {}
}
31 changes: 31 additions & 0 deletions src/it/jupiter-5.11.0-platform-1.11.0/verify.bsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import it.Verifier;
import it.Verifier;

Verifier verifier = new Verifier(basedir.toPath());

verifier.verifyBadLines();

verifier.verifyReadable(new String[] {
"pom.xml",
"src/test/java/Tests.java",
"target/test-classes/Tests.class"
});

verifier.verifyNotExists(new String[] {
"target/classes",
"target/surefire-reports"
});

verifier.verifyLogMatches(new String[] {
">> BEGIN >>",
"[INFO] Launching JUnit Platform 1.11.0...",
">> Plugin setup... >>",
"[DEBUG] junit.platform.version = 1.11.0",
"[DEBUG] junit.jupiter.version = 5.11.0",
"[DEBUG] junit.vintage.version = 5.11.0",
">> Platform executes tests...>>",
"[INFO] BUILD SUCCESS",
">> END. >>"
});

return verifier.isOk();

0 comments on commit 27588f5

Please sign in to comment.