Skip to content

Allow passing non-generic HttpMessageConverter in AssertJ JSON test support #33131

@sdeleuze

Description

@sdeleuze

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.

Metadata

Metadata

Labels

in: testIssues in the test modulestatus: supersededAn issue that has been superseded by anothertype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions