/**
* Expect NoSuchElementException instead of blocking forever as zip should emit onComplete() and no onNext
* and last() expects at least a single response.
*/
@Test(expected = NoSuchElementException.class)
public void testStartEmptyListBlocking() {
final Object invoked = new Object();
Collection<Observable<Object>> observables = Collections.emptyList();
Observable<Object> o = Observable.zip(observables, new FuncN<Object>() {
@Override
public Object call(final Object... args) {
assertEquals("No argument should have been passed", 0, args.length);
return invoked;
}
});
o.toBlocking().last();
}
OperatorZipTest.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:RxJavaFlow
作者:
评论列表
文章目录