JUnit 4 @RunWith to JUnit Jupiter @ExtendWith

MSAL

Replace runners with the JUnit Jupiter extension equivalent.

org.openrewrite.java.testing.junit5.RunnerToExtension

Required

The fully qualified class names of the JUnit 4 runners to replace. Sometimes several runners are replaced by a single JUnit Jupiter extension. Separate values with commas.

The fully qualified class names of the JUnit Jupiter extension.

mod run . --recipe=org.openrewrite.java.testing.junit5.RunnerToExtension \ -P runners='[ org.springframework.test.context.junit4.SpringRunner ]' \ -P extension=org.springframework.test.context.junit.jupiter.SpringExtension

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.