Skip to content

Instantly share code, notes, and snippets.

@DiegoGSantos
Last active November 28, 2018 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DiegoGSantos/cb163d381b16330e5ecae632b7860401 to your computer and use it in GitHub Desktop.
Save DiegoGSantos/cb163d381b16330e5ecae632b7860401 to your computer and use it in GitHub Desktop.
@Before
fun setUpTest() {
MockitoAnnotations.initMocks(this)
}
@Test
fun test() {
Mockito.`when`(mockRepository.getList(anyInt(),anyString())).thenReturn(expectedValue)
presenter.loadList()
verify(mockView, times(1)).showLoading()
verify(mockView, times(1)).hideLoading()
verify(mockView, times(1)).onListLoaded(any())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment