Class SpringRunnerToSpringExtension
- java.lang.Object
-
- org.openrewrite.Recipe
-
- org.openrewrite.java.spring.boot2.SpringRunnerToSpringExtension
-
public class SpringRunnerToSpringExtension extends org.openrewrite.Recipespring-boot 1.X has SpringBootTest but it does not have an ExtendsWith annotation. The purpose of JUnit 5 extensions is to extend the behavior of test classes or methods SpringExtension integrates the Spring TestContext Framework into JUnit 5's Jupiter programming model. So thats why if SpringBootTest exists just remove RunWith and if it does not then just add the JUnit 5 SpringExtension
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSpringRunnerToSpringExtension.SpringRunnerToSpringExtensionVisitor
-
Constructor Summary
Constructors Constructor Description SpringRunnerToSpringExtension()
-
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
-
-