接口的使用
org.springframework.test.web.client.RequestExpectation
使用RequestExpectation的程序包 程序包 说明 org.springframework.test.web.client Contains client-side REST testing support.org.springframework.test.web.client中RequestExpectation的使用
实现RequestExpectation的org.springframework.test.web.client中的类 修饰符和类型 类 说明 class
DefaultRequestExpectation
Default implementation ofRequestExpectation
that simply delegates to the request matchers and the response creator it contains.返回RequestExpectation的org.springframework.test.web.client中的方法 修饰符和类型 方法 说明 RequestExpectation
AbstractRequestExpectationManager.RequestExpectationGroup. findExpectation(ClientHttpRequest request)
Return a matching expectation, ornull
if none match.protected RequestExpectation
AbstractRequestExpectationManager. matchRequest(ClientHttpRequest request)
As of 5.0.3 subclasses should implement this method instead ofAbstractRequestExpectationManager.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).protected RequestExpectation
SimpleRequestExpectationManager. matchRequest(ClientHttpRequest request)
RequestExpectation
UnorderedRequestExpectationManager. matchRequest(ClientHttpRequest request)
返回变量类型为RequestExpectation的类型的org.springframework.test.web.client中的方法 修饰符和类型 方法 说明 protected List<RequestExpectation>
AbstractRequestExpectationManager. getExpectations()
Return a read-only list of the expectations.Set<RequestExpectation>
AbstractRequestExpectationManager.RequestExpectationGroup. getExpectations()
参数类型为RequestExpectation的org.springframework.test.web.client中的方法 修饰符和类型 方法 说明 void
AbstractRequestExpectationManager.RequestExpectationGroup. update(RequestExpectation expectation)
Invoke this for an expectation that has been matched.类型变量类型为RequestExpectation的org.springframework.test.web.client中的方法参数 修饰符和类型 方法 说明 void
AbstractRequestExpectationManager.RequestExpectationGroup. addAllExpectations(Collection<RequestExpectation> expectations)
void
AbstractRequestExpectationManager.RequestExpectationGroup. updateAll(Collection<RequestExpectation> expectations)