I have a reference type implementing IComparable<T> that I assert to be null:
The test unexpectedly fails when the value is indeed null (verified in the debugger). When I change the assertion to explicitly check for null, the test passes:
I determined that the assertion is of type ComparableTypeAssertions<> and found the implementation of BeNull here:
I am not versed in the Execute.Verification syntax, but I did notice that both the BeNull and NotBeNull methods have the same condition:
As those two conditions are the inverse of each other, this seems incorrect and a possible culprit for the expected outcome of BeNull.