问题
What is the difference between:
Assert.Equals
andAssert.AreEqual
Assert.NotNull
andAssert.IsNotNull
- ...
?
回答1:
Just read the documentation:
NUnit - ConditionAsserts
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.
回答2:
Assert.Equals is an object comparison
Assert.AreEquals is overloaded to compare (int,double, object) etc
Assert.NotNull and Assert.IsNotNul appear to be identical.
http://www.nunit.org/index.php?p=conditionAsserts&r=2.5.5
来源:https://stackoverflow.com/questions/6583633/nunit-assert-equals-vs-assert-areequal