Add isTooEarly() method to StatusResultMatchers

See gh-23384
This commit is contained in:
Juergen Hoeller
2019-07-30 17:37:26 +02:00
parent 4f3b89e907
commit 27aaad5a89
2 changed files with 10 additions and 13 deletions

View File

@@ -492,6 +492,14 @@ public class StatusResultMatchers {
return matcher(HttpStatus.FAILED_DEPENDENCY);
}
/**
* Assert the response status code is {@code HttpStatus.TOO_EARLY} (425).
* @since 5.2
*/
public ResultMatcher isTooEarly() {
return matcher(HttpStatus.valueOf(425));
}
/**
* Assert the response status code is {@code HttpStatus.UPGRADE_REQUIRED} (426).
*/