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

Provide methods to add query string parameters to MockServerHttpRequest [SPR-16280] #20827

spring-issuemaster opened this issue Dec 7, 2017 · 0 comments


None yet
2 participants
Copy link

commented Dec 7, 2017

Mark Paluch opened SPR-16280 and commented

Spring Data Commons is using Webflux' MockServerHttpRequest to test HandlerMethodArgumentResolver directly without WebTestClient. These tests use query string parameters as input, and other URI components do not have any significance. Adding API to configure query string parameters would help to setup query parameters without the need to pay attention to encoding or URI representation and concatenation.

MockHttpServletRequest has such an API:

MockHttpServletRequest request = new MockHttpServletRequest();
request.addParameter("page", "0");
request.addParameter("size", "200");

The same fixture with MockServerHttpRequest looks like:

MockServerHttpRequest request = MockServerHttpRequest.get("foo?page=0&size=200").build();

Referenced from: commits a8cf275

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.