接口的使用
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中的类 修饰符和类型 类 说明 classDefaultRequestExpectationDefault implementation ofRequestExpectationthat simply delegates to the request matchers and the response creator it contains.返回RequestExpectation的org.springframework.test.web.client中的方法 修饰符和类型 方法 说明 RequestExpectationAbstractRequestExpectationManager.RequestExpectationGroup. findExpectation(ClientHttpRequest request)Return a matching expectation, ornullif none match.protected RequestExpectationAbstractRequestExpectationManager. 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 RequestExpectationSimpleRequestExpectationManager. matchRequest(ClientHttpRequest request)RequestExpectationUnorderedRequestExpectationManager. 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中的方法 修饰符和类型 方法 说明 voidAbstractRequestExpectationManager.RequestExpectationGroup. update(RequestExpectation expectation)Invoke this for an expectation that has been matched.类型变量类型为RequestExpectation的org.springframework.test.web.client中的方法参数 修饰符和类型 方法 说明 voidAbstractRequestExpectationManager.RequestExpectationGroup. addAllExpectations(Collection<RequestExpectation> expectations)voidAbstractRequestExpectationManager.RequestExpectationGroup. updateAll(Collection<RequestExpectation> expectations)