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:
- Equality Asserts
- Identity Asserts
- Comparison Asserts
- Type Asserts
- Condition tests
- Exception Asserts
- Utility methods
Beyond the basic facilities of Assert, additional assertions are provided by the following classes:
See also: the constraint-based model of assertions.