类 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.
构造器概要
构造器 限定符 构造器 说明 protected
RequestExpectationGroup()
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 void
addAllExpectations(Collection<RequestExpectation> expectations)
RequestExpectation
findExpectation(ClientHttpRequest request)
Return a matching expectation, ornull
if none match.Set<RequestExpectation>
getExpectations()
void
reset()
Reset all expectations for this group.void
update(RequestExpectation expectation)
Invoke this for an expectation that has been matched.void
updateAll(Collection<RequestExpectation> expectations)
已过时。as of 5.0.3, if favor ofaddAllExpectations(java.util.Collection<org.springframework.test.web.client.RequestExpectation>)
构造器详细资料
RequestExpectationGroup
protected RequestExpectationGroup()
方法详细资料
addAllExpectations
public void addAllExpectations(Collection<RequestExpectation> expectations)
getExpectations
public Set<RequestExpectation> getExpectations()
findExpectation
@Nullable public RequestExpectation findExpectation(ClientHttpRequest request) throws IOException
Return a matching expectation, ornull
if none match.- 抛出:
IOException
update
public void update(RequestExpectation expectation)
Invoke this for an expectation that has been matched.The count of the given expectation is incremented, then it is either stored if remainingCount > 0 or removed otherwise.
updateAll
@Deprecated public void updateAll(Collection<RequestExpectation> expectations)
已过时。as of 5.0.3, if favor ofaddAllExpectations(java.util.Collection<org.springframework.test.web.client.RequestExpectation>)
Add expectations to this group.
reset
public void reset()
Reset all expectations for this group.