类 AbstractRequestExpectationManager.RequestExpectationGroup
- java.lang.Object
- org.springframework.test.web.client.AbstractRequestExpectationManager.RequestExpectationGroup
protected static class AbstractRequestExpectationManager.RequestExpectationGroup extends Object
Helper class to manage a group of remaining expectations.
构造器概要
构造器 限定符 构造器 说明 protectedRequestExpectationGroup()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 RequestExpectationfindExpectation(ClientHttpRequest request)Return a matching expectation, ornullif none match.Set<RequestExpectation>getExpectations()voidreset()Reset all expectations for this group.voidupdate(RequestExpectation expectation)Invoke this for an expectation that has been matched.voidupdateAll(Collection<RequestExpectation> expectations)Collection variant ofupdate(RequestExpectation)that can be used to insert expectations.
构造器详细资料
RequestExpectationGroup
protected RequestExpectationGroup()
方法详细资料
getExpectations
public Set<RequestExpectation> getExpectations()
findExpectation
public RequestExpectation findExpectation(ClientHttpRequest request) throws IOException
Return a matching expectation, ornullif none match.- 抛出:
IOException
update
public void update(RequestExpectation expectation)
Invoke this for an expectation that has been matched.The given expectation will either be stored if it has a remaining count or it will be removed otherwise.
updateAll
public void updateAll(Collection<RequestExpectation> expectations)
Collection variant ofupdate(RequestExpectation)that can be used to insert expectations.
reset
public void reset()
Reset all expectations for this group.