Add twice() to ExpectedCount as convenience method

This commit is contained in:
Drummond Dawson
2016-11-30 22:58:52 -05:00
committed by Rossen Stoyanchev
parent 9a7028ad0d
commit c9abd99f44
4 changed files with 23 additions and 12 deletions

View File

@@ -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).
*/