Package | Description |
---|---|
rx |
Base reactive classes: Observable, Single and Completable; base reactive consumers;
other common base interfaces.
|
rx.internal.observers | |
rx.observers |
Default wrappers and implementations for the base reactive consumer classes and interfaces;
utility classes for creating them from callbacks.
|
Modifier and Type | Method and Description |
---|---|
AssertableSubscriber<Void> |
Completable.test()
Creates an AssertableSubscriber that requests
Long.MAX_VALUE and subscribes
it to this Observable. |
AssertableSubscriber<T> |
Single.test()
Creates an AssertableSubscriber that requests
Long.MAX_VALUE and subscribes
it to this Observable. |
AssertableSubscriber<T> |
Observable.test()
Creates a AssertableSubscriber that requests
Long.MAX_VALUE and subscribes
it to this Observable. |
AssertableSubscriber<T> |
Observable.test(long initialRequestAmount)
Creates an AssertableSubscriber with the initial request amount and subscribes
it to this Observable.
|
Modifier and Type | Class and Description |
---|---|
class |
AssertableSubscriberObservable<T>
A
AssertableSubscriber is a variety of Subscriber that you can use
for unit testing, to perform assertions or inspect received events. |
Modifier and Type | Method and Description |
---|---|
AssertableSubscriber<T> |
AssertableSubscriberObservable.assertCompleted() |
AssertableSubscriber<T> |
AssertableSubscriberObservable.assertError(Class<? extends Throwable> clazz) |
AssertableSubscriber<T> |
AssertableSubscriberObservable.assertError(Throwable throwable) |
AssertableSubscriber<T> |
AssertableSubscriberObservable.assertFailure(Class<? extends Throwable> errorClass,
T... values) |
AssertableSubscriber<T> |
AssertableSubscriberObservable.assertFailureAndMessage(Class<? extends Throwable> errorClass,
String message,
T... values) |
AssertableSubscriber<T> |
AssertableSubscriberObservable.assertNoErrors() |
AssertableSubscriber<T> |
AssertableSubscriberObservable.assertNotCompleted() |
AssertableSubscriber<T> |
AssertableSubscriberObservable.assertNoTerminalEvent() |
AssertableSubscriber<T> |
AssertableSubscriberObservable.assertNoValues() |
AssertableSubscriber<T> |
AssertableSubscriberObservable.assertReceivedOnNext(List<T> items) |
AssertableSubscriber<T> |
AssertableSubscriberObservable.assertResult(T... values) |
AssertableSubscriber<T> |
AssertableSubscriberObservable.assertTerminalEvent() |
AssertableSubscriber<T> |
AssertableSubscriberObservable.assertUnsubscribed() |
AssertableSubscriber<T> |
AssertableSubscriberObservable.assertValue(T value) |
AssertableSubscriber<T> |
AssertableSubscriberObservable.assertValueCount(int count) |
AssertableSubscriber<T> |
AssertableSubscriberObservable.assertValues(T... values) |
AssertableSubscriber<T> |
AssertableSubscriberObservable.assertValuesAndClear(T expectedFirstValue,
T... expectedRestValues) |
AssertableSubscriber<T> |
AssertableSubscriberObservable.awaitTerminalEvent() |
AssertableSubscriber<T> |
AssertableSubscriberObservable.awaitTerminalEvent(long timeout,
TimeUnit unit) |
AssertableSubscriber<T> |
AssertableSubscriberObservable.awaitTerminalEventAndUnsubscribeOnTimeout(long timeout,
TimeUnit unit) |
AssertableSubscriber<T> |
AssertableSubscriberObservable.awaitValueCount(int expected,
long timeout,
TimeUnit unit) |
AssertableSubscriber<T> |
AssertableSubscriberObservable.perform(Action0 action) |
AssertableSubscriber<T> |
AssertableSubscriberObservable.requestMore(long n) |
Modifier and Type | Method and Description |
---|---|
AssertableSubscriber<T> |
AssertableSubscriber.assertCompleted()
Assert that this Observer received exaclty one
onCompleted signal. |
AssertableSubscriber<T> |
AssertableSubscriber.assertError(Class<? extends Throwable> clazz)
Assert that this Observer received one
onError signal with
the given subclass of a Throwable as type. |
AssertableSubscriber<T> |
AssertableSubscriber.assertError(Throwable throwable)
Assert that this Observer received one
onError signal with the
object-equals of the given Throwable instance |
AssertableSubscriber<T> |
AssertableSubscriber.assertFailure(Class<? extends Throwable> errorClass,
T... 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).
|
AssertableSubscriber<T> |
AssertableSubscriber.assertFailureAndMessage(Class<? extends Throwable> errorClass,
String message,
T... 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).
|
AssertableSubscriber<T> |
AssertableSubscriber.assertNoErrors()
Assert that this Observer has not received any
onError signal. |
AssertableSubscriber<T> |
AssertableSubscriber.assertNotCompleted()
Assert that this Observer received no
onCompleted signal. |
AssertableSubscriber<T> |
AssertableSubscriber.assertNoTerminalEvent()
Assert that no
onError or onCompleted signals were received so far. |
AssertableSubscriber<T> |
AssertableSubscriber.assertNoValues()
Assert that no
onNext signals were received so far. |
AssertableSubscriber<T> |
AssertableSubscriber.assertReceivedOnNext(List<T> items)
Assert that this Observer received the given list of items as
onNext signals
in the same order and with the default null-safe object equals comparison. |
AssertableSubscriber<T> |
AssertableSubscriber.assertResult(T... values)
Assert that this Observer received the specified items in the given order followed
by a completion signal and no errors.
|
AssertableSubscriber<T> |
AssertableSubscriber.assertTerminalEvent()
Assert that this Observer received either an
onError or onCompleted signal. |
AssertableSubscriber<T> |
AssertableSubscriber.assertUnsubscribed()
Assert that this Observer has been unsubscribed via
unsubscribe() or by a wrapping
SafeSubscriber . |
AssertableSubscriber<T> |
AssertableSubscriber.assertValue(T value)
Assert that this Observer received exactly the given single expected value
(compared via null-safe object equals).
|
AssertableSubscriber<T> |
AssertableSubscriber.assertValueCount(int count)
Assert that this Observer received exactly the given count of
onNext signals. |
AssertableSubscriber<T> |
AssertableSubscriber.assertValues(T... values)
Assert that this Observer received exactly the given expected values
(compared via null-safe object equals) in the given order.
|
AssertableSubscriber<T> |
AssertableSubscriber.assertValuesAndClear(T expectedFirstValue,
T... 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.
|
AssertableSubscriber<T> |
AssertableSubscriber.awaitTerminalEvent()
Waits for an
onError or {code onCompleted} terminal event indefinitely. |
AssertableSubscriber<T> |
AssertableSubscriber.awaitTerminalEvent(long timeout,
TimeUnit unit)
Waits for an
onError or {code onCompleted} terminal event for the given
amount of timeout. |
AssertableSubscriber<T> |
AssertableSubscriber.awaitTerminalEventAndUnsubscribeOnTimeout(long timeout,
TimeUnit unit)
Waits for an
onError or {code onCompleted} terminal event for the given
amount of timeout and unsubscribes the sequence if the timeout passed or the
wait itself is interrupted. |
AssertableSubscriber<T> |
AssertableSubscriber.awaitValueCount(int expected,
long timeout,
TimeUnit unit)
Assert that this Observer receives at least the given number of
onNext
signals within the specified timeout period. |
AssertableSubscriber<T> |
AssertableSubscriber.perform(Action0 action)
Performs an action given by the Action0 callback in a fluent manner.
|
AssertableSubscriber<T> |
AssertableSubscriber.requestMore(long n)
Requests the specified amount of items from upstream.
|
Copyright © 2017. All rights reserved.