Skip to content

Commit

Permalink
Include ReplacePowerMockito with Mockito1to3Migration again (#602)
Browse files Browse the repository at this point in the history
* Include `ReplacePowerMockito` with `Mockito1to3Migration` again

* Drop `Mockito1to5Migration` from `ReplacePowerMockito`

* Update description for ReplacePowerMockito

* Look across all resource files for recipes
  • Loading branch information
timtebeek authored Sep 13, 2024
1 parent 52f5318 commit 251f882
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/main/resources/META-INF/rewrite/mockito.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions src/main/resources/META-INF/rewrite/powermockito.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 251f882

Please sign in to comment.