The Assert class is used in test methods to assert a known condition. For instance, after running some logic, to assert that a result variable has an expected value, use the
Assert.Equalsmethod.
For a list of all members of this type, see Assert Members.
System.Object
csUnit.Assert
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
[TestFixture] public class MyTest { public MyTest() { } [Test] public void FirstTest() { int result = RunSomeMethod(); // Make sure the result is 25 Assert.Equals(25, result, "The result should have been 25"); } }
Namespace: csUnit
Assembly: csUnit (in csUnit.dll)
Assert Members | csUnit Namespace