@NonNullApi
Package org.openrewrite.java.testing.junit5
-
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 ExpectedExceptionToAssertThrows Replace usages of JUnit 4's @Rule ExpectedException with JUnit 5 Assertions.assertThrowsExpectedExceptionToAssertThrows.ExpectedExceptionToAssertThrowsVisitor RunnerToExtension TemporaryFolderToTempDir Translates JUnit4's org.junit.rules.TemporaryFolder into JUnit 5's org.junit.jupiter.api.io.TempDirUpdateBeforeAfterAnnotations This refactor visitor will replace JUnit 4's "Before", "BeforeClass", "After", and "AfterClass" annotations with their JUnit 5 equivalents.UpdateBeforeAfterAnnotations.UpdateBeforeAfterAnnotationsVisitor UpdateTestAnnotation UseTestMethodOrder