diff --git a/src/test/java/org/openrewrite/java/testing/junit5/JUnit5MigrationTest.java b/src/test/java/org/openrewrite/java/testing/junit5/JUnit5MigrationTest.java index 022b61840..c9afa5678 100644 --- a/src/test/java/org/openrewrite/java/testing/junit5/JUnit5MigrationTest.java +++ b/src/test/java/org/openrewrite/java/testing/junit5/JUnit5MigrationTest.java @@ -145,12 +145,7 @@ void upgradeMavenPluginVersions() { """, spec -> spec.after(actual -> { - List list = Pattern.compile("(.*)") - .matcher(actual).results().skip(1).toList(); - assertThat(list) - .hasSize(2) - .extracting(mr -> mr.group(1)) - .allMatch(m -> m.startsWith("3.")); + assertThat(Pattern.compile("3\\.(.*)").matcher(actual).results().toList()).hasSize(2); return actual; }) ) @@ -175,6 +170,22 @@ void dontExcludeJunit4DependencyfromTestcontainers() { test + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.2.5 + + + org.junit.platform + junit-platform-surefire-provider + 1.1.0 + + + + + """; // Output identical, but we want to make sure we don't exclude junit4 from testcontainers @@ -218,6 +229,22 @@ void dontExcludeJunit4DependencyfromSpringBootTestcontainers() { test + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.2.5 + + + org.junit.platform + junit-platform-surefire-provider + 1.1.0 + + + + + """; // Output identical, but we want to make sure we don't exclude junit4 from testcontainers @@ -371,6 +398,22 @@ void noJunitDependencyIfApiAlreadyPresent() { test + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.2.5 + + + org.junit.platform + junit-platform-surefire-provider + 1.1.0 + + + + + """) );