junit - How to verify a method is called two times with mockito verify() -
i want verify if method called twice or more 1 time through mockito verify. used verify , complains this:
org.mockito.exceptions.verification.toomanyactualinvocations: wanted 1 time: 2 times. undesired invocation:
using appropriate verificationmode, of course:
verify(mockobject, atleast(2)).somemethod("was called @ to the lowest degree twice"); verify(mockobject, times(3)).somemethod("was called 3 times");
junit mockito verify
No comments:
Post a Comment