提交 74d3bceb 编写于 作者: B Brian Clozel

Add missing StatusResultMatcher for HTTP Status 451

Issue: SPR-13632
上级 9e4cf85a
...@@ -33,6 +33,7 @@ import static org.springframework.test.util.AssertionErrors.*; ...@@ -33,6 +33,7 @@ import static org.springframework.test.util.AssertionErrors.*;
* @author Keesun Baik * @author Keesun Baik
* @author Rossen Stoyanchev * @author Rossen Stoyanchev
* @author Sebastien Deleuze * @author Sebastien Deleuze
* @author Brian Clozel
* @since 3.2 * @since 3.2
*/ */
public class StatusResultMatchers { public class StatusResultMatchers {
...@@ -561,6 +562,14 @@ public class StatusResultMatchers { ...@@ -561,6 +562,14 @@ public class StatusResultMatchers {
return matcher(HttpStatus.valueOf(431)); 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). * Assert the response status code is {@code HttpStatus.INTERNAL_SERVER_ERROR} (500).
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册