Back to Nunit

Classic Model

docs/articles/nunit/writing-tests/assertions/assertion-models/classic.md

latest2.9 KB
Original Source

Classic 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:

csharp
StringAssert.AreEqualIgnoringCase("Hello", myString);

The Assert class provides the most common assertions in NUnit:

Additional assertions are provided by the following classes, which are also in the NUnit.Framework.Legacy namespace:

See Also

Notes

  • The exception-family of classic asserts have not yet been moved to the legacy namespace. They have not yet full equivalents in the constraint model.