CPUnit 0.95 (beta)
The REAL C++ port of JUnit.
|
This class implements functionality enabling objects to be part of the test runner chain. More...
#include <cpunit_TestRunnerDecorator.hpp>
Public Member Functions | |
TestRunnerDecorator () | |
Creates an empty decorator. | |
TestRunnerDecorator (const TestRunner *_inner) | |
virtual | ~TestRunnerDecorator () |
void | set_inner (const TestRunner *_inner) |
Sets a new inner object in the call chain. | |
ExecutionReport | inner_run (TestUnit tu) const |
Primarily meant to be called from sub-classes. | |
Private Member Functions | |
TestRunnerDecorator (const TestRunnerDecorator &) | |
TestRunnerDecorator & | operator= (const TestRunnerDecorator &) |
Private Attributes | |
std::auto_ptr< const TestRunner > | inner |
Holds the next object in the call chain. |
This class implements functionality enabling objects to be part of the test runner chain.
Subclass this class and implement the TestRunner.run method declared in TestRunner. The implementation must call TestRunnerDecorator.inner_run to invoke the next object in the chain. Implement your own functionality before and after (or around) this call as you like, and insert an object of the class at the appropriate place in TestExecutionFacade.get_test_runner.
Definition at line 55 of file cpunit_TestRunnerDecorator.hpp.
cpunit::TestRunnerDecorator::TestRunnerDecorator | ( | const TestRunnerDecorator & | ) | [private] |
cpunit::TestRunnerDecorator::TestRunnerDecorator | ( | ) |
Creates an empty decorator.
Definition at line 39 of file cpunit_TestRunnerDecorator.cpp.
cpunit::TestRunnerDecorator::TestRunnerDecorator | ( | const TestRunner * | _inner | ) |
_inner | The next object in the call chain. The decorator takes control of the passed TestRunner and will call delete on the pointer in its destructor. |
Definition at line 48 of file cpunit_TestRunnerDecorator.cpp.
cpunit::TestRunnerDecorator::~TestRunnerDecorator | ( | ) | [virtual] |
Definition at line 53 of file cpunit_TestRunnerDecorator.cpp.
cpunit::ExecutionReport cpunit::TestRunnerDecorator::inner_run | ( | TestUnit | tu | ) | const |
Primarily meant to be called from sub-classes.
Calls TestRunner.run on the next object in the call chain.
WrongSetupException | if the inner object is not set. |
Definition at line 77 of file cpunit_TestRunnerDecorator.cpp.
TestRunnerDecorator& cpunit::TestRunnerDecorator::operator= | ( | const TestRunnerDecorator & | ) | [private] |
void cpunit::TestRunnerDecorator::set_inner | ( | const TestRunner * | _inner | ) |
Sets a new inner object in the call chain.
Notice that the entire chain below this object will be replaced by the passed TestRunner.
_inner | The new test sub-chain below this object. |
WrongSetupException | if the passed inner object is NULL . |
Definition at line 64 of file cpunit_TestRunnerDecorator.cpp.
std::auto_ptr<const TestRunner> cpunit::TestRunnerDecorator::inner [private] |
Holds the next object in the call chain.
Definition at line 58 of file cpunit_TestRunnerDecorator.hpp.