-
Hi, With latest xunit 2.4.2, the following
with Collection being a That's because this method is called However, the base method (called by CollectionAssert) does allow null So my code compiles and works if I write this Is this a wanted behavior to disallow enumerable null in CollectionAssert (assuming usually an Enumerable should not be null)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Actually, the question is perhaps more global on nullable In my production code, I prefer to never have the bang operator (!) as it opens to potential bug. |
Beta Was this translation helpful? Give feedback.
Actually, the question is perhaps more global on nullable
In my production code, I prefer to never have the bang operator (!) as it opens to potential bug.
In test, do you perform NotNull check or simply use bang operator everywhere? (as anyway, at worse we will end up comparing something to null or generate an exception which will make the test fail)