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

Allow MockMvcTester to prepare the query without the need of static imports #32913

Closed
snicoll opened this issue May 27, 2024 · 0 comments
Closed
Assignees
Labels
in: test Issues in the test module type: enhancement A general enhancement
Milestone

Comments

@snicoll
Copy link
Member

snicoll commented May 27, 2024

MockMvcTester has been introduced in #21178 and we focused on making sure that the AssertJ support offers a declarative API when asserting on the results.

We are still relying on static imports for building the query itself. While we want to keep a way for users to do that if they so desire, we want also to offer a more declarative way of building the query.

@snicoll snicoll added type: enhancement A general enhancement theme: aot An issue related to Ahead-of-time processing labels May 27, 2024
@snicoll snicoll added this to the 6.2.0-M4 milestone May 27, 2024
@snicoll snicoll self-assigned this May 27, 2024
@snicoll snicoll added in: test Issues in the test module and removed theme: aot An issue related to Ahead-of-time processing labels May 27, 2024
snicoll added a commit that referenced this issue May 28, 2024
This commit moves the features of MockHttpServletRequestBuilder in
an abstract class so that another class can offer the same feature
whilst providing AssertJ support. This wasn't possible previously as
the builder's return type would lose the concrete builder types.

This change benefits MockMultipartHttpServletRequestBuilder that can
use the same mechanism to offer additional settings.

This change also makes it so that a builder instance can be created
using only the HttpMethod. Previously, the URI had to be provided as
well and that makes it impossible to specify it using the builder.

See gh-32913
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 type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant