接口 RequestExpectationManager

所有已知实现类:
AbstractRequestExpectationManager, RootUriRequestExpectationManager, 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.

从以下版本开始:
4.0
作者:
Rossen Stoyanchev
  • 方法概要

    修饰符和类型
    方法
    说明
    expectRequest(ExpectedCount count, RequestMatcher requestMatcher)
    Set up a new request expectation.
    void
    Reset the internal state removing all expectations and recorded requests.
    cn.taketoday.http.client.ClientHttpResponse
    validateRequest(cn.taketoday.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.