Created
January 18, 2014 11:14
-
-
Save indrekots/8489083 to your computer and use it in GitHub Desktop.
Verifying the number of times a method is called with Mockito
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mockito.verify(userDao, Mockito.times(2)).save(Mockito.any(User.class)); |
what is save here? Is that the method that you check number of occurences???
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In case of Collections, we can use: Mockito.anyCollectionOf(User.class)