You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Goal: Treat Mockito.verify* calls as verifications
Home Site: https://site.mockito.org/
All verifications are done by org.mockito.Mockito.verify(...) call
verify(): to check methods were called with given arguments
can use flexible argument matching, for example any expression via the any()
or capture what arguments were called using @captor instead
Acceptance Criteria:
Example 1:
import static org.mockito.Mockito.*;
// mock creation
List mockedList = mock(List.class);
// using mock object - it does not throw any "unexpected interaction" exception
mockedList.add("one");
mockedList.clear();
// selective, explicit, highly readable verification
verify(mockedList).add("one");
verify(mockedList).clear();
Goal: Treat Mockito.verify* calls as verifications
Home Site: https://site.mockito.org/
All verifications are done by
org.mockito.Mockito.verify(...)callverify(): to check methods were called with given arguments
can use flexible argument matching, for example any expression via the any()
or capture what arguments were called using @captor instead
Acceptance Criteria:
Example 1: