Add twice() to ExpectedCount as convenience method
This commit is contained in:
committed by
Rossen Stoyanchev
parent
9a7028ad0d
commit
c9abd99f44
@@ -26,6 +26,7 @@ import org.springframework.util.Assert;
|
||||
* import static org.springframework.test.web.client.ExpectedCount.*
|
||||
*
|
||||
* once()
|
||||
* twice()
|
||||
* manyTimes()
|
||||
* times(5)
|
||||
* min(2)
|
||||
@@ -77,6 +78,13 @@ public class ExpectedCount {
|
||||
return new ExpectedCount(1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Exactly twice.
|
||||
*/
|
||||
public static ExpectedCount twice() {
|
||||
return new ExpectedCount(2, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Many times (range of 1..Integer.MAX_VALUE).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user