NUnit 2.4.8 Legacy Documentation. View NUnit 3 Documentation

Classic Assert Model

The classic Assert model uses a separate method to express each individual assertion of which it is capable.

Here's a simple assert using the classic model:

      StringAssert.AreEqualIgnoringCase( "Hello", myString );

The Assert class provides the most commonly used assertions. For convenience of presentation, we group Assert methods as follows:

Beyond the basic facilities of Assert, additional assertions are provided by the following classes:

See also: the constraint-based model of assertions.