All Classes
-
Class Summary Class Description AssertToAssertions Change JUnit4's org.junit.Assert into JUnit5's org.junit.jupiter.api.Assertions The most significant difference between these classes is that in JUnit4 the optional String message is the first parameter, and the JUnit5 versions have the optional message as the final parameterAssertToAssertions.AssertToAssertionsVisitor CategoryToTag Transforms the Junit4 @Category, which can list multiple categories, into one @Tag annotation per category listedCategoryToTag.CategoryToTagVisitor CleanupJUnitImports Orders imports and removes unused imports from classes which import symbols from the "org.junit" package.CleanupJUnitImports.CleanupJUnitImportsVisitor CleanupMockitoImports Orders imports and removes unused imports from classes which import symbols from the "org.mockito" package.CleanupMockitoImports.CleanupMockitoImportsVisitor ExpectedExceptionToAssertThrows Replace usages of JUnit 4's @Rule ExpectedException with JUnit 5 Assertions.ExpectedExceptionToAssertThrows.ExpectedExceptionToAssertThrowsVisitor JUnitAssertArrayEqualsToAssertThat This is a refactoring visitor that will convert JUnit-style assertArrayEquals() to assertJ's assertThat().containsExactly().JUnitAssertArrayEqualsToAssertThat.AssertArrayEqualsToAssertThatVisitor JUnitAssertEqualsToAssertThat This is a refactoring visitor that will convert JUnit-style assertEquals() to assertJ's assertThat().isEqualTo().JUnitAssertEqualsToAssertThat.AssertEqualsToAssertThatVisitor JUnitAssertFalseToAssertThat This is a refactoring visitor that will convert JUnit-style assertFalse() to assertJ's assertThat().isFalse().JUnitAssertFalseToAssertThat.AssertFalseToAssertThatVisitor JUnitAssertNotEqualsToAssertThat This is a refactoring visitor that will convert JUnit-style assertNotEquals() to assertJ's assertThat().isNotEqualTo().JUnitAssertNotEqualsToAssertThat.AssertNotEqualsToAssertThatVisitor JUnitAssertNotNullToAssertThat This is a refactoring visitor that will convert JUnit-style assertNotNull() to assertJ's assertThat().isNotNull().JUnitAssertNotNullToAssertThat.AssertNotNullToAssertThatVisitor JUnitAssertNullToAssertThat This is a refactoring visitor that will convert JUnit-style assertNull() to assertJ's assertThat().isNull().JUnitAssertNullToAssertThat.AssertNullToAssertThatVisitor JUnitAssertSameToAssertThat This is a refactoring visitor that will convert JUnit-style assertSame() to assertJ's assertThat().isSameAs().JUnitAssertSameToAssertThat.AssertSameToAssertThatVisitor JUnitAssertTrueToAssertThat This is a refactoring visitor that will convert JUnit-style assertTrue() to assertJ's assertThat().isTrue().JUnitAssertTrueToAssertThat.AssertTrueToAssertThatVisitor JUnitFailToAssertJFail This is a refactoring visitor that will convert JUnit-style fail() to assertJ's fail().JUnitFailToAssertJFail.JUnitFailToAssertJFailVisitor JUnitParamsRunnerToParameterized Converts Pragmatists JUnitParamsRunner tests to their JUnit 5 ParameterizedTest and associated MethodSource equivalent https://github.com/Pragmatists/JUnitParams Supports the following conversions `@Parameters` annotation with out 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.MockitoJUnitToMockitoExtension Replaces JUnit 4 MockitoJUnit rules with JUnit MockitoExtension.MockitoJUnitToMockitoExtension.MockitoRuleToMockitoExtensionVisitor MockUtilsToStatic In Mockito 1 you use a code snippet like:MockUtilsToStatic.MockUtilsToStaticVisitor ParameterizedRunnerToParameterized Recipe for migrating JUnit4 @RunWith(Parameterized.class) tests to the JUnit 5 Jupiter ParameterizedTest equivalents.RemoveObsoleteRunners RunnerToExtension TemporaryFolderToTempDir Translates JUnit4's org.junit.rules.TemporaryFolder into JUnit 5's org.junit.jupiter.api.io.TempDirTestsShouldIncludeAssertions For Tests not having any assertions, wrap the statements with JUnit 5's Assertions.assertThrowDoesNotThrow.UpdateBeforeAfterAnnotations This refactor visitor will replace JUnit 4's "Before", "BeforeClass", "After", and "AfterClass" annotations with their JUnit 5 equivalents.UpdateBeforeAfterAnnotations.UpdateBeforeAfterAnnotationsVisitor UpdateMockWebServer Recipe for converting JUnit4 okhttp3 MockWebServer Rules with their JUnit5 equivalent.UpdateTestAnnotation UseTestMethodOrder