Skip to content

MockMvcResultMatchers.jsonPath(String).value() should have a matching method to declare the expected type [SPR-16587] #21129

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

Closed
spring-projects-issues opened this issue Mar 13, 2018 · 3 comments
Assignees
Labels
in: test Issues in the test module status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Mar 13, 2018

Sam Brannen opened SPR-16587 and commented

#19067 was intended to introduce this support in JsonPathResultMatchers; however, it only introduced this support in JsonPathRequestMatchers and JsonPathExpectationsHelper.

This issue will therefore add this support to JsonPathResultMatchers as well.


Affects: 4.3.14, 5.0.4

Reference URL: https://stackoverflow.com/a/38013171/388980

Issue Links:

Referenced from: commits d57d914, 68463e2, 2c2ce55

Backported to: 4.3.15

@spring-projects-issues
Copy link
Collaborator Author

Sam Brannen commented

Resolved for...

@juanmbellini
Copy link

Hello, I cannot see where in the https://github.com/spring-projects/spring-framework/blob/master/spring-test/src/main/java/org/springframework/test/web/servlet/result/MockMvcResultMatchers.java the MockMvcResultMatchers#jsonPath method (code in master branch) you can specify the target type.

@juanmbellini
Copy link

I mean, I have tojsonPath(String, Object...) and call value(Matcher). Would be great if the MockMvcResultMatchers has a jsonPath(String, Matcher, Class) method.

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 status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants