Verify

As discussed previously, the verify operator is used to assert the configured behavior. The termination event for a publisher must be validated before the verify call. Alternatively, Reactor provides convenient verify methods to validate the termination event and assert the complete configured chain. Similar to expectError, the API is offered in the following methods:

Method name Description
 verifyComplete() This method only validates the occurrence of a completion event.
verifyError() This method only validates the occurrence of an error event.
verifyError(exceptionClass) This method  validates an error event and matches an underlying exception class wrapped in the error event.
verifyError(exceptionMsg) This method validates ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.