erichexter/Should

ShouldNotBeType<T>() does not accept null

Opened this issue · 0 comments

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.