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 SummaryModifier and TypeMethodDescriptionstatic ExpectedCountbetween(int min, int max) Betweenminandmaxnumber of times.intReturn themaxboundary of the expected count range.intReturn theminboundary of the expected count range.static ExpectedCountMany times (range of 1..Integer.MAX_VALUE).static ExpectedCountmax(int max) At mostmaxnumber of times.static ExpectedCountmin(int min) At leastminnumber of times.static ExpectedCountnever()No calls expected at all, i.e.static ExpectedCountonce()Exactly once.static ExpectedCounttimes(int count) Exactly N times.static ExpectedCounttwice()Exactly twice.
- 
Method Details- 
getMinCountpublic int getMinCount()Return theminboundary of the expected count range.
- 
getMaxCountpublic int getMaxCount()Return themaxboundary of the expected count range.
- 
onceExactly once.
- 
twiceExactly twice.
- 
manyTimesMany times (range of 1..Integer.MAX_VALUE).
- 
timesExactly N times.
- 
minAt leastminnumber of times.
- 
maxAt mostmaxnumber of times.
- 
never
- 
betweenBetweenminandmaxnumber of times.
 
-