-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JMock to Mockito Migration #529
Comments
If there's already a recipe that solves this, do share. I could not find one. |
hi @alfarhanzahedi ! There certainly is no shortage of mocking libraries with Java is there? 😅 We already have recipes to go from JMockit to Mockito, as well as from PowerMock and older versions of Mockito to v5. We also have requests to cover additional libraries & cases such as
Thanks for the offer to help cover JMock as well! From the recipes we have already I think there should be some decent examples in there on how to achieve such a migration. Feel free to start a draft PR with just some tests early to get feedback on where to go next. Typically we find that some initial steps are easy to add, and then from there look at what's needed to get decent coverage for a mostly automated migration. |
I would be interested in using this recipe too. 👍 |
Glad to hear! Feel free to kick this off with a draft pull request containing just the tests, and then I'll try to guide you from there. |
What problem are you trying to solve?
I am trying to migrate from JMock to Mockito. Multiple of my projects use a combination of JMock and Mockito for unit testing. I am trying to consolidate the tests to just use Mockito.
What precondition(s) should be checked before applying this recipe?
Mockito v5.x should be preferable.
Describe the situation before applying the recipe
Describe the situation after applying the recipe
Have you considered any alternatives or workarounds?
Apart from doing a manual migration, no.
Are you interested in contributing this recipe to OpenRewrite?
Yes. I am interested :D
The text was updated successfully, but these errors were encountered: