Component Testing for C++
The following example shows how a typical class contract is represented by Component Testing for C++. C++ classes are represented as vertical lines, like object instances. The events related to the class - method entry and exit, assertion and state chart checks - are attached to the class lifeline.
For each class, methods are shown with method entry and exit actions:
Method entry actions have a solid border,
Method exit actions have a dotted border.
Pre and post-conditions, invariants and state verifications are displayed as Notes, attached to the class instance, and contained within the method.
You can click a note to highlight the corresponding OTC Contract-Check script line in the Text Editor window.
State or transition diagram errors are identified as ILLEGAL TRANSITION or MULTIPLE TRANSITION Notes as shown in the following figure:
Related Topics
Test Driver Sequence Diagrams | About the UML/SD Viewer | UML Sequence Diagrams