Add missing StatusResultMatcher for HTTP Status 451

Issue: SPR-13632
This commit is contained in:
Brian Clozel
2015-12-29 21:23:09 +01:00
parent 9e4cf85af7
commit 74d3bceb19

View File

@@ -33,6 +33,7 @@ import static org.springframework.test.util.AssertionErrors.*;
* @author Keesun Baik
* @author Rossen Stoyanchev
* @author Sebastien Deleuze
* @author Brian Clozel
* @since 3.2
*/
public class StatusResultMatchers {
@@ -561,6 +562,14 @@ public class StatusResultMatchers {
return matcher(HttpStatus.valueOf(431));
}
/**
* Assert the response status code is {@code HttpStatus.UNAVAILABLE_FOR_LEGAL_REASONS} (451).
* @since 4.3
*/
public ResultMatcher isUnavailableForLegalReasons() {
return matcher(HttpStatus.valueOf(451));
}
/**
* Assert the response status code is {@code HttpStatus.INTERNAL_SERVER_ERROR} (500).
*/