public class HeaderResultMatchers
extends java.lang.Object
An instance of this class is usually accessed via
MockMvcResultMatchers.header()
.
Modifier | Constructor and Description |
---|---|
protected |
HeaderResultMatchers()
Protected constructor.
|
Modifier and Type | Method and Description |
---|---|
ResultMatcher |
dateValue(java.lang.String name,
long value)
Assert the primary value of the named response header as a date String,
using the preferred date format described in RFC 7231.
|
ResultMatcher |
doesNotExist(java.lang.String name)
Assert that the named response header does not exist.
|
ResultMatcher |
longValue(java.lang.String name,
long value)
Assert the primary value of the named response header as a
long . |
ResultMatcher |
string(java.lang.String name,
<any> matcher)
Assert the primary value of the named response header with the given
Hamcrest
Matcher . |
protected HeaderResultMatchers()
MockMvcResultMatchers.header()
.public ResultMatcher string(java.lang.String name, <any> matcher)
Matcher
.public ResultMatcher doesNotExist(java.lang.String name)
public ResultMatcher longValue(java.lang.String name, long value)
long
.
The ResultMatcher
returned by this method throws an AssertionError
if the response does not contain the specified header, or if the supplied
value
does not match the primary value.
public ResultMatcher dateValue(java.lang.String name, long value)
The ResultMatcher
returned by this method throws an AssertionError
if the response does not contain the specified header, or if the supplied
value
does not match the primary value.