CppUnit project page FAQ CppUnit home page

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

TestDecorator Class Reference

Decorator for Tests. More...

#include <TestDecorator.h>

Inheritance diagram for TestDecorator:

Inheritance graph
[legend]
Collaboration diagram for TestDecorator:

Collaboration graph
[legend]
List of all members.

Public Methods

 TestDecorator (Test *test)
 ~TestDecorator ()
int countTestCases () const
 Return the number of test cases invoked by run(). More...

std::string getName () const
 Returns the test name. More...

void run (TestResult *result)
 Run the test, collecting results. More...

int getChildTestCount () const
 Returns the number of direct child of the test. More...


Protected Methods

TestdoGetChildTestAt (int index) const
 Returns the child test of the specified valid index. More...


Protected Attributes

Testm_test

Private Methods

 TestDecorator (const TestDecorator &)
void operator= (const TestDecorator &)

Detailed Description

Decorator for Tests.

TestDecorator 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 TestDecorator::TestDecorator Test   test
 

TestDecorator::~TestDecorator  
 

TestDecorator::TestDecorator const TestDecorator &    [private]
 


Member Function Documentation

int TestDecorator::countTestCases   const [virtual]
 

Return the number of test cases invoked by run().

The base unit of testing is the class TestCase. This method returns the number of TestCase objects invoked by the run() method.

Implements Test.

Reimplemented in RepeatedTest.

Test * TestDecorator::doGetChildTestAt int    index const [protected, virtual]
 

Returns the child test of the specified valid index.

Parameters:
index  Zero based valid index of the child test to return.
Returns:
Pointer on the test. Never NULL.

Implements Test.

int TestDecorator::getChildTestCount   const [virtual]
 

Returns the number of direct child of the test.

Implements Test.

std::string TestDecorator::getName   const [virtual]
 

Returns the test name.

Each test has a name. This name may be used to find the test in a suite or registry of tests.

Implements Test.

void TestDecorator::operator= const TestDecorator &    [private]
 

void TestDecorator::run TestResult   result [virtual]
 

Run the test, collecting results.

Implements Test.

Reimplemented in RepeatedTest.


Member Data Documentation

Test* TestDecorator::m_test [protected]
 


The documentation for this class was generated from the following files:
SourceForge Logo hosts this site. Send comments to:
CppUnit Developers