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

Add VerifyZeroToNoMoreInteractions for Mockito 2 #631

Conversation

jevanlingen
Copy link
Contributor

@jevanlingen jevanlingen commented Nov 5, 2024

What's changed?

Extra recipe to migration the verifyZeroInteractions method for older Mockito versions:

If coming from Mockito < 3 then change from verifyZeroInteractions to verifyNoMoreInteractions
if coming from Mockito 3+ then change from verifyZeroInteractions to verifyNoInteractions (as we do now)

What's your motivation?

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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@jevanlingen jevanlingen self-assigned this Nov 5, 2024
@Laurens-W Laurens-W added the recipe Recipe request label Nov 5, 2024
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.

Great to see the quick work here. Approved after some small polishing touches.

@timtebeek timtebeek added bug Something isn't working mockito labels Nov 5, 2024
@timtebeek
Copy link
Contributor

Remaining test failures unrelated as we work through the effects of

@timtebeek timtebeek merged commit 9118a3c into main Nov 5, 2024
1 of 2 checks passed
@timtebeek timtebeek deleted the 630-incorrect-migration-path-from-verifyzerointeractions-to-verifynointeractions-in-mockito-3x branch November 5, 2024 11:54
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 recipe Recipe request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Incorrect migration path from verifyZeroInteractions() to verifyNoInteractions() in Mockito 3.x
3 participants