Skip to content

Introduce generic assertion hooks in MockMvc #23330

Closed as not planned
Closed as not planned
@sbrannen

Description

@sbrannen

Overview

As discussed in #21178 (comment), it would be possible to provide generic hooks in MockMvc APIs that allow one to use any assertion library of choice. Such generic hooks could even be used for purposes other than performing assertions.

Due to the usefulness of such general purpose hooks, we should consider introducing them in various MockMvc APIs even if we do not provide specific support for a fluent assertion API such as AssertJ (see gh-21178).

The introduction of such hooks would also align with similar support provided in WebTestClient -- for example, WebTestClient.BodySpec.value(Consumer<B>).

Deliverables

TBD

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: testIssues in the test modulein: webIssues in web modules (web, webmvc, webflux, websocket)status: duplicateA duplicate of another issuetype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions