All Classes and Interfaces
Classes
Class
Description
An OpenRewrite recipe that migrates JUnit 4 Testcontainers
@Rule or @ClassRule
fields to JUnit 5's @Container and adds the @Testcontainers annotation to the
class if necessary.Replace Mockito 1.x `anyString()` with `nullable(String.class)`
In Kotlin files, when both
import org.junit.jupiter.api.* and static imports from
org.junit.jupiter.api.Assertions are present, the Kotlin compiler cannot resolve
which assertion method to use due to ambiguity between the Java static methods and the
Kotlin extension functions.Ensures that all mockStatic calls are properly closed.
A 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.
Wraps `MockedConstruction` variable declarations with explicit `.close()` calls
into try-with-resources blocks, removing the explicit close call.
Deprecated.
Use MockitoJUnitRunnerToExtension instead.
Replaces JUnit 4 MockitoJUnit rules with JUnit MockitoExtension.
In Mockito 1 you use a code snippet like:
Recipe for converting JUnit 4 okhttp3 MockWebServer Rules with their JUnit 5 equivalent.