RX TestKit: AssertJ for RxJava
This library provides a set of AssertJ assertions that can be used to make unit testing of RxJava code a little easier.
Javadoc for this library can be found here.
RxJava 2.x
via Maven:
via Gradle
RxJava 1.x
For RxJava 1.x, the latest release of this library is 1.1.0.
via Maven:
via Gradle
Examples:
Assert that an Observable has completed…
…or hasn’t completed:
…or has values (returns an AbstractListAssert
)
…or emits a certain error (also returns an AbstractListAssert
)
…or mess around with time using a TestScheduler
:
There’s also support for rx.Single
and rx.Completable
.