Assumptions examples from assertj-vavr v0.2.0
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
// given | |
Option<String> empty = Option.none(); | |
// this one fails | |
assumeThat(empty).isDefined(); | |
// so the assertion won't be checked and test is ignored | |
assertThat(empty).contains("yay!); | |
// given | |
Either<String, Integer> value = Either.right(42); | |
// this oone passes | |
assumeThat(value).isRight(); | |
// so the assertion is checked | |
assertThat(value).containsRight(42); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment