Class UpdateBeforeAfterAnnotations
- java.lang.Object
-
- org.openrewrite.Recipe
-
- org.openrewrite.java.testing.junit5.UpdateBeforeAfterAnnotations
-
public class UpdateBeforeAfterAnnotations extends org.openrewrite.RecipeThis refactor visitor will replace JUnit 4's "Before", "BeforeClass", "After", and "AfterClass" annotations with their JUnit 5 equivalents. Additionally, this visitor will reduce the visibility of methods marked with those annotations to "package" to comply with JUnit 5 best practices.org.junit.Before == org.junit.jupiter.api.BeforeEach org.junit.After == org.junit.jupiter.api.AfterEach org.junit.BeforeClass == org.junit.jupiter.api.BeforeAll org.junit.AfterClass == org.junit.jupiter.api.AfterAll
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUpdateBeforeAfterAnnotations.UpdateBeforeAfterAnnotationsVisitor
-
Constructor Summary
Constructors Constructor Description UpdateBeforeAfterAnnotations()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDescription()java.lang.StringgetDisplayName()protected org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext>getVisitor()
-
-
-
Method Detail
-
getDisplayName
public java.lang.String getDisplayName()
- Specified by:
getDisplayNamein classorg.openrewrite.Recipe
-
getDescription
public java.lang.String getDescription()
- Overrides:
getDescriptionin classorg.openrewrite.Recipe
-
getVisitor
protected org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getVisitor()
- Overrides:
getVisitorin classorg.openrewrite.Recipe
-
-