mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-20 12:19:16 +00:00
This commit benefits from a feature introduced in AssertJ 3.26.0, see https://github.com/assertj/assertj/pull/3377. This allows to use any AssertFactory and convert the actual value to the type the factory manages. Previously, we were using ParameterizedTypeReference to express the type with its generic signature but the returned assert object would not be narrowed to the converted type. Thanks to this change, we can request to convert the actual value to `InstanceOfAssertFactories.list(Member.class)` and get a `ListAssert` of `Member` as a result, rather than an `ObjectAssert` of `List<User>`. Thanks very much to @scordio for his efforts. Closes gh-32953