Skip to content

Add VerifyZeroToNoMoreInteractions for Mockito 2#631

Merged
timtebeek merged 6 commits intomainfrom
630-incorrect-migration-path-from-verifyzerointeractions-to-verifynointeractions-in-mockito-3x
Nov 5, 2024
Merged

Add VerifyZeroToNoMoreInteractions for Mockito 2#631
timtebeek merged 6 commits intomainfrom
630-incorrect-migration-path-from-verifyzerointeractions-to-verifynointeractions-in-mockito-3x

Conversation

@jevanlingen
Copy link
Copy Markdown
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
Copy Markdown
Member

@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
Copy Markdown
Member

Remaining test failures unrelated as we work through the effects of

@timtebeek timtebeek merged commit 9118a3c into main Nov 5, 2024
@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