Skip to content

Instantly share code, notes, and snippets.

@gabrielbmoro
Created January 5, 2022 04:00
Show Gist options
  • Save gabrielbmoro/9ed8a39b6ded17f4be5f52dc4358ff34 to your computer and use it in GitHub Desktop.
Save gabrielbmoro/9ed8a39b6ded17f4be5f52dc4358ff34 to your computer and use it in GitHub Desktop.
Triple AAA (Arrange-Act-Assert)
@Test
fun `user email - already exists a user email`() {
// arrange
every { localRepository.userEmail() }.returns("[email protected]")
val viewModel = UserEmailStepViewModel(localRepository)
// act
val result = viewModel.userEmail
// assert
Truth.assertThat(result).isEqualTo("[email protected]")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment