CppUnit project page FAQ CppUnit home page

TestCaseDecorator Class Reference

Decorator for Test cases. More...

#include <TestCaseDecorator.h>

Inheritance diagram for TestCaseDecorator:

Inheritance graph
[legend]
Collaboration diagram for TestCaseDecorator:

Collaboration graph
[legend]

List of all members.

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.

Protected Attributes

TestCasem_test


Detailed Description

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.

Does not assume ownership of the test it decorates


Constructor & Destructor Documentation

CPPUNIT_NS_BEGIN TestCaseDecorator::TestCaseDecorator ( TestCase test  ) 

TestCaseDecorator::~TestCaseDecorator (  ) 


Member Function Documentation

std::string TestCaseDecorator::getName (  )  const [virtual]

Returns the name of the test case.

Reimplemented from TestCase.

void TestCaseDecorator::runTest (  )  [virtual]

FIXME: this should probably be pure virtual.

All the work for runTest is deferred to subclasses.

Reimplemented from TestCase.

Reimplemented in ExceptionTestCaseDecorator< ExpectedException >.

void TestCaseDecorator::setUp (  )  [virtual]

Set up context before running a test.

Reimplemented from TestFixture.

void TestCaseDecorator::tearDown (  )  [virtual]

Clean up after the test run.

Reimplemented from TestFixture.


Member Data Documentation


The documentation for this class was generated from the following files:

SourceForge Logo hosts this site. Send comments to:
CppUnit Developers