public interface ResultMatcher
See static factory methods in
org.springframework.engine.web.server.result.MockMvcResultMatchers.
Example:
static imports: MockMvcRequestBuilders.*, MockMvcResultMatchers.*
mockMvc.perform(get("/form"))
.andExpect(status().isOk())
.andExpect(content().mimeType(MediaType.APPLICATION_JSON));
| 限定符和类型 | 方法和说明 |
|---|---|
void |
match(HttpResult result)
Assert the result of an executed request.
|
void match(HttpResult result) throws Exception
result - the result of the executed requestException - if a failure occursCopyright © 2016. All rights reserved.