Created
June 28, 2017 02:57
RxJava: Maybe To Single
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 | |
public void testEmptyMaybeToSingle1() { | |
Maybe.empty() | |
.flatMapSingle(o -> Single.just("result")) | |
.test() | |
.assertError(NoSuchElementException.class); | |
} |
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 | |
public void testEmptyMaybeToSingle2() { | |
Maybe.empty() | |
.toSingle() | |
.test() | |
.assertError(NoSuchElementException.class); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment