openrewrite / openrewrite/rewrite-testing-frameworks
PowerMock MemberModifier support
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 100
- Forks
- 105
- Avg merge
- 2h 25m
- Merged PRs (30d)
- 9
Description
What problem are you trying to solve?
MemberModifier method cannot be recognized and implemented in mockito.
Describe the solution you'd like
https://docs.openrewrite.org/recipes/java/testing/mockito/replacepowermockito
MemberModifier.field(WebLicenseManager.class, "coreLics").set(webLicenseManager, coreLics);
Have you considered any alternatives or workarounds?
Private method → package-level visibility + @VisibleForTesting
Additional context
Are you interested in contributing this feature to OpenRewrite?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ReplacePowerMockito recipe at the linked documentation path and inspect how it handles Mockito migrations. Trace the MemberModifier.field(WebLicenseManager.class, "coreLics").set(...) example and determine the expected converted form. Done means this MemberModifier usage is recognized and transformed consistently, with coverage added for the example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100