类 SimpleRequestExpectationManager
java.lang.Object
cn.taketoday.test.web.client.AbstractRequestExpectationManager
cn.taketoday.test.web.client.SimpleRequestExpectationManager
- 所有已实现的接口:
RequestExpectationManager
Simple
RequestExpectationManager 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.0
- 作者:
- Rossen Stoyanchev, Juergen Hoeller
-
嵌套类概要
从类继承的嵌套类/接口 cn.taketoday.test.web.client.AbstractRequestExpectationManager
AbstractRequestExpectationManager.RequestExpectationGroup -
字段概要
字段修饰符和类型字段说明private Iterator<RequestExpectation>Expectations in the order of declaration (count may be > 1).Track expectations that have a remaining count. -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected voidInvoked at the time of the first actual request, which effectively means the expectations declaration phase is over.protected RequestExpectationmatchRequest(cn.taketoday.http.client.ClientHttpRequest request) subclasses should implement this method instead of#validateRequestInternal(ClientHttpRequest)in order to match the request to an expectation, leaving the call to create the response as a separate step (to be invoked by this class).voidreset()Reset the internal state removing all expectations and recorded requests.从类继承的方法 cn.taketoday.test.web.client.AbstractRequestExpectationManager
createUnexpectedRequestError, expectRequest, getExpectations, getRequestDetails, getRequests, validateRequest, verify, verify
-
字段详细资料
-
expectationIterator
Expectations in the order of declaration (count may be > 1). -
repeatExpectations
Track expectations that have a remaining count.
-
-
构造器详细资料
-
SimpleRequestExpectationManager
public SimpleRequestExpectationManager()
-
-
方法详细资料
-
afterExpectationsDeclared
protected void afterExpectationsDeclared()从类复制的说明:AbstractRequestExpectationManagerInvoked at the time of the first actual request, which effectively means the expectations declaration phase is over. -
matchRequest
protected RequestExpectation matchRequest(cn.taketoday.http.client.ClientHttpRequest request) throws IOException 从类复制的说明:AbstractRequestExpectationManagersubclasses should implement this method instead of#validateRequestInternal(ClientHttpRequest)in order to match the request to an expectation, leaving the call to create the response as a separate step (to be invoked by this class).- 覆盖:
matchRequest在类中AbstractRequestExpectationManager- 参数:
request- the current request- 返回:
- the matched expectation with its request count updated via
RequestExpectation.incrementAndValidate(). - 抛出:
IOException
-
reset
public void reset()从接口复制的说明:RequestExpectationManagerReset the internal state removing all expectations and recorded requests.This is a delegate for
MockRestServiceServer.reset().- 指定者:
reset在接口中RequestExpectationManager- 覆盖:
reset在类中AbstractRequestExpectationManager- 另请参阅:
-