Skip to content

Commit

Permalink
Disable acyclic cursor validation for PowerMock tests
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Oct 16, 2024
1 parent f59e1c8 commit ff29dbc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.openrewrite.java.JavaParser;
import org.openrewrite.test.RecipeSpec;
import org.openrewrite.test.RewriteTest;
import org.openrewrite.test.TypeValidation;

import static org.openrewrite.groovy.Assertions.groovy;
import static org.openrewrite.java.Assertions.java;
Expand All @@ -41,7 +42,8 @@ public void defaults(RecipeSpec spec) {
"powermock-core-1.6",
"testng-7.7"
))
.recipe(new PowerMockitoMockStaticToMockito());
.recipe(new PowerMockitoMockStaticToMockito())
.typeValidationOptions(TypeValidation.builder().cursorAcyclic(false).build());
}

@DocumentExample
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ public void defaults(RecipeSpec spec) {
"powermock-api-mockito-1.6",
"powermock-api-support-1.6",
"testng-7.7"))
// TODO Resolve the missing types in the replacement templates rather than ignore the errors here
.typeValidationOptions(TypeValidation.builder()
.cursorAcyclic(false)
// TODO Resolve the missing types in the replacement templates rather than ignore the errors here
.identifiers(false)
.methodInvocations(false)
.build())
Expand Down

0 comments on commit ff29dbc

Please sign in to comment.