Skip to content

Instantly share code, notes, and snippets.

@trietbui85
Last active July 29, 2020 13:42
Show Gist options
  • Save trietbui85/d2ea2b6e4395a7e83b59ab639d1c3092 to your computer and use it in GitHub Desktop.
Save trietbui85/d2ea2b6e4395a7e83b59ab639d1c3092 to your computer and use it in GitHub Desktop.
Unit test Android custom view with AndroidX Test and Robolectric
@Test
fun testReset() {
countView.reset()
assertThat(countView.countValue).isEqualTo(0)
assertThat(textViewValue.text.toString()).isEqualTo("0")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment