diff --git a/src/main/resources/META-INF/rewrite/junit5.yml b/src/main/resources/META-INF/rewrite/junit5.yml index 6af44b76f..97f66841d 100755 --- a/src/main/resources/META-INF/rewrite/junit5.yml +++ b/src/main/resources/META-INF/rewrite/junit5.yml @@ -131,7 +131,7 @@ tags: - junit - mockito recipeList: - - org.openrewrite.java.testing.mockito.Mockito1to3Migration + - org.openrewrite.java.testing.mockito.Mockito1to4Migration - org.openrewrite.java.testing.mockito.MockitoJUnitRunnerSilentToExtension - org.openrewrite.java.testing.junit5.RunnerToExtension: runners: diff --git a/src/main/resources/META-INF/rewrite/mockito.yml b/src/main/resources/META-INF/rewrite/mockito.yml index 18526027c..40d04e198 100644 --- a/src/main/resources/META-INF/rewrite/mockito.yml +++ b/src/main/resources/META-INF/rewrite/mockito.yml @@ -15,14 +15,18 @@ # --- type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.testing.mockito.Mockito3to4Migration -displayName: Mockito 4.x migration from 3.x -description: Upgrade Mockito from 3.x to 4.x. +name: org.openrewrite.java.testing.mockito.Mockito1to4Migration +displayName: Mockito 4.x upgrade +description: Upgrade Mockito from 1.x to 4.x. tags: - testing - mockito recipeList: - org.openrewrite.java.testing.mockito.Mockito1to3Migration + - org.openrewrite.maven.UpgradeDependency: + groupId: org.mockito + artifactId: mockito-junit-jupiter + version: 4.x --- type: specs.openrewrite.org/v1beta/recipe name: org.openrewrite.java.testing.mockito.Mockito1to3Migration diff --git a/src/test/kotlin/org/openrewrite/java/testing/mockito/JunitMockitoUpgradeIntegrationTest.kt b/src/test/kotlin/org/openrewrite/java/testing/mockito/JunitMockitoUpgradeIntegrationTest.kt index 7c8db3263..4165553c3 100755 --- a/src/test/kotlin/org/openrewrite/java/testing/mockito/JunitMockitoUpgradeIntegrationTest.kt +++ b/src/test/kotlin/org/openrewrite/java/testing/mockito/JunitMockitoUpgradeIntegrationTest.kt @@ -24,7 +24,7 @@ import org.openrewrite.java.JavaRecipeTest /** * Validates the recipes related to upgrading from Mockito 1 to Mockito 3 */ -@Suppress("unchecked") +@Suppress("unchecked", "NotNullFieldNotInitialized", "NewClassNamingConvention") class JunitMockitoUpgradeIntegrationTest : JavaRecipeTest { override val parser: JavaParser = JavaParser.fromJavaVersion() .classpath("mockito-all", "junit", "hamcrest") @@ -34,8 +34,7 @@ class JunitMockitoUpgradeIntegrationTest : JavaRecipeTest { .scanRuntimeClasspath("org.openrewrite.java.testing.junit5") .build() .activateRecipes( - "org.openrewrite.java.testing.junit5.JUnit4to5Migration", - "org.openrewrite.java.testing.mockito.Mockito1to3Migration" + "org.openrewrite.java.testing.junit5.JUnit4to5Migration" ) /**