Created
December 27, 2018 22:24
-
-
Save michalbujalski/4650927f63891b111d865e5a0d66bd31 to your computer and use it in GitHub Desktop.
This file contains 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
whenever(repository.fetchContacts()).thenReturn(emptyList()) //simulate interface response | |
verify(view).setData(any()) //verify `setData` method was called | |
verify(view, never()).setData(any()) //verify `setData` was never called | |
verify(view, times(2)).setData(any()) //verify `setData` was called exactly two times | |
... | |
//verify that `showProgress` and `getCurrentUser` were called in that exact order | |
val inOrder = inOrder(view,repository) | |
inOrder.verify(view).showProgress() | |
inOrder.verify(repository).getCurrentUser() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment