Class SpringRunnerToSpringExtension


  • public class SpringRunnerToSpringExtension
    extends org.openrewrite.Recipe
    spring-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
    • Field Summary

      • Fields inherited from class org.openrewrite.Recipe

        NOOP
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDescription()  
      java.lang.String getDisplayName()  
      protected org.openrewrite.TreeVisitor<?,​org.openrewrite.ExecutionContext> getVisitor()  
      • Methods inherited from class org.openrewrite.Recipe

        doNext, equals, getDescriptor, getJacksonPolymorphicTypeTag, getLanguages, getName, getRecipeList, getTags, hashCode, run, run, run, run, validate, validate, validateAll, validateAll, visit
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SpringRunnerToSpringExtension

        public SpringRunnerToSpringExtension()
    • Method Detail

      • getDisplayName

        public java.lang.String getDisplayName()
        Specified by:
        getDisplayName in class org.openrewrite.Recipe
      • getDescription

        public java.lang.String getDescription()
        Overrides:
        getDescription in class org.openrewrite.Recipe
      • getVisitor

        protected org.openrewrite.TreeVisitor<?,​org.openrewrite.ExecutionContext> getVisitor()
        Overrides:
        getVisitor in class org.openrewrite.Recipe