Skip to content

Instantly share code, notes, and snippets.

@deepakazad
Created June 28, 2017 02:57
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