Created
October 5, 2021 19:57
-
-
Save brunogabriel/f4e0cf654aac174214763cc2160f5829 to your computer and use it in GitHub Desktop.
Testes para PostsRepository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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