Upgrade 3 to 4
This is a work in progress. Please send a PR with any amendments.
In previous versions it was possible to assert that a non-nullable type
ShouldNotBeNull, even though this logically makes no sense. For exmaple, the following would happily compile, but of course could never cause a test failure:
const long value = 1;
classconstraint was added to
ShouldNotBeNullin v4, which means the above code will no longer compile. This is a good thing because it allows you to find and fix nonsensical tests in your codebase!
All overloads that accepted a
Func<string> customMessagehave been changed to
As such, the following APIs have been removed: