[junit] 如何驗證一個方法被mockito verify()調用兩次


Answers

Question

我想驗證一個方法是否通過mockito驗證被調用兩次或多次。 我用驗證,它抱怨這樣:

org.mockito.exceptions.verification.TooManyActualInvocations: 
Wanted 1 time:
But was 2 times. Undesired invocation:



Related