-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Labels
in: testIssues in the test moduleIssues in the test moduletype: enhancementA general enhancementA general enhancement
Milestone
Description
Valeriy Zhirnov opened SPR-16417 and commented
The current way of writing multiple expect statements is kinda verbose:
mockMvc.perform(get("/person/1"))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andExpect(jsonPath("$.person.name").value("Jason"));
I propose vararg method that can do the same in a slightly cleaner way using default interface method:
mockMvc.perform(get("/person/1"))
.andExpect(
status().isOk(),
content().contentType(MediaType.APPLICATION_JSON),
jsonPath("$.person.name").value("Jason")
);
the pull reuest are at github by the link in reference url
Affects: 5.0.3
Reference URL: #1651
Issue Links:
- Common API for MockMvc tests and for real HTTP tests #19647 MockMvc compatible API for doing real HTTP tests
Referenced from: commits c57e1af
Metadata
Metadata
Assignees
Labels
in: testIssues in the test moduleIssues in the test moduletype: enhancementA general enhancementA general enhancement