类 ExpectedCount
- java.lang.Object
- org.springframework.test.web.client.ExpectedCount
public final class ExpectedCount extends Object
A simple type representing a range for an expected count.Examples:
import static org.springframework.test.web.client.ExpectedCount.* once() twice() manyTimes() times(5) min(2) max(4) between(2, 4) never()
- 从以下版本开始:
- 4.3
- 作者:
- Rossen Stoyanchev
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 static ExpectedCount
between(int min, int max)
Betweenmin
andmax
number of times.int
getMaxCount()
Return themax
boundary of the expected count range.int
getMinCount()
Return themin
boundary of the expected count range.static ExpectedCount
manyTimes()
Many times (range of 1..Integer.MAX_VALUE).static ExpectedCount
max(int max)
At mostmax
number of times.static ExpectedCount
min(int min)
At leastmin
number of times.static ExpectedCount
never()
No calls expected at all, i.e. min=0 and max=0.static ExpectedCount
once()
Exactly once.static ExpectedCount
times(int count)
Exactly N times.static ExpectedCount
twice()
Exactly twice.
方法详细资料
getMinCount
public int getMinCount()
Return themin
boundary of the expected count range.
getMaxCount
public int getMaxCount()
Return themax
boundary of the expected count range.
once
public static ExpectedCount once()
Exactly once.
twice
public static ExpectedCount twice()
Exactly twice.
manyTimes
public static ExpectedCount manyTimes()
Many times (range of 1..Integer.MAX_VALUE).
times
public static ExpectedCount times(int count)
Exactly N times.
min
public static ExpectedCount min(int min)
At leastmin
number of times.
max
public static ExpectedCount max(int max)
At mostmax
number of times.
never
public static ExpectedCount never()
No calls expected at all, i.e. min=0 and max=0.- 从以下版本开始:
- 4.3.6
between
public static ExpectedCount between(int min, int max)
Betweenmin
andmax
number of times.