test()
method of a reactive base class.
This interface is not intended to be implemented outside of RxJava.
This interface extends Observer and allows injecting onXXX signals into
the testing process.
History: 1.2.3 - experimental
| Modifier and Type | Method and Description |
|---|---|
| public AssertableSubscriber | |
| public AssertableSubscriber | Returns: thisthe expected type of the clazz)onError signal receivedAssert that this Observer received one |
| public AssertableSubscriber | Returns: thisthe Throwable instance expected throwable)Assert that this Observer received one |
| public AssertableSubscriber | Returns: thisthe expected Throwable subclass type errorClass, T... the expected values values)Assert that this Observer received the specified items in the given order followed by an error signal of the given type (but no completion signal). |
| public AssertableSubscriber | Returns: thisthe expected Throwable subclass type errorClass, String the expected error message returned by message, T... Throwable#getMessage()the expected values values)Assert that this Observer received the specified items in the given order followed by an error signal of the given type and with the exact error message (but no completion signal). |
| public AssertableSubscriber | |
| public AssertableSubscriber | |
| public AssertableSubscriber | Returns: thisAssert that no |
| public AssertableSubscriber | |
| public AssertableSubscriber | Returns: thisthe List of items expected items)Assert that this Observer received the given list of items as |
| public AssertableSubscriber | Returns: thisthe values expected values)Assert that this Observer received the specified items in the given order followed by a completion signal and no errors. |
| public AssertableSubscriber | Returns: thisAssert that this Observer received either an |
| public AssertableSubscriber | Returns: thisAssert that this Observer has been unsubscribed via |
| public AssertableSubscriber | Returns: thisthe single value expected value)Assert that this Observer received exactly the given single expected value (compared via null-safe object equals). |
| public AssertableSubscriber | Returns: thisthe expected number of count)onNext signalsAssert that this Observer received exactly the given count of
|
| public AssertableSubscriber | Returns: thisthe expected values values)Assert that this Observer received exactly the given expected values (compared via null-safe object equals) in the given order. |
| public AssertableSubscriber | Returns: thisthe first value expected expectedFirstValue, T... the rest of the values expected expectedRestValues)Assert that this Observer received exactly the given values (compared via null-safe object equals) and if so, clears the internal buffer of the underlying Subscriber of these values. |
| public AssertableSubscriber | Returns: thisWaits for an |
| public AssertableSubscriber | Returns: thisthe time to wait for the terminal event timeout, TimeUnit the time unit of the wait time unit)Waits for an |
| public AssertableSubscriber | Returns: thisthe time to wait for the terminal event timeout, TimeUnit the time unit of the wait time unit)Waits for an |
| public AssertableSubscriber | Returns: thisthe expected (at least) number of expected, long onNext signalsthe timeout to wait to receive the given number of timeout, TimeUnit onNext eventsthe time unit unit)Assert that this Observer receives at least the given number of |
| public int | Returns: the number ofonCompleted signals receivedReturns the number of |
| public Thread | Returns: thisReturns the Thread that has called the last |
| public List | |
| public List | Returns: the List of receivedonNext events.Returns the list of received |
| public int | Returns: the number ofonNext signals received.Returns the number of |
| public boolean | isUnsubscribed()
Redeclares rx. Subscription is currently unsubscribed.
|
| public void | |
| public AssertableSubscriber | |
| public AssertableSubscriber | Returns: thisthe amount requested, non-negative n)Requests the specified amount of items from upstream. |
| public void | setProducer(Producer
the producer to use, not null p)Allows manually calling the |
| public void | unsubscribe()
Redeclares rx. Subscriber that was registered when this Subscription
was received.
|
| assertCompleted | back to summary |
|---|---|
| public AssertableSubscriber Assert that this Observer received exaclty one
| |
| assertError | back to summary |
|---|---|
| public AssertableSubscriber Assert that this Observer received one
| |
| assertError | back to summary |
|---|---|
| public AssertableSubscriber Assert that this Observer received one
| |
| assertFailure | back to summary |
|---|---|
| public AssertableSubscriber Assert that this Observer received the specified items in the given order followed by an error signal of the given type (but no completion signal).
| |
| assertFailureAndMessage | back to summary |
|---|---|
| public AssertableSubscriber Assert that this Observer received the specified items in the given order followed by an error signal of the given type and with the exact error message (but no completion signal).
| |
| assertNoErrors | back to summary |
|---|---|
| public AssertableSubscriber Assert that this Observer has not received any
| |
| assertNotCompleted | back to summary |
|---|---|
| public AssertableSubscriber Assert that this Observer received no
| |
| assertNoTerminalEvent | back to summary |
|---|---|
| public AssertableSubscriber Assert that no
| |
| assertNoValues | back to summary |
|---|---|
| public AssertableSubscriber Assert that no
| |
| assertReceivedOnNext | back to summary |
|---|---|
| public AssertableSubscriber Assert that this Observer received the given list of items as
| |
| assertResult | back to summary |
|---|---|
| public AssertableSubscriber Assert that this Observer received the specified items in the given order followed by a completion signal and no errors.
| |
| assertTerminalEvent | back to summary |
|---|---|
| public AssertableSubscriber Assert that this Observer received either an
| |
| assertUnsubscribed | back to summary |
|---|---|
| public AssertableSubscriber Assert that this Observer has been unsubscribed via
| |
| assertValue | back to summary |
|---|---|
| public AssertableSubscriber Assert that this Observer received exactly the given single expected value (compared via null-safe object equals).
| |
| assertValueCount | back to summary |
|---|---|
| public AssertableSubscriber Assert that this Observer received exactly the given count of
| |
| assertValues | back to summary |
|---|---|
| public AssertableSubscriber Assert that this Observer received exactly the given expected values (compared via null-safe object equals) in the given order.
| |
| assertValuesAndClear | back to summary |
|---|---|
| public AssertableSubscriber Assert that this Observer received exactly the given values (compared via null-safe object equals) and if so, clears the internal buffer of the underlying Subscriber of these values.
| |
| awaitTerminalEvent | back to summary |
|---|---|
| public AssertableSubscriber Waits for an
| |
| awaitTerminalEvent | back to summary |
|---|---|
| public AssertableSubscriber Waits for an
| |
| awaitTerminalEventAndUnsubscribeOnTimeout | back to summary |
|---|---|
| public AssertableSubscriber Waits for an
| |
| awaitValueCount | back to summary |
|---|---|
| public AssertableSubscriber Assert that this Observer receives at least the given number of Note that it is possible the AssertionError thrown by this method will contain an actual value >= to the expected one in case there is an emission race or unexpected delay on the emitter side. In this case, increase the timeout amount to avoid false positives.
| |
| getCompletions | back to summary |
|---|---|
| public int getCompletions() Returns the number of
| |
| getLastSeenThread | back to summary |
|---|---|
| public Thread getLastSeenThread() Returns the Thread that has called the last
| |
| getOnErrorEvents | back to summary |
|---|---|
| public List Returns a list of received | |
| getOnNextEvents | back to summary |
|---|---|
| public List Returns the list of received If the sequence hasn't completed yet and is asynchronous, use the
| |
| getValueCount | back to summary |
|---|---|
| public int getValueCount() Returns the number of
| |
| isUnsubscribed | back to summary |
|---|---|
| public boolean isUnsubscribed() Redeclares rx. Doc from rx. Indicates whether this
| |
| onStart | back to summary |
|---|---|
| public void onStart() Allows manually calling the | |
| perform | back to summary |
|---|---|
| public AssertableSubscriber Performs an action given by the Action0 callback in a fluent manner.
| |
| requestMore | back to summary |
|---|---|
| public AssertableSubscriber Requests the specified amount of items from upstream.
| |
| setProducer | back to summary |
|---|---|
| public void setProducer(Producer p) Allows manually calling the
| |
| unsubscribe | back to summary |
|---|---|
| public void unsubscribe() Redeclares rx. Doc from rx. Stops the receipt of notifications on the
This allows deregistering an
| |