Class AssertToAssertions


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

      • Fields inherited from class org.openrewrite.Recipe

        NOOP
    • Method Summary

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

        causesAnotherCycle, 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

      • AssertToAssertions

        public AssertToAssertions()
    • 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
      • getApplicableTest

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

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