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 throw exception while fetching person data`(){ | |
val personService = PersonService() | |
assertThatThrownBy{ | |
personService.getPerson("name") | |
}.isInstanceOf(PersonNotFound::class.java) | |
.hasMessage("No person found in the database") | |
} | |
@Test | |
fun `should throw execption for flux of Data`() { | |
val concat = Flux.concat(Mono.just("hello"), Mono.error(Exception())) | |
assertThatThrownBy{ | |
concat.collectList().block() | |
}.isInstanceOf(Exception::class.java) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment