Assertions are central to unit testing in TC-Lite.
Assertions are written as calls to static methods of the Assert
class. If an assertion fails, the method call does not return, an error is reported and any code following the failing Assert is not executed. For that reason, it's usually best to try for one assertion per test.
Assert calls may be grouped into two Assertion Models.
Classic Model | Each supported Assert uses a separate method, whose name indicates what is being tested. |
Constraint Model | All Assertions use the same static method, Assert.That, with a Constraint argument that determines the particular test to be made. |