Create a gist now

Instantly share code, notes, and snippets.

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