-
Hi all, I am currently working an a huge code base (several thousands of mixed java and kotlin files) with some pretty old legacy code (dating back from the early 2000's) and I'm trying to get rid of PowerMock by using the dedicated recipe (org.openrewrite.java.testing.mockito.ReplacePowerMockito), but sadly it fails on some points at the moment:
Rather than complaining or requesting solutions be provided, I'd like to get involved as I feel like this tool could be immensely useful to me in the future, and should be more widely used everywhere.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @fpoyer ; thank you for the offer to help! I'm going to tag in @traceyyoshima here, who works on our Kotlin implementation, such that he can correct me when I'm wrong. ;) It sounds like you're mostly looking to tweak the PowerMock recipe, such that it'll work well (or at least better) with Kotlin. The tests there will likely go into rewrite-testing-frameworks. Whereas the language level fixes will likely go into rewrite-kotlin. You can work on these in tandem through For the tests you'll likely want to add a test scoped dependency on rewrite-kotlin, similar to what we have for rewrite-groovy already. Here's an example of a Groovy test of a the TemporaryFolderToTempDir recipe. The language level fixes I'm not as familiar with myself yet, but Tracey can likely help you out there if needed. I suppose your project is not open source, but you're welcome to report individual issues, or ideally a PR containing a unit test using the We have documented the test structure as best we can; the docs assume Java, but with the import above you can just as easily test groovy, kotlin, or any other language we support. Feel free to ask any follow up questions here, or on our public Slack; or even in the OpenRewrite office hours I'll be hosting at 16:00 CET today. |
Beta Was this translation helpful? Give feedback.
Cross referencing the issue and initial pull request here for visibility.