Should
Should copied to clipboard
ShouldNotBeType<T>() does not accept null
ShouldBeType<T>()
accepts null, while the counterpart ShouldNotBeType<T>()
does not. It's not only inconsistent, but also very inconvenient:
I don't want my assertion to throw a NullReferenceException
, because then I lose the assertion message and have no idea what the error might be.