类的使用
org.springframework.test.web.client.ExpectedCount
使用ExpectedCount的程序包 程序包 说明 org.springframework.test.web.client Contains client-side REST testing support.org.springframework.test.web.client中ExpectedCount的使用
返回ExpectedCount的org.springframework.test.web.client中的方法 修饰符和类型 方法 说明 static ExpectedCount
ExpectedCount. between(int min, int max)
Betweenmin
andmax
number of times.ExpectedCount
DefaultRequestExpectation.RequestCount. getExpectedCount()
static ExpectedCount
ExpectedCount. manyTimes()
Many times (range of 1..Integer.MAX_VALUE).static ExpectedCount
ExpectedCount. max(int max)
At mostmax
number of times.static ExpectedCount
ExpectedCount. min(int min)
At leastmin
number of times.static ExpectedCount
ExpectedCount. never()
No calls expected at all, i.e. min=0 and max=0.static ExpectedCount
ExpectedCount. once()
Exactly once.static ExpectedCount
ExpectedCount. times(int count)
Exactly N times.static ExpectedCount
ExpectedCount. twice()
Exactly twice.参数类型为ExpectedCount的org.springframework.test.web.client中的方法 修饰符和类型 方法 说明 ResponseActions
MockRestServiceServer. expect(ExpectedCount count, RequestMatcher matcher)
An alternative toMockRestServiceServer.expect(RequestMatcher)
that also indicates how many times the request is expected to be executed.ResponseActions
AbstractRequestExpectationManager. expectRequest(ExpectedCount count, RequestMatcher matcher)
ResponseActions
RequestExpectationManager. expectRequest(ExpectedCount count, RequestMatcher requestMatcher)
Set up a new request expectation.参数类型为ExpectedCount的org.springframework.test.web.client中的构造器 构造器 说明 DefaultRequestExpectation(ExpectedCount expectedCount, RequestMatcher requestMatcher)
Create a new request expectation that should be called a number of times as indicated byRequestCount
.RequestCount(ExpectedCount expectedCount)