Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Kotlin support for JUnit recipes: UpdateBeforeAfterAnnotations (#533
) * Adding Kotlin support to the recipes, fixing the recipes to work use preVisit instead of visitCompilationUnit. * Do a single recipe run per unit test * Stop after pre visit, since we're only updating imports * Adding Kotlin support for the UpdateBeforeAfterAnnotations, along with new tests for kotlin * Added kotlin tests for AddParameterizedTestAnnotation * Add Picnic AssertJ rules to AssertJ best practices (#527) * Add Picnic AssertJ rules to AssertJ best practices * Include Picnic's JUnitToAssertJRulesRecipes in migration * Exclude `jakarta.xml.bind-api` from TimeFold * Move the exclude to rewrite-third-party * refactor: Only publish build scans if authenticated Use this link to re-run the recipe: https://app.moderne.io/recipes/builder/kLJjXlflM?organizationId=T3BlblJld3JpdGU%3D Co-authored-by: Moderne <[email protected]> * Drop Java 17 requirement through rewrite-third-party (#531) * Jmockit Expectations with no times or result should be transformed to Mockito verify statement (#530) * Ensure Jmockit expectations with no times or result transform to a mockito verify * Minor polish to text blocks * Make times, minTimes, maxTimes more flexible as it was originally so even if someone mistakenly puts times and minTimes together, it still migrates without issue --------- Co-authored-by: Tim te Beek <[email protected]> * Rewrite both JMockit `@Mocked` and `@Injectable` annotated arguments (#532) * Ensure Jmockit expectations with no times or result transform to a mockito verify * Minor polish to text blocks * Make times, minTimes, maxTimes more flexible as it was originally so even if someone mistakenly puts times and minTimes together, it still migrates without issue * Add feature to enable migration of Jmockit Injectable annotation exactly as we are doing the Mocked annotation ie method parameter annotation as well as field annotation. Have moved all of the code from JMockitMockedVariableToMockito to JMockitAnnotationToMockito for code reuse. Also add the corresponding test cases and jmockit.yml file modification. * Use `@Option` instead of inheritance * Drop Option and just replace both variants * Update display name and description to match application --------- Co-authored-by: Tim te Beek <[email protected]> * Adding Kotlin support for the UpdateBeforeAfterAnnotations, along with new tests for kotlin * Added kotlin tests for AddParameterizedTestAnnotation * Restoring changes to issue to retain the references * Remove trailing whitespace in text blocks * Update src/test/java/org/openrewrite/java/testing/junit5/UpdateBeforeAfterAnnotationsTest.java Co-authored-by: Tim te Beek <[email protected]> * Removing tests for kotlin and keep one in the Documentation example. We can tackle the issues and add tests separately if we see bug in workflows. * Removing extra tests for Kotlin, and keeping one, fixing issue with failing build. * Restored changes to the disabled test. * Minor touch up --------- Co-authored-by: Amitoj Duggal <[email protected]> Co-authored-by: Tim te Beek <[email protected]> Co-authored-by: Tim te Beek <[email protected]> Co-authored-by: Moderne <[email protected]> Co-authored-by: Shivani Sharma <[email protected]>
- Loading branch information