The diagram below gives you an overview about the classes related to tests.
- Test
This is the central interface of all unit test framework. It defines three different operations, setUp,
test and tearDown that embody the three stages in the life cycle of a unit test. Separating this
basic concept into an interfaces allows to treat all kind of tests, so test cases, test suites or
some sort of test case adapter exactly the same.
- TestCase
A test case is an item that test exactly one aspect of the units functionality. The class TestCase is
abstract. That means the operations for set-up, test execution and tear-down are implemented with no
functionality. So TestCase serves as base class for real test cases.
- TestSuite
Test suites contain other test. The contained tests could be some kind of test case or again
test suites. This allows the constrcution of test suite trees similar to a directory tree in
a file system. Test suites could be configuzred so that they always execute every test they
conatin or that they stop after the first conatined test had failed.
- TestCaseAdapter
This is a template that constructs test cases from ordinary global functions.
Functors could not only be used for the test action but also for set-up and
tear-down activities.