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 passing non-generic HttpMessageConverter in AssertJ JSON test support #33131

Closed
sdeleuze opened this issue Jul 1, 2024 · 2 comments
Closed
Assignees
Labels
in: test Issues in the test module status: superseded An issue that has been superseded by another type: enhancement A general enhancement

Comments

@sdeleuze
Copy link
Contributor

sdeleuze commented Jul 1, 2024

As a follow-up of #33118, the following classes should be updated to allow providing a SmartHttpMessageConverter as an alternative to current GenericHttpMessageConverter arrangement in the following classes:

  • org.springframework.test.json.AbstractJsonContentAssert
  • org.springframework.test.json.AbstractJsonValueAssert
  • org.springframework.test.json.JsonContent
  • org.springframework.test.web.servlet.assertj.AbstractMockHttpServletResponseAssert
  • org.springframework.test.web.servlet.assertj.DefaultMvcTestResult
  • org.springframework.test.web.servlet.assertj.MockMvcTester
  • org.springframework.test.json.JsonPathValueAssert
  • org.springframework.test.web.servlet.assertj.MvcTestResultAssert
    FYI we are considering using this contract for the upcoming Jackson 3 support.

End-users may also provide non-smart non-generic HttpMessageConverter, so maybe we should just use HttpMessageConverter arguments + instanceOf checks to support the 3 variants, check 4555384 for inspiration.

@sdeleuze sdeleuze added in: test Issues in the test module type: enhancement A general enhancement labels Jul 1, 2024
@sdeleuze sdeleuze added this to the 6.2.0-M5 milestone Jul 1, 2024
@snicoll
Copy link
Member

snicoll commented Jul 3, 2024

I am working on this to attempt to minimize the code change necessary to support SmartHttpMessageConverter as my need do not require the added contract.

@snicoll
Copy link
Member

snicoll commented Jul 4, 2024

As discussed in #33148, this ask made me realize we should improve things in a way that this issue is no longer relevant.

Superseded by #33148.

@snicoll snicoll closed this as not planned Won't fix, can't repro, duplicate, stale Jul 4, 2024
@snicoll snicoll added the status: superseded An issue that has been superseded by another label Jul 4, 2024
@snicoll snicoll removed this from the 6.2.0-M5 milestone Jul 4, 2024
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: superseded An issue that has been superseded by another type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants