Using 'extracting' with InstanceOfAssertFactory will lead to an unexpected AssertionError if the extracted value is null #3266
Labels
status: team discussion
An issue we'd like to discuss as a team to make progress
Describe the bug
AssertJ allows extracting values from the original object using "extracting" method in order to test them in a more fluent way. AssertJ also allows using InstanceOfAssertFactory in "extracting" to specify which assertions should be used to test the extracted value.
However, there's an unexpected non-null check when using InstanceOfAssertFactory, which leads to an exception being thrown if the extracted value is null. This is not the case when not using InstanceOfAssertFactory, see the example below:
Test case reproducing the bug
The text was updated successfully, but these errors were encountered: