Class ExpectedCount
- java.lang.Object
 - org.springframework.test.web.client.ExpectedCount
 
public class ExpectedCount extends Object
A simple type representing a range for an expected count.Examples:
import static org.springframework.test.web.client.ExpectedCount.* once() manyTimes() times(5) min(2) max(4) between(2, 4) never()
- Since:
 - 4.3
 - Author:
 - Rossen Stoyanchev
 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExpectedCountbetween(int min, int max)Betweenminandmaxnumber of times.intgetMaxCount()Return themaxboundary of the expected count range.intgetMinCount()Return theminboundary of the expected count range.static ExpectedCountmanyTimes()Many 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.
Method Detail
getMinCount
public int getMinCount()
Return theminboundary of the expected count range.
getMaxCount
public int getMaxCount()
Return themaxboundary of the expected count range.
once
public static ExpectedCount once()
Exactly once.
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 leastminnumber of times.
max
public static ExpectedCount max(int max)
At mostmaxnumber of times.
never
public static ExpectedCount never()
No calls expected at all, i.e. min=0 and max=0.- Since:
 - 4.3.6
 
between
public static ExpectedCount between(int min, int max)
Betweenminandmaxnumber of times.