Last active
May 7, 2020 21:05
-
-
Save lovewithmind/bbe5278fda280bc7bf25e7c424685f0b to your computer and use it in GitHub Desktop.
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 for mono`(){ | |
val monoError = Mono.error<Exception>(Exception()) | |
StepVerifier.create(mono) | |
.expectError(Exception::class.java) | |
.verify() | |
} | |
@Test | |
fun `should consume thrown exception from flux`() { | |
val concat = Flux.concat(Mono.just("hello"), Mono.error(Exception())) | |
StepVerifier.create(concat) | |
.expectNext("hello") | |
.expectError(Exception::class.java) | |
.verify() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment