Class ExpectedCount
java.lang.Object
org.springframework.test.web.client.ExpectedCount
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()
- Since:
- 4.3
- Author:
- Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExpectedCount
between
(int min, int max) Betweenmin
andmax
number of times.int
Return themax
boundary of the expected count range.int
Return themin
boundary of the expected count range.static ExpectedCount
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.static ExpectedCount
once()
Exactly once.static ExpectedCount
times
(int count) Exactly N times.static ExpectedCount
twice()
Exactly twice.
-
Method Details
-
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
Exactly once. -
twice
Exactly twice. -
manyTimes
Many times (range of 1..Integer.MAX_VALUE). -
times
Exactly N times. -
min
At leastmin
number of times. -
max
At mostmax
number of times. -
never
No calls expected at all, i.e. min=0 and max=0.- Since:
- 4.3.6
-
between
Betweenmin
andmax
number of times.
-