expectNext

Reactor provides multiple methods to assert next values. In the preceding code, we matched values using the expectNext() overloaded operator. This operator is offered in the following variants:

Operator Description
 expectNext(value1,value2.. value6) This method verifies the published values against the supplied values. The values must be matched in the order specified.
expectNext(value[]) This method verifies the published values against the supplied value array. All values must be matched in the order specified.
expectNextSequence(Iterator) This method verifies the published values against values from the configured iterator. All values must be matched in the order specified.
expectNextCount(count) This method matches ...

Get Hands-On Reactive Programming with Reactor now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.