类 SimpleRequestExpectationManager
- java.lang.Object
- org.springframework.test.web.client.AbstractRequestExpectationManager
- org.springframework.test.web.client.SimpleRequestExpectationManager
- 所有已实现的接口:
RequestExpectationManager
public class SimpleRequestExpectationManager extends AbstractRequestExpectationManager
SimpleRequestExpectationManager
that matches requests to expectations sequentially, i.e. in the order of declaration of expectations.When request expectations have an expected count greater than one, only the first execution is expected to match the order of declaration. Subsequent request executions may be inserted anywhere thereafter.
- 从以下版本开始:
- 4.3
- 作者:
- Rossen Stoyanchev, Juergen Hoeller
嵌套类概要
从类继承的嵌套类/接口 org.springframework.test.web.client.AbstractRequestExpectationManager
AbstractRequestExpectationManager.RequestExpectationGroup
构造器概要
构造器 构造器 说明 SimpleRequestExpectationManager()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected void
afterExpectationsDeclared()
Invoked at the time of the first actual request, which effectively means the expectations declaration phase is over.void
reset()
Reset the internal state removing all expectations and recorded requests.ClientHttpResponse
validateRequestInternal(ClientHttpRequest request)
Subclasses must implement the actual validation of the request matching to declared expectations.从类继承的方法 org.springframework.test.web.client.AbstractRequestExpectationManager
createUnexpectedRequestError, expectRequest, getExpectations, getRequestDetails, getRequests, validateRequest, verify
构造器详细资料
SimpleRequestExpectationManager
public SimpleRequestExpectationManager()
方法详细资料
afterExpectationsDeclared
protected void afterExpectationsDeclared()
从类复制的说明:AbstractRequestExpectationManager
Invoked at the time of the first actual request, which effectively means the expectations declaration phase is over.
validateRequestInternal
public ClientHttpResponse validateRequestInternal(ClientHttpRequest request) throws IOException
从类复制的说明:AbstractRequestExpectationManager
Subclasses must implement the actual validation of the request matching to declared expectations.
reset
public void reset()
从接口复制的说明:RequestExpectationManager
Reset the internal state removing all expectations and recorded requests.This is a delegate for
MockRestServiceServer.reset()
.