Skip to content
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

Jmockit Expectations - Handle Additional Cases #418

Merged
merged 10 commits into from
Oct 27, 2023

Conversation

tinder-dthomson
Copy link
Contributor

@tinder-dthomson tinder-dthomson commented Oct 26, 2023

What's changed?

  • Refactored the recipe to visit J.MethodDeclaration instead of J.NewClass. When attempting to substitute the J.NewClass with multiple J.MethodDeclaration LSTs, the old recipe would fail.
  • Added support for multiple expectations statements.

What's your motivation?

Continuation of #415.

This is still an incomplete implementation, but now handles multiple expectations defined within a JMockit Expectations block.

Anything in particular you'd like reviewers to focus on?

Anyone you would like to review specifically?

Have you considered any alternatives or workarounds?

Any additional context

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've added the license header to any new files through ./gradlew licenseFormat
  • I've used the IntelliJ IDEA auto-formatter on affected files

@timtebeek
Copy link
Contributor

Thanks for this improvement already! Would you want to continue to iterate in this pull request? Or can we merge the existing work and follow up in a subsequent PR?

@timtebeek timtebeek added the enhancement New feature or request label Oct 27, 2023
@tinder-dthomson
Copy link
Contributor Author

Thanks for this improvement already! Would you want to continue to iterate in this pull request? Or can we merge the existing work and follow up in a subsequent PR?

I'm okay with iterate PRs, since this will take some time to cover all cases.

@tinder-dthomson tinder-dthomson marked this pull request as ready for review October 27, 2023 22:23
Copy link
Contributor

@timtebeek timtebeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for these improvements already, we can indeed iterate in a follow up PR; We'll get this merged and released already.

@timtebeek timtebeek merged commit 455f682 into openrewrite:main Oct 27, 2023
1 check passed
@tinder-dthomson tinder-dthomson deleted the jmockit-expectations-cases branch October 27, 2023 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants