Skip to content

Instantly share code, notes, and snippets.

@brunogabriel
Created October 5, 2021 19:57
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 brunogabriel/f4e0cf654aac174214763cc2160f5829 to your computer and use it in GitHub Desktop.
Save brunogabriel/f4e0cf654aac174214763cc2160f5829 to your computer and use it in GitHub Desktop.
Testes para PostsRepository
// given
val posts = listOf<PostResponse>(mockk(), mockk())
every { repository.getPosts() } returns Single.just(posts)
// when
val result = repository.getPosts()
// then
result.test()
.assertResult(posts)
.dispose()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment