AbstractAdds a new child suite to this suite. This method allows you to group suites and execute them all at once.
The child suite to add.
ProtectedaddRegister a new unit test.
Function to call in order to execute the test.
Name of the test we can use for referencing it later.
Tests if condition is true, and reports unit test failure if it fails.
The condition to test.
Optionalexpression: string
Optional string representation of the expression being tested.
ProtectedassertmentReports success or failure depending on the result of an expression.
If true, success is reported; otherwise, failure.
Message describing the nature of the failure.
Tests if condition is true, and reports unit test failure with a message if it fails.
The condition to test.
The message to display on failure.
Fetches the number of failed tests after running the suite.
The number of failed tests.
Fetches the list of failed tests after running the suite.
An array of failed test entries.
Runs all the tests in the suite (and sub-suites). Test results are reported to the provided output class.
The output handler for test results.
ProtectedshutCalled after all tests and child suite's tests are run. Override this method to perform cleanup after tests.
ProtectedstartCalled right before any tests are run. Override this method to perform setup before tests.
Primary class for unit testing. Override and register unit tests in the constructor, then run the tests using the desired method of output.
Example