Introduce BugPattern for removing duplicate Mockito.verifyNoInteractions()
calls
#475
Open
3 of 4 tasks
Labels
Problem
When verifying that mocks didn't have interactions in tests sometimes many calls to
Mockito.verifyNoInteractions()
are usedverifyNoInteractions(mock1);
verifyNoInteractions(mock2);
which unnecessarily pollutes the code, because this method actually accepts varargs.
This can be simplified to just:
verifyNoInteractions(mock1, mock2);
Description of the proposed new feature
We should rewrite multiple calls to
verifyNoInteractions
to one call.I would like to rewrite the following code:
to:
Considerations
Tricky parts in my opinion are:
Participation
The text was updated successfully, but these errors were encountered: