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

Override JsonPathAssertions "equals" method to fail always [SPR-17091] #21628

spring-projects-issues opened this issue Jul 26, 2018 · 1 comment
in: test type: enhancement


Copy link

@spring-projects-issues spring-projects-issues commented Jul 26, 2018

Henning Vogt opened SPR-17091 and commented

org.springframework.test.web.reactive.server.JsonPathAssertions does not have an equals method, thus this Unit-test will always pass:

ResponseSpec spec = this.client.get().uri("/aaa/select?q=*:*").exchange();

I'd suggest to override equals in JsonPathAssertions, makin it "fail()" always, pointing the user to the correct isEqualTo() method. (probably throw an AssertionError or something like that...?)

Affects: 5.0.7

Referenced from: commits fcbf06f

Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jul 27, 2018

Rossen Stoyanchev commented

Okay I've done just that for JSON and XML assertions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: test type: enhancement
None yet

No branches or pull requests

2 participants