Skip to content

Commit 07d00f7

Browse files
timtebeeksteve-aom-elliott
authored andcommitted
Only pass testng dependency into the single test that needs it
1 parent 513fede commit 07d00f7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/test/java/org/openrewrite/java/testing/junit5/JUnit5MigrationTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class JUnit5MigrationTest implements RewriteTest {
4141
public void defaults(RecipeSpec spec) {
4242
spec
4343
.parser(JavaParser.fromJavaVersion()
44-
.classpathFromResources(new InMemoryExecutionContext(), "junit-4", "testng"))
44+
.classpathFromResources(new InMemoryExecutionContext(), "junit-4"))
4545
.recipe(Environment.builder()
4646
.scanRuntimeClasspath("org.openrewrite.java.testing.junit5")
4747
.build()
@@ -703,6 +703,9 @@ public void testMethod() {}
703703
@Test
704704
void noChangesIfTestNgCassIncluded() {
705705
rewriteRun(
706+
spec -> spec
707+
.parser(JavaParser.fromJavaVersion()
708+
.classpathFromResources(new InMemoryExecutionContext(), "junit-4", "testng")),
706709
//language=java
707710
java(
708711
"""

0 commit comments

Comments
 (0)