-
Notifications
You must be signed in to change notification settings - Fork 38.9k
Closed as not planned
Labels
in: testIssues in the test moduleIssues in the test module
Description
On a standard MockMvc setup, you can register ResultHandler instances on the ResultActions via ….andDo(ResultHandler). Internally, the handler gets called with the MvcResult instance obtained through the request execution. This is the primary mechanism for projects such as Spring REST Docs to hook the API documenting feature into the interactions.
With MockMvcTester, using such a ResultHandler requires a bit more effort:
ResultHandler handler = …;
MvcTestResult result = tester.perform(…);
handler.handle(result.getMvcResult());
assertThat(result).…Do you think it would be possible to add an equivalent of ….andDo(…) to MockMvcTester so that the call chain could look like this again?
MvcTestResult result = tester.perform(…)
.andDo(…);Metadata
Metadata
Assignees
Labels
in: testIssues in the test moduleIssues in the test module