Interface RequestExpectationManager

All Known Implementing Classes:
AbstractRequestExpectationManager, SimpleRequestExpectationManager, UnorderedRequestExpectationManager

public interface RequestExpectationManager
Encapsulates the behavior required to implement MockRestServiceServer including its public API (create expectations + verify/reset) along with an extra method for verifying actual requests.

This contract is not used directly in applications but a custom implementation can be plugged in through the MockRestServiceServer builder.

Since:
4.3
Author:
Rossen Stoyanchev
  • Method Summary

    Modifier and Type
    Method
    Description
    expectRequest(ExpectedCount count, RequestMatcher requestMatcher)
    Set up a new request expectation.
    void
    Reset the internal state removing all expectations and recorded requests.
    org.springframework.http.client.ClientHttpResponse
    validateRequest(org.springframework.http.client.ClientHttpRequest request)
    Validate the given actual request against the declared expectations.
    void
    Verify that all expectations have been met.
    void
    verify(Duration timeout)
    Variant of verify() that waits for up to the specified time for all expectations to be fulfilled.