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
Assert
[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 Namespace
Assembly: csUnit.dll