Class MockitoJUnitToMockitoExtension

java.lang.Object
org.openrewrite.Recipe
org.openrewrite.java.testing.junit5.MockitoJUnitToMockitoExtension
All Implemented Interfaces:
Cloneable

public class MockitoJUnitToMockitoExtension extends org.openrewrite.Recipe
Replaces JUnit 4 MockitoJUnit rules with JUnit MockitoExtension.

Supported MockitoJUnit methods: #rule() #testRule()

Does not currently support @Incubating MockitoJUnit.collector().

  • Constructor Details

    • MockitoJUnitToMockitoExtension

      public MockitoJUnitToMockitoExtension()
  • Method Details

    • getDisplayName

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

      public String getDescription()
      Overrides:
      getDescription in class org.openrewrite.Recipe
    • getEstimatedEffortPerOccurrence

      public Duration getEstimatedEffortPerOccurrence()
      Overrides:
      getEstimatedEffortPerOccurrence in class org.openrewrite.Recipe
    • getSingleSourceApplicableTest

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

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