Skip to content

Instantly share code, notes, and snippets.

@nhoxbypass
Last active February 17, 2020 17:55
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 nhoxbypass/22564a4ade7667e0d8605f7d88e60cc3 to your computer and use it in GitHub Desktop.
Save nhoxbypass/22564a4ade7667e0d8605f7d88e60cc3 to your computer and use it in GitHub Desktop.
class MyPresenterTest {
@Test
fun onOpenCameraButtonClick_postM() {
// Arrange
Mockito.`when`(mockBuildProvider.isMarshmallowAndAbove()).thenReturn(true)
// Action
presenter.onCameraButtonClick()
// Assert
Mockito.verify(mockView).requestCameraPermission()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment