| 程序包 | 说明 |
|---|---|
| com.github.yongchristophertang.engine.web | |
| com.github.yongchristophertang.engine.web.response |
| 限定符和类型 | 方法和说明 |
|---|---|
WebTemplateBuilder |
WebTemplateBuilder.alwaysExpect(ResultMatcher resultMatcher)
Set global default
ResultMatcher for built WebTemplate. |
ResultActions |
ResultActions.andExpect(ResultMatcher matcher)
Provide an expectation.
|
| 限定符和类型 | 方法和说明 |
|---|---|
ResultMatcher |
JsonPathResultMatchers.arraySize(int size)
Evaluate the JSON path and assert the array found has the expected size.
|
ResultMatcher |
ContentResultMatchers.contentType(String contentType)
Assert the Http Response content type.
|
ResultMatcher |
JsonPathResultMatchers.doesNotExist()
Evaluate the JSON path and assert not content was found.
|
ResultMatcher |
JsonPathResultMatchers.exists()
Evaluate the JSONPath and assert that content exists.
|
ResultMatcher |
ContentResultMatchers.header(String headerName,
org.hamcrest.Matcher<? super String> matcher)
Assert the first response header for the
headerName. |
ResultMatcher |
ContentResultMatchers.headers(String headerName,
org.hamcrest.Matcher<? super List<String>> matcher)
Assert all the response headers for the
headerName. |
ResultMatcher |
StatusResultMatchers.is(int status)
Assert the response status code is equal to an integer value.
|
ResultMatcher |
StatusResultMatchers.is(org.hamcrest.Matcher<Integer> matcher)
Assert the response status code with the given Hamcrest
Matcher. |
ResultMatcher |
JsonPathResultMatchers.isArray()
Evaluate the JSON path and assert the content found is an array.
|
static <T> ResultMatcher |
HttpResultMatchers.jsonPath(String expression,
org.hamcrest.Matcher<T> matcher)
Access to response body assertions using a JSONPath expression to
inspect a specific subset of the body and a Hamcrest match for asserting
the value found at the JSON path.
|
static <T> ResultMatcher |
HttpResultMatchers.jsonPath(String expression,
T expected)
Inspect a specific subset of the body and compare it with the expected value
expected. |
ResultMatcher |
StatusResultMatchers.reason(org.hamcrest.Matcher<? super String> matcher)
Assert the Servlet response error message with the given Hamcrest
Matcher. |
ResultMatcher |
StatusResultMatchers.reason(String reason)
Assert the Servlet response error message.
|
ResultMatcher |
ContentResultMatchers.string(org.hamcrest.Matcher<? super String> matcher)
Assert the response body content with a Hamcrest
Matcher. |
ResultMatcher |
ContentResultMatchers.string(String content)
Assert the response body content as a String.
|
<T> ResultMatcher |
JsonPathResultMatchers.value(org.hamcrest.Matcher<T> matcher)
Evaluate the JSONPath and assert the value of the content found with the
given Hamcrest
Matcher. |
ResultMatcher |
JsonPathResultMatchers.value(Object value)
Evaluate the JSONPath and assert the value of the content found.
|
| 限定符和类型 | 方法和说明 |
|---|---|
ResultActions |
DefaultResultActions.andExpect(ResultMatcher matcher)
Provide an expectation.
|
Copyright © 2016. All rights reserved.