Assert.NotNull(object anObject) 与 Assert.IsNotNull(object anObject)
Assert.NotNull(object anObject) vs. Assert.IsNotNull(object anObject)
NUnit.Framework.Assert
命名空间中有这两个方法。
我只是找不到它们之间的区别。我也很好奇什么时候用哪个。
Two forms are provided for the True, False, Null and NotNull conditions. The "Is" forms are compatible with earlier versions of the NUnit framework, while those without "Is" are provided for compatibility with NUnitLite.
知道了here。
NUnit.Framework.Assert
命名空间中有这两个方法。
我只是找不到它们之间的区别。我也很好奇什么时候用哪个。
Two forms are provided for the True, False, Null and NotNull conditions. The "Is" forms are compatible with earlier versions of the NUnit framework, while those without "Is" are provided for compatibility with NUnitLite.
知道了here。