Skip to content

Added handling of org.mockito.Mockito.eq(..) when simplifying mockito matchers#635

Merged
timtebeek merged 4 commits intoopenrewrite:mainfrom
adambir:feature/issue634
Nov 5, 2024
Merged

Added handling of org.mockito.Mockito.eq(..) when simplifying mockito matchers#635
timtebeek merged 4 commits intoopenrewrite:mainfrom
adambir:feature/issue634

Conversation

@adambir
Copy link
Copy Markdown
Contributor

@adambir adambir commented Nov 5, 2024

What's changed?

Added a test for issue #634
Added handling of org.mockito.Mockito.eq(..) when simplifying mockito matchers

What's your motivation?

We are using import static org.mockito.Mockito.*; at my company, and in its current state this recipe does not support it.

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

@timtebeek timtebeek self-requested a review November 5, 2024 16:16
@timtebeek timtebeek added bug Something isn't working mockito labels Nov 5, 2024
@timtebeek
Copy link
Copy Markdown
Member

Thanks for the initiative here @adambir ; looks like this was missed earlier indeed; great addition.

@timtebeek timtebeek merged commit 671addc into openrewrite:main Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working mockito

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

SimplifyMockitoVerifyWhenGiven does not replace org.mockito.Mockito(..)

2 participants