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
extracting
should throw a proper assertion error if actual
is null
#2401
Comments
@bjhargrave as you used |
Thanks a lot for the feedback! |
I concur with @bjhargrave. I think it makes good sense to do the While strictly speaking this is not a backward-compatible change, I think practically speaking it won't cause any compatibility issues because there aren't really any legitimate use cases for calling |
Summary
Based on #2392 (comment) and further comments, the implementation of
extracting(Function, AssertFactory)
andextracting(String, AssertFactory)
inAbstractAssert
should be improved to ensure that a preliminaryisNotNull
check is performed.Example
The following assertions:
should fail with:
instead of failing with:
and:
respectively.
The text was updated successfully, but these errors were encountered: