Created
June 28, 2017 02:57
-
-
Save deepakazad/e3c66f4d90078d8df990ec8a3f5c9156 to your computer and use it in GitHub Desktop.
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