Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
RxJava: Maybe To Single
@Test
public void testEmptyMaybeToSingle1() {
Maybe.empty()
.flatMapSingle(o -> Single.just("result"))
.test()
.assertError(NoSuchElementException.class);
}
@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