Package org.openrewrite.java.testing.junit5
@NullMarked
@NonNullFields
package org.openrewrite.java.testing.junit5
-
ClassesClassDescriptionA recipe to replace JUnit 4's EnvironmentVariables rule from contrib with the JUnit 5-compatible `SystemStubsExtension` and `EnvironmentVariables` from the System Stubs library.Replace usages of JUnit 4's @Rule ExpectedException with JUnit 5 Assertions.A recipe that handles the usage of the junit-4 ExternalResourceRule's by adding the @ExtendWith(ExternalResourceSupport.class) annotation to the test class.Converts Pragmatists JUnitParamsRunner tests to their JUnit 5 ParameterizedTest and associated MethodSource equivalent ... Supports the following conversions `@Parameters` annotation without arguments and default `parametersFor...` init-method exists `@Parameters(method = "...")` annotation with defined method references `@Parameters(named = "...")` and associated `@NamedParameter` init-method Unsupported tests are identified with a comment on the associated `@Parameters(...)` annotation.Replaces JUnit 4 MockitoJUnit rules with JUnit MockitoExtension.Recipe for converting JUnit 4 okhttp3 MockWebServer Rules with their JUnit 5 equivalent.