| Constructor and Description |
|---|
TestObserver()
|
TestObserver(Observer
|
| Modifier and Type | Method and Description |
|---|---|
void |
assertReceivedOnNext(List
Assert that a particular sequence of items was received in order.
|
void |
assertTerminalEvent()
Assert that a single terminal event occurred, either
onCompleted() or
onError(java.lang.Throwable).
|
List |
getEvents()
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.
|
List |
getOnCompletedEvents()
Get the
Notifications representing each time this observer was notified of sequence completion via
onCompleted(), as a
List.
|
List |
getOnErrorEvents()
|
List |
getOnNextEvents()
Get the sequence of items observed by this observer, as an ordered
List.
|
void |
onCompleted()
Notifies the Observer that the
Observable has finished sending push-based notifications.
|
void |
onError(Throwable
Notifies the Observer that the
Observable has experienced an error condition.
|
void |
onNext(T t)
Provides the Observer with a new item to observe.
|
public void onCompleted()
Observer
Observable has finished sending push-based notifications.
The Observable will not call this method if it calls Observer.
public List<Notification <T>> getOnCompletedEvents()
Notifications representing each time this observer was notified of sequence completion via
onCompleted(), as a
List.
onCompleted() method
public void onError(Throwablee)
Observer
Observable has experienced an error condition.
If the Observable calls this method, it will not thereafter call Observer or Observer.
public List<Throwable > getOnErrorEvents()
onError(java.lang.Throwable) method
public 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 or Observer.
public List<T> getOnNextEvents()
List.
public List<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 received
public void assertReceivedOnNext(List<T> items)
items - the sequence of items expected to have been observed
AssertionError - if the sequence of items observed does not exactly match
items
public void assertTerminalEvent()
onCompleted() or
onError(java.lang.Throwable).
AssertionError - if not exactly one terminal event notification was received