CppUnit project page | FAQ |
Decorator for Test cases. More...
#include <TestCaseDecorator.h>
Public Member Functions | |
TestCaseDecorator (TestCase *test) | |
~TestCaseDecorator () | |
std::string | getName () const |
Returns the name of the test case. | |
void | setUp () |
Set up context before running a test. | |
void | tearDown () |
Clean up after the test run. | |
void | runTest () |
FIXME: this should probably be pure virtual. | |
Public Member Functions inherited from TestCase | |
TestCase (const std::string &name) | |
Constructs a test case. | |
TestCase () | |
Constructs a test case for a suite. | |
~TestCase () | |
Destructs a test case. | |
virtual void | run (TestResult *result) |
Run the test and catch any exceptions that are triggered by it. | |
Public Member Functions inherited from TestLeaf | |
int | countTestCases () const |
int | getChildTestCount () const |
Test * | doGetChildTestAt (int index) const |
Public Member Functions inherited from Test | |
virtual | ~Test () |
virtual Test * | getChildTestAt (int index) const |
Returns the child test of the specified index. | |
virtual bool | findTestPath (const std::string &testName, TestPath &testPath) const |
Finds the test with the specified name and its parents test. | |
virtual bool | findTestPath (const Test *test, TestPath &testPath) const |
Finds the specified test and its parents test. | |
virtual Test * | findTest (const std::string &testName) const |
Finds the test with the specified name in the hierarchy. | |
virtual TestPath | resolveTestPath (const std::string &testPath) const |
Resolved the specified test path with this test acting as 'root'. | |
Public Member Functions inherited from TestFixture | |
virtual | ~TestFixture () |
Protected Attributes | |
TestCase * | m_test |
Private Member Functions | |
TestCaseDecorator (const TestCaseDecorator &) | |
TestCaseDecorator & | operator= (const TestCaseDecorator &) |
Decorator for Test cases.
TestCaseDecorator provides an alternate means to extend functionality of a test class without subclassing the test. Instead, one can subclass the decorater and use it to wrap the test class.
Assumes ownership of the test it decorates
CPPUNIT_NS_BEGIN TestCaseDecorator::TestCaseDecorator | ( | TestCase * | test | ) |
TestCaseDecorator::~TestCaseDecorator | ( | ) |
|
private |
|
virtual |
Returns the name of the test case.
Reimplemented from TestCase.
|
private |
|
virtual |
FIXME: this should probably be pure virtual.
All the work for runTest is deferred to subclasses.
Reimplemented from TestCase.
Reimplemented in ExceptionTestCaseDecorator< ExpectedException >.
|
virtual |
Set up context before running a test.
Reimplemented from TestFixture.
|
virtual |
Clean up after the test run.
Reimplemented from TestFixture.
|
protected |
Send comments to: CppUnit Developers |