Test of Object-oriented Programs
- slide 26 : 35
NUnit Assertions
Assert.AreEqual(expected, actual)
18 overloads. With/without message, tolerance, object params
Assert.AreNotEqual(expected, actual)
18 overloads. With/without: message
Assert.AreSame(expected, actual)
references to same object?
3 overloads. With/without: message, object params
Assert.NotSame(expected, actual)
3 overloads. With/without: message, object params
Assert.Contains(object, anIList)
3 overloads. With/without: message, object params
Assert.Greater(arg1, arg2)
18 overloads. With/without: message, object params
Assert.Less(arg1, arg2)
18 overloads. With/without: message, object params
Assert.IsInstanceOfType(Type, object)
3 overloads. With/without: message, object params
Assert.IsNotInstanceOfType(Type, object)
3 overloads. With/without: message, object params
Assert.IsAssignableFrom(Type, object)
3 overloads. With/without: message, object params
Assert.IsNotAssignableFrom(Type, object)
3 overloads. With/without: message, object params
Assert.IsTrue(aBool)
3 overloads. With/without: message, object params
Assert.IsFalse(aBool)
3 overloads. With/without: message, object params
Assert.IsNaN(aDouble)
3 overloads. With/without: message, object params
Assert.IsEmpty(aString)
3 overloads. With/without: message, object params
Assert.IsEmpty(anICollection)
3 overloads. With/without: message, object params
Assert.IsNotEmpty(aString)
3 overloads. With/without: message, object params
Assert.IsNotEmpty(anICollection)
3 overloads. With/without: message, object params
Assert.Fail()
3 overloads. With/without: message, object params
StringAssert.Contains(expectedString, actualString)
3 overloads. With/without: message, object params
StringAssert.StartsWith(expectedString, actualString)
3 overloads. With/without: message, object params
StringAssert.EndsWith(expectedString, actualString)
3 overloads. With/without: message, object params
StringAssert.AreEqualIgnoringCase(expectedString, actualString)
3 overloads. With/without: message, object params
Consult the NUnit documentation for the full and exact set of Assertions