类 HeaderResultMatchers
java.lang.Object
cn.taketoday.test.web.servlet.result.HeaderResultMatchers
Factory for response header assertions.
An instance of this class is available via
MockMvcResultMatchers.header().
- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev, Sam Brannen, Brian Clozel
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Assert the primary value of the named response header parsed into a date using the preferred date format described in RFC 7231.doesNotExist(String name) Assert that the named response header does not exist.Assert that the named response header exists.Assert the primary value of the named response header as along.Assert the primary value of the response header as a String value.Assert the primary value of the response header with the given Hamcrest StringMatcher.stringValues(String name, String... values) Assert the values of the response header as String values.stringValues(String name, org.hamcrest.Matcher<? super Iterable<String>> matcher) Assert the values of the response header with the given Hamcrest IterableMatcher.
-
构造器详细资料
-
HeaderResultMatchers
protected HeaderResultMatchers()Protected constructor. SeeMockMvcResultMatchers.header().
-
-
方法详细资料
-
string
Assert the primary value of the response header with the given Hamcrest StringMatcher. -
stringValues
public ResultMatcher stringValues(String name, org.hamcrest.Matcher<? super Iterable<String>> matcher) Assert the values of the response header with the given Hamcrest IterableMatcher. -
string
Assert the primary value of the response header as a String value. -
stringValues
Assert the values of the response header as String values. -
exists
Assert that the named response header exists. -
doesNotExist
Assert that the named response header does not exist. -
longValue
Assert the primary value of the named response header as along.The
ResultMatcherreturned by this method throws anAssertionErrorif the response does not contain the specified header, or if the suppliedvaluedoes not match the primary value. -
dateValue
Assert the primary value of the named response header parsed into a date using the preferred date format described in RFC 7231.The
ResultMatcherreturned by this method throws anAssertionErrorif the response does not contain the specified header, or if the suppliedvaluedoes not match the primary value.
-