@Test public void testErrorPassesThru() { Subscription s = mock(Subscription.class); TestObservable f = new TestObservable(s, "one", "ERROR", "two", "three"); Observable<String> w = Observable.create(f); Observable<String> resume = Observable.from("twoResume", "threeResume"); Observable<String> observable = Observable.create(onExceptionResumeNextViaObservable(w, resume)); @SuppressWarnings("unchecked") Observer<String> observer = mock(Observer.class); observable.subscribe(observer); try { f.t.join(); } catch (InterruptedException e) { fail(e.getMessage()); } verify(observer, times(1)).onNext("one"); verify(observer, never()).onNext("two"); verify(observer, never()).onNext("three"); verify(observer, never()).onNext("twoResume"); verify(observer, never()).onNext("threeResume"); verify(observer, times(1)).onError(any(Throwable.class)); verify(observer, never()).onCompleted(); verifyNoMoreInteractions(observer); }
public static <T> OnSubscribeFunc<T> onExceptionResumeNextViaObservable(Observable<? extends T> originalSequence, Observable<? extends T> resumeSequence) { return new OnExceptionResumeNextViaObservable<T>(originalSequence, resumeSequence); }
OperationOnExceptionResumeNextViaObservable { public static <T> OnSubscribeFunc<T> onExceptionResumeNextViaObservable(Observable<? extends T> originalSequence, Observable<? extends T> resumeSequence) { return new OnExceptionResumeNextViaObservable<T>(originalSequence, resumeSequence); } }
OperationOnExceptionResumeNextViaObservable { public static <T> OnSubscribeFunc<T> onExceptionResumeNextViaObservable(Observable<? extends T> originalSequence, Observable<? extends T> resumeSequence) { return new OnExceptionResumeNextViaObservable<T>(originalSequence, resumeSequence); }  }
OperationOnExceptionResumeNextViaObservable { public static <T> OnSubscribeFunc<T> onExceptionResumeNextViaObservable(Observable<? extends T> originalSequence, Observable<? extends T> resumeSequence) { return new OnExceptionResumeNextViaObservable<T>(originalSequence, resumeSequence); }  static OnSubscribeFunc<T> onExceptionResumeNextViaObservable(Observable<? extends T> originalSequence, Observable<? extends T> resumeSequence); }
OperationOnExceptionResumeNextViaObservable { public static <T> OnSubscribeFunc<T> onExceptionResumeNextViaObservable(Observable<? extends T> originalSequence, Observable<? extends T> resumeSequence) { return new OnExceptionResumeNextViaObservable<T>(originalSequence, resumeSequence); }  static OnSubscribeFunc<T> onExceptionResumeNextViaObservable(Observable<? extends T> originalSequence, Observable<? extends T> resumeSequence);  }