Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Kotlin DSL for ResultActions.andExpectAll() #27317

Closed
2 tasks done
sbrannen opened this issue Aug 23, 2021 · 1 comment · Fixed by #29727 or #29766
Closed
2 tasks done

Introduce Kotlin DSL for ResultActions.andExpectAll() #27317

sbrannen opened this issue Aug 23, 2021 · 1 comment · Fixed by #29727 or #29766
Assignees
Labels
in: test Issues in the test module in: web Issues in web modules (web, webmvc, webflux, websocket) status: superseded An issue that has been superseded by another theme: kotlin An issue related to Kotlin support type: enhancement A general enhancement

Comments

@sbrannen
Copy link
Member

sbrannen commented Aug 23, 2021

Overview

Commit dd9b99e introduced ResultActions.andExpectAll() to support soft assertions in MockMvc.

ResultActionsDsl.kt already has support for andExpect().

Related Issues

Deliverables

@sbrannen sbrannen added in: test Issues in the test module in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement labels Aug 23, 2021
@sbrannen sbrannen added this to the 5.3.10 milestone Aug 23, 2021
@snicoll snicoll modified the milestones: 5.3.10, 5.3.11 Sep 14, 2021
@sbrannen sbrannen modified the milestones: 5.3.11, 5.3.12 Oct 12, 2021
@jhoeller jhoeller modified the milestones: 5.3.12, 5.3.13 Oct 18, 2021
@jhoeller jhoeller modified the milestones: 5.3.13, 6.0.x Nov 1, 2021
@sdeleuze sdeleuze added the theme: kotlin An issue related to Kotlin support label Jan 19, 2022
@sdeleuze sdeleuze removed their assignment Jan 19, 2022
@simonbasle simonbasle self-assigned this Dec 21, 2022
simonbasle added a commit to simonbasle/spring-framework that referenced this issue Dec 21, 2022
As the DSL internally calls ResultActions.andExpect, this is done with
a trick where a synthetic ResultActions is provided at top level which
stores each ResultMatcher in a mutable list. Once the DSL usage is done,
 the top level DSL andExpectAll turns that list into a vararg passed
 down to the actual `actions.andExpectAll`.

Fixes spring-projectsgh-27317.
simonbasle added a commit that referenced this issue Jan 3, 2023
As the DSL internally calls `ResultActions.andExpect`, this is done with
a trick where a synthetic `ResultActions` is provided at top level which
stores each `ResultMatcher` in a mutable list.

Once the DSL usage is done, the top level DSL `andExpectAll` turns that
list into a `vararg` passed down to the actual `actions.andExpectAll`.

Closes gh-27317
@jhoeller jhoeller modified the milestones: 6.0.x, 6.0.4 Jan 3, 2023
simonbasle added a commit to simonbasle/spring-framework that referenced this issue Jan 4, 2023
…e manual

This just adds a Kotlin snippet alongside the Java snippet in the
reference manual.

Relates to spring-projectsgh-29727
Closes spring-projectsgh-27317
simonbasle added a commit that referenced this issue Jan 4, 2023
This just adds a Kotlin snippet alongside the Java snippet in the
reference manual.

Relates to gh-29727
Closes gh-27317
@sbrannen sbrannen removed this from the 6.0.4 milestone Jan 24, 2023
@sbrannen
Copy link
Member Author

@sbrannen sbrannen added the status: superseded An issue that has been superseded by another label Jan 24, 2023
mdeinum pushed a commit to mdeinum/spring-framework that referenced this issue Jun 29, 2023
As the DSL internally calls `ResultActions.andExpect`, this is done with
a trick where a synthetic `ResultActions` is provided at top level which
stores each `ResultMatcher` in a mutable list.

Once the DSL usage is done, the top level DSL `andExpectAll` turns that
list into a `vararg` passed down to the actual `actions.andExpectAll`.

Closes spring-projectsgh-27317
mdeinum pushed a commit to mdeinum/spring-framework that referenced this issue Jun 29, 2023
…e manual (spring-projects#29766)

This just adds a Kotlin snippet alongside the Java snippet in the
reference manual.

Relates to spring-projectsgh-29727
Closes spring-projectsgh-27317
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test Issues in the test module in: web Issues in web modules (web, webmvc, webflux, websocket) status: superseded An issue that has been superseded by another theme: kotlin An issue related to Kotlin support type: enhancement A general enhancement
Projects
None yet
5 participants