diff --git a/src/main/resources/META-INF/rewrite/mockito.yml b/src/main/resources/META-INF/rewrite/mockito.yml index 49a5b193a..fd6028729 100644 --- a/src/main/resources/META-INF/rewrite/mockito.yml +++ b/src/main/resources/META-INF/rewrite/mockito.yml @@ -151,8 +151,7 @@ recipeList: - org.openrewrite.java.testing.mockito.CleanupMockitoImports - org.openrewrite.java.testing.mockito.MockUtilsToStatic - org.openrewrite.java.testing.junit5.MockitoJUnitToMockitoExtension - # https://github.com/openrewrite/rewrite-testing-frameworks/issues/360 - # - org.openrewrite.java.testing.mockito.ReplacePowerMockito + - org.openrewrite.java.testing.mockito.ReplacePowerMockito - org.openrewrite.java.testing.mockito.RetainStrictnessWarn - org.openrewrite.java.dependencies.AddDependency: groupId: org.mockito diff --git a/src/main/resources/META-INF/rewrite/powermockito.yml b/src/main/resources/META-INF/rewrite/powermockito.yml index 79aa8d35f..c27c80d7e 100644 --- a/src/main/resources/META-INF/rewrite/powermockito.yml +++ b/src/main/resources/META-INF/rewrite/powermockito.yml @@ -18,12 +18,11 @@ type: specs.openrewrite.org/v1beta/recipe name: org.openrewrite.java.testing.mockito.ReplacePowerMockito displayName: Replace PowerMock with raw Mockito -description: Upgrade to Mockito 5 and replace PowerMockito with raw Mockito. +description: PowerMockito with raw Mockito; best executed as part of a Mockito upgrade. tags: - testing - mockito recipeList: - - org.openrewrite.java.testing.mockito.Mockito1to5Migration - org.openrewrite.java.RemoveAnnotation: annotationPattern: "@org.powermock.core.classloader.annotations.PowerMockIgnore" - org.openrewrite.java.ChangeMethodTargetToStatic: diff --git a/src/test/java/org/openrewrite/java/testing/mockito/RemoveMockitoSettingsTest.java b/src/test/java/org/openrewrite/java/testing/mockito/RemoveMockitoSettingsTest.java index 92a177991..b0f3cbe98 100644 --- a/src/test/java/org/openrewrite/java/testing/mockito/RemoveMockitoSettingsTest.java +++ b/src/test/java/org/openrewrite/java/testing/mockito/RemoveMockitoSettingsTest.java @@ -32,7 +32,7 @@ public void defaults(RecipeSpec spec) { .parser(JavaParser.fromJavaVersion() .classpathFromResources(new InMemoryExecutionContext(), "mockito-core", "mockito-junit-jupiter", "junit-jupiter-api")) - .recipeFromResource("/META-INF/rewrite/mockito.yml", "org.openrewrite.java.testing.mockito.MockitoBestPractices"); + .recipeFromResources("org.openrewrite.java.testing.mockito.MockitoBestPractices"); } @Test