diff --git a/src/main/java/org/openrewrite/java/testing/junit5/GradleUseJunitJupiter.java b/src/main/java/org/openrewrite/java/testing/junit5/GradleUseJunitJupiter.java index 49eee80d6..995408803 100644 --- a/src/main/java/org/openrewrite/java/testing/junit5/GradleUseJunitJupiter.java +++ b/src/main/java/org/openrewrite/java/testing/junit5/GradleUseJunitJupiter.java @@ -143,7 +143,7 @@ public J.MethodInvocation visitMethodInvocation(J.MethodInvocation method, Execu private static class AddUseJUnitPlatform extends GroovyIsoVisitor { @Override - public G.CompilationUnit visitCompilationUnit(G.CompilationUnit cu, ExecutionContext executionContext) { + public G.CompilationUnit visitCompilationUnit(G.CompilationUnit cu, ExecutionContext ctx) { G.CompilationUnit template = GradleParser.builder() .build() .parse("plugins {\n" + diff --git a/src/test/java/org/openrewrite/java/testing/junit5/GradleUseJunitJupiterTest.java b/src/test/java/org/openrewrite/java/testing/junit5/GradleUseJunitJupiterTest.java index 80610f3c8..6fc646912 100644 --- a/src/test/java/org/openrewrite/java/testing/junit5/GradleUseJunitJupiterTest.java +++ b/src/test/java/org/openrewrite/java/testing/junit5/GradleUseJunitJupiterTest.java @@ -16,13 +16,14 @@ package org.openrewrite.java.testing.junit5; import org.junit.jupiter.api.Test; +import org.openrewrite.DocumentExample; import org.openrewrite.test.RecipeSpec; import org.openrewrite.test.RewriteTest; import static org.openrewrite.gradle.Assertions.buildGradle; import static org.openrewrite.gradle.toolingapi.Assertions.withToolingApi; -public class GradleUseJunitJupiterTest implements RewriteTest { +class GradleUseJunitJupiterTest implements RewriteTest { @Override public void defaults(RecipeSpec spec) { @@ -30,6 +31,7 @@ public void defaults(RecipeSpec spec) { .beforeRecipe(withToolingApi()); } + @DocumentExample @Test void addWhenMissing() { rewriteRun( @@ -59,7 +61,7 @@ void addWhenMissing() { } @Test - void testDsl() { + void dsl() { rewriteRun( //language=groovy buildGradle( @@ -83,7 +85,7 @@ void testDsl() { } @Test - void testDslAlreadyExists() { + void dslAlreadyExists() { rewriteRun( //language=groovy buildGradle(