Open Saturas89 opened 3 days ago
Hi! Thanks for the report; looks like we indeed bump to 3.x in two locations:
Once as part of org.openrewrite.java.testing.junit5.JUnit4to5Migration
https://github.com/openrewrite/rewrite-testing-frameworks/blob/fd0eb2d69a26a1d32b10b769644d9ae609937ae1/src/main/resources/META-INF/rewrite/junit5.yml#L130-L136
And once more via org.openrewrite.java.testing.mockito.Mockito1to3Migration
https://github.com/openrewrite/rewrite-testing-frameworks/blob/fd0eb2d69a26a1d32b10b769644d9ae609937ae1/src/main/resources/META-INF/rewrite/mockito.yml#L136-L141
If you were to execute either of these recipes I think you should be upgraded to 4.x or 5.x
As per Mockito's 5.x release notes it seems that 5.x requires Java 11, whereas 4.x still works with Java 8. As our JUnit4to5Migration
is intended to get you onto JUnit 5 without raising the required Java version just yet, I suppose we could only bump you up to Mockito 4.x, or make that conditional on the Java version in use.
In any case I believe we could fix all the above using only declarative Yaml recipes and preconditions. Would you want to help out making that a reality?
There is at least one more location in the recipeDependencies within https://github.com/openrewrite/rewrite-testing-frameworks/blob/fd0eb2d69a26a1d32b10b769644d9ae609937ae1/build.gradle.kts#L23
The added dependency from mockito-junit-jupiter could be upgraded to a newer one.
How are you running OpenRewrite?
I am using the Maven plugin, and my project is a single module project.
What did you expect to see?
What did you see instead?