Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Step Verifier

Pragya Keshap answered on February 16, 2023 Popularity 2/10 Helpfulness 1/10

Contents


More Related Answers


Step Verifier

0

A StepVerifier provides a declarative way of creating a verifiable script for an async Publisher sequence, by expressing expectations about the events that will happen upon subscription. The verification must be triggered after the terminal expectations (completion, error, cancellation) have been declared, by calling one of the verify() methods.

Create a StepVerifier around a Publisher using create(Publisher) or withVirtualTime(Supplier) (in which case you should lazily create the publisher inside the provided lambda).

Set up individual value expectations using expectNext, expectNextMatches(Predicate), assertNext(Consumer), expectNextCount(long) or expectNextSequence(Iterable).

Trigger subscription actions during the verification using either thenRequest(long) or thenCancel().

Finalize the test scenario using a terminal expectation: expectComplete(), expectError(), expectError(Class), expectErrorMatches(Predicate), or thenCancel().

Trigger the verification of the resulting StepVerifier on its Publisher using either verify() or verify(Duration). (note some of the terminal expectations above have a "verify" prefixed alternative that both declare the expectation and trigger the verification).

If any expectations failed, an AssertionError will be thrown indicating the failures.

Popularity 2/10 Helpfulness 1/10 Language java
Source: Grepper
Tags: java step
Link to this answer
Share Copy Link
Contributed on Feb 16 2023
Pragya Keshap
0 Answers  Avg Quality 2/10


X

Continue with Google

By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
X
Grepper Account Login Required

Oops, You will need to install Grepper and log-in to perform this action.