Last active
February 7, 2020 00:34
-
-
Save CostaFot/11131b0cf36a6a40ea94babad4aa9be9 to your computer and use it in GitHub Desktop.
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
@Test | |
fun `getPost actually returns the post I am expecting`() { | |
// run the test on the testDispatcher provided by the coroutineTestRule | |
coroutineTestRule.testDispatcher.runBlockingTest { | |
// Given | |
val expectedPost: State.Post = State.Post("I hope this post gets me karma points") | |
// When | |
val actualPost: State.Post = redditRepository.getPost() | |
// Then | |
assertEquals(expectedPost, actualPost) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment