Skip to content

Instantly share code, notes, and snippets.

@makovkastar
Created January 9, 2018 13:34
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 makovkastar/abd4bb7169a2d178dd28f5b7abe951dc to your computer and use it in GitHub Desktop.
Save makovkastar/abd4bb7169a2d178dd28f5b7abe951dc to your computer and use it in GitHub Desktop.
@Test
fun clickForgotPasswordButton_CallsViewModel() {
onView(withId(R.id.label_forgot_password)).perform(click())
verify(viewModel).onForgotPasswordLabelClicked()
verifyNoMoreInteractions(viewModel)
}
@Test
fun clickSignInButton_CallsViewModel() {
isLogInButtonEnabled.set(true)
onView(withId(R.id.button_sign_in)).perform(click())
verify(viewModel).onLoginButtonClicked()
verifyNoMoreInteractions(viewModel)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment