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

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

Closed
spring-projects-issues opened this issue Mar 13, 2018 · 3 comments

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues 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:

  • #19067 MockMvcResultMatchers.jsonPath(String).value() should have a matching method to declare the expected type

Referenced from: commits d57d914, 68463e2, 2c2ce55

Backported to: 4.3.15

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Mar 13, 2018

Sam Brannen commented

Resolved for...

@juanmbellini
Copy link

@juanmbellini juanmbellini commented Jun 12, 2019

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

@juanmbellini juanmbellini commented Jun 12, 2019

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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.