程序包 org.springframework.test.web.client
Contains client-side REST testing support.
接口概要 接口 说明 MockRestServiceServer.MockRestServiceServerBuilder Builder to create aMockRestServiceServer
.RequestExpectation An extension ofResponseActions
that also implementsRequestMatcher
andResponseCreator
RequestExpectationManager Encapsulates the behavior required to implementMockRestServiceServer
including its public API (create expectations + verify/reset) along with an extra method for verifying actual requests.RequestMatcher A contract for matching requests to expectations.ResponseActions A contract for setting up request expectations and defining a response.ResponseCreator A contract for creating aClientHttpResponse
.类概要 类 说明 AbstractRequestExpectationManager Base class forRequestExpectationManager
implementations responsible for storing expectations and actual requests, and checking for unsatisfied expectations at the end.AbstractRequestExpectationManager.RequestExpectationGroup Helper class to manage a group of remaining expectations.DefaultRequestExpectation Default implementation ofRequestExpectation
that simply delegates to the request matchers and the response creator it contains.DefaultRequestExpectation.RequestCount Helper class that keeps track of actual vs expected request count.ExpectedCount A simple type representing a range for an expected count.MockMvcClientHttpRequestFactory AClientHttpRequestFactory
for requests executed viaMockMvc
.MockRestServiceServer Main entry point for client-side REST testing.SimpleRequestExpectationManager SimpleRequestExpectationManager
that matches requests to expectations sequentially, i.e. in the order of declaration of expectations.UnorderedRequestExpectationManager RequestExpectationManager
that matches requests to expectations regardless of the order of declaration of expected requests.