Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add JMockit's MockUp to Mockito migration (#599)
* Add JMockit's MockUp to Mockito migration * Adopt mockito-core:5.+ through parserClasspath * Apply bot code suggestions * Add type check for new class statement * Fix statement construction * Remove debug statement * Fix code format * Use CallRealMethod for non mock methods * Update src/test/java/org/openrewrite/java/testing/jmockit/JMockitMockUpToMockitoTest.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/test/java/org/openrewrite/java/testing/jmockit/JMockitMockUpToMockitoTest.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/test/java/org/openrewrite/java/testing/jmockit/JMockitMockUpToMockitoTest.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/test/java/org/openrewrite/java/testing/jmockit/JMockitMockUpToMockitoTest.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/test/java/org/openrewrite/java/testing/jmockit/JMockitMockUpToMockitoTest.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/main/java/org/openrewrite/java/testing/jmockit/JMockitMockUpToMockito.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/main/java/org/openrewrite/java/testing/jmockit/JMockitMockUpToMockito.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/main/java/org/openrewrite/java/testing/jmockit/JMockitMockUpToMockito.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Add description about private methods * Update JMockitMockUpToMockitoTest.java * Fix UT to match gralde build order * Add setUp/tearDown support * Add MockUp params support * Remove useless * Fix JavaTemplate type inference * Remove unused local variables * MockUp to try-with-resource * Add import class test * Add multiple mockUp test * Apply bot suggestions Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Remove useless type cast * Fix variable naming * Remove fqn from naming * Remove unneeded method call * Shorter var naming * Update JMockitMockUpToMockitoTest.java * Refactor mockup migration to resuse existing code and cleanup * Resolve deprecated print() * Utilize LambdaBlockToExpression * Make constants * Apply bot suggestions Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Apply formatter and fix compilation * Place binary operators on the same line * Add missing language hints * Adopt AtomicReference instead of array element zero * Fix workflow build * Update src/main/java/org/openrewrite/java/testing/mockito/MockitoUtils.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Use mockito-core-3 instead of mockito-core-5 * Inline constants used once; Explicitly name reference var * Use now public VariableReferences.findRhsReferences --------- Co-authored-by: Tim te Beek <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Tim te Beek <[email protected]> Co-authored-by: Shivani Sharma <[email protected]>
- Loading branch information