T - the observed value typeTestSubscriber instead.@Deprecated public class TestObserver<T> extends java.lang.Object implements Observer<T>
| Constructor and Description |
|---|
TestObserver()
Deprecated.
|
TestObserver(Observer<T> delegate)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
assertReceivedOnNext(java.util.List<T> items)
Deprecated.
Assert that a particular sequence of items was received in order.
|
void |
assertTerminalEvent()
Deprecated.
Assert that a single terminal event occurred, either
onCompleted() or onError(java.lang.Throwable). |
java.util.List<java.lang.Object> |
getEvents()
Deprecated.
Get a list containing all of the items and notifications received by this observer, where the items
will be given as-is, any error notifications will be represented by their
Throwables, and any
sequence-complete notifications will be represented by their Notification objects. |
java.util.List<Notification<T>> |
getOnCompletedEvents()
Deprecated.
Get the
Notifications representing each time this observer was notified of sequence completion
via onCompleted(), as a List. |
java.util.List<java.lang.Throwable> |
getOnErrorEvents()
Deprecated.
|
java.util.List<T> |
getOnNextEvents()
Deprecated.
Get the sequence of items observed by this observer, as an ordered
List. |
void |
onCompleted()
Deprecated.
Notifies the Observer that the
Observable has finished sending push-based notifications. |
void |
onError(java.lang.Throwable e)
Deprecated.
Notifies the Observer that the
Observable has experienced an error condition. |
void |
onNext(T t)
Deprecated.
Provides the Observer with a new item to observe.
|
public void onCompleted()
ObserverObservable has finished sending push-based notifications.
The Observable will not call this method if it calls Observer.onError(java.lang.Throwable).
onCompleted in interface Observer<T>public java.util.List<Notification<T>> getOnCompletedEvents()
Notifications representing each time this observer was notified of sequence completion
via onCompleted(), as a List.onCompleted() methodpublic void onError(java.lang.Throwable e)
ObserverObservable has experienced an error condition.
If the Observable calls this method, it will not thereafter call Observer.onNext(T) or
Observer.onCompleted().
public java.util.List<java.lang.Throwable> getOnErrorEvents()
onError(java.lang.Throwable) methodpublic void onNext(T t)
Observer
The Observable may call this method 0 or more times.
The Observable will not call this method again after it calls either Observer.onCompleted() or
Observer.onError(java.lang.Throwable).
public java.util.List<T> getOnNextEvents()
List.public java.util.List<java.lang.Object> getEvents()
Throwables, and any
sequence-complete notifications will be represented by their Notification objects.List containing one item for each item or notification received by this observer, in
the order in which they were observed or receivedpublic void assertReceivedOnNext(java.util.List<T> items)
items - the sequence of items expected to have been observedjava.lang.AssertionError - if the sequence of items observed does not exactly match itemspublic void assertTerminalEvent()
onCompleted() or onError(java.lang.Throwable).java.lang.AssertionError - if not exactly one terminal event notification was received