Class UnorderedRequestExpectationManager
- java.lang.Object
 - org.springframework.test.web.client.AbstractRequestExpectationManager
 - org.springframework.test.web.client.UnorderedRequestExpectationManager
 
- All Implemented Interfaces:
 RequestExpectationManager
public class UnorderedRequestExpectationManager extends AbstractRequestExpectationManager
RequestExpectationManagerthat matches requests to expectations regardless of the order of declaration of expected requests.- Since:
 - 4.3
 - Author:
 - Rossen Stoyanchev
 
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.test.web.client.AbstractRequestExpectationManager
AbstractRequestExpectationManager.RequestExpectationGroup
Constructor Summary
Constructors Constructor Description UnorderedRequestExpectationManager()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidafterExpectationsDeclared()Invoked at the time of the first actual request, which effectively means the expectations declaration phase is over.voidreset()Reset the internal state removing all expectations and recorded requests.ClientHttpResponsevalidateRequestInternal(ClientHttpRequest request)Subclasses must implement the actual validation of the request matching to declared expectations.Methods inherited from class org.springframework.test.web.client.AbstractRequestExpectationManager
createUnexpectedRequestError, expectRequest, getExpectations, getRequestDetails, getRequests, validateRequest, verify
Constructor Detail
UnorderedRequestExpectationManager
public UnorderedRequestExpectationManager()
Method Detail
afterExpectationsDeclared
protected void afterExpectationsDeclared()
Description copied from class:AbstractRequestExpectationManagerInvoked at the time of the first actual request, which effectively means the expectations declaration phase is over.- Overrides:
 afterExpectationsDeclaredin classAbstractRequestExpectationManager
validateRequestInternal
public ClientHttpResponse validateRequestInternal(ClientHttpRequest request) throws IOException
Description copied from class:AbstractRequestExpectationManagerSubclasses must implement the actual validation of the request matching to declared expectations.- Specified by:
 validateRequestInternalin classAbstractRequestExpectationManager- Throws:
 IOException
reset
public void reset()
Description copied from interface:RequestExpectationManagerReset the internal state removing all expectations and recorded requests.This is a delegate for
MockRestServiceServer.reset().- Specified by:
 resetin interfaceRequestExpectationManager- Overrides:
 resetin classAbstractRequestExpectationManager- See Also:
 MockRestServiceServer.reset()