Skip to content

Instantly share code, notes, and snippets.

Last active June 28, 2017 03:17
What would you like to do?
RxJava: Flowable to Single
public void testEmptyFlowableToSingle() {
.flatMapSingle(o -> Single.just("result"))
//There should have been an error
public void testFlowableToSingle() {
Flowable.just("item1", "item2")
.assertErrorMessage("Sequence contains more than one element!");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment