@@ -3396,6 +3396,43 @@ examples:
33963396 language: java
33973397 ---
33983398type : specs.openrewrite.org/v1beta/example
3399+ recipeName : org.openrewrite.java.testing.junit6.MigrateMethodOrdererAlphanumeric
3400+ examples :
3401+ - description : ' '
3402+ sources :
3403+ - before : |
3404+ import org.junit.jupiter.api.MethodOrderer;
3405+ import org.junit.jupiter.api.TestMethodOrder;
3406+ import org.junit.jupiter.api.Test;
3407+
3408+ @TestMethodOrder(MethodOrderer.Alphanumeric.class)
3409+ class MyTest {
3410+ @Test
3411+ void test1() {
3412+ }
3413+
3414+ @Test
3415+ void test2() {
3416+ }
3417+ }
3418+ after: |
3419+ import org.junit.jupiter.api.MethodOrderer;
3420+ import org.junit.jupiter.api.TestMethodOrder;
3421+ import org.junit.jupiter.api.Test;
3422+
3423+ @TestMethodOrder(MethodOrderer.MethodName.class)
3424+ class MyTest {
3425+ @Test
3426+ void test1() {
3427+ }
3428+
3429+ @Test
3430+ void test2() {
3431+ }
3432+ }
3433+ language: java
3434+ ---
3435+ type : specs.openrewrite.org/v1beta/example
33993436recipeName : org.openrewrite.java.testing.junit6.MinimumJreConditions
34003437examples :
34013438- description : ' '
@@ -3477,6 +3514,47 @@ examples:
34773514 language: java
34783515 ---
34793516type : specs.openrewrite.org/v1beta/example
3517+ recipeName : org.openrewrite.java.testing.junit6.RemoveInterceptDynamicTest
3518+ examples :
3519+ - description : ' '
3520+ sources :
3521+ - before : |
3522+ import org.junit.jupiter.api.extension.ExtensionContext;
3523+ import org.junit.jupiter.api.extension.InvocationInterceptor;
3524+ import org.junit.jupiter.api.extension.ReflectiveInvocationContext;
3525+
3526+ class MyInterceptor implements InvocationInterceptor {
3527+ @Override
3528+ public void interceptDynamicTest(Invocation<Void> invocation, ExtensionContext extensionContext) throws Throwable {
3529+ System.out.println("Before dynamic test");
3530+ invocation.proceed();
3531+ System.out.println("After dynamic test");
3532+ }
3533+
3534+ @Override
3535+ public void interceptTestMethod(Invocation<Void> invocation, ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext) throws Throwable {
3536+ invocation.proceed();
3537+ }
3538+
3539+ private static class Method {}
3540+ }
3541+ after: |
3542+ import org.junit.jupiter.api.extension.ExtensionContext;
3543+ import org.junit.jupiter.api.extension.InvocationInterceptor;
3544+ import org.junit.jupiter.api.extension.ReflectiveInvocationContext;
3545+
3546+ class MyInterceptor implements InvocationInterceptor {
3547+
3548+ @Override
3549+ public void interceptTestMethod(Invocation<Void> invocation, ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext) throws Throwable {
3550+ invocation.proceed();
3551+ }
3552+
3553+ private static class Method {}
3554+ }
3555+ language: java
3556+ ---
3557+ type : specs.openrewrite.org/v1beta/example
34803558recipeName : org.openrewrite.java.testing.mockito.CleanupMockitoImports
34813559examples :
34823560- description : ' '
0 commit comments