Last active
May 5, 2020 19:49
-
-
Save lovewithmind/68268facd6c07ebb1aaeab376a874414 to your computer and use it in GitHub Desktop.
This is an example of reactive test with block
This file contains 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 `should return person data given name of the person`(){ | |
val monoPerson = PersonManager.getProfile("PersonX") | |
val expectedResult = Person(name = "PersonX", age = 18) | |
assertThat(monoPerson.block()).isEqual(expectedResult) | |
} | |
@Test | |
fun `should return list of person data`(){ | |
val fluxList = PersonManager.getAllProfile() | |
val expectedResult = listOf(Person(name = "PersonX", age = 18),Person(name = "PersonY", age = 20)) | |
assertThat(fluxList.collectList().block()).isEqual(expectedResult) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment