CppUnit project page FAQ CppUnit home page

TestSuiteBuilderContextBase Class Reference

Context used when creating test suite in HelperMacros. More...

#include <TestSuiteBuilderContext.h>

Inheritance diagram for TestSuiteBuilderContextBase:

Inheritance graph
Collaboration diagram for TestSuiteBuilderContextBase:

Collaboration graph

List of all members.

Public Member Functions

 TestSuiteBuilderContextBase (TestSuite &suite, const TestNamer &namer, TestFixtureFactory &factory)
 Constructs a new context.
virtual ~TestSuiteBuilderContextBase ()
void addTest (Test *test)
 Adds a test to the fixture suite.
std::string getFixtureName () const
 Returns the fixture name.
std::string getTestNameFor (const std::string &testMethodName) const
 Returns the name of the test for the specified method.
void addProperty (const std::string &key, const std::string &value)
 Adds property pair.
const std::string getStringProperty (const std::string &key) const
 Returns property value assigned to param key.

Protected Types

typedef std::pair< std::string,
std::string > 
typedef CppUnitVector< PropertyProperties

Protected Member Functions

TestFixturemakeTestFixture () const

Protected Attributes

const TestNamerm_namer

Private Attributes

Properties m_properties

Detailed Description

Context used when creating test suite in HelperMacros.

Base class for all context used when creating test suite. The actual context type during test suite creation is TestSuiteBuilderContext.

See also:

Member Typedef Documentation

typedef CppUnitVector<Property> TestSuiteBuilderContextBase::Properties [protected]

typedef std::pair<std::string,std::string> TestSuiteBuilderContextBase::Property [protected]

Constructor & Destructor Documentation

CPPUNIT_NS_BEGIN TestSuiteBuilderContextBase::TestSuiteBuilderContextBase ( TestSuite suite,
const TestNamer namer,
TestFixtureFactory factory 

Constructs a new context.

You should not use this. The context is created in CPPUNIT_TEST_SUITE().

TestSuiteBuilderContextBase::~TestSuiteBuilderContextBase (  )  [virtual]

Member Function Documentation

void TestSuiteBuilderContextBase::addProperty ( const std::string &  key,
const std::string &  value 

Adds property pair.

key PropertyKey string to add.
value PropertyValue string to add.

void TestSuiteBuilderContextBase::addTest ( Test test  ) 

Adds a test to the fixture suite.

test Test to add to the fixture suite. Must not be NULL.

std::string TestSuiteBuilderContextBase::getFixtureName (  )  const

Returns the fixture name.

Fixture name. It is the name used to name the fixture suite.

const std::string TestSuiteBuilderContextBase::getStringProperty ( const std::string &  key  )  const

Returns property value assigned to param key.

key PropertyKey string.

std::string TestSuiteBuilderContextBase::getTestNameFor ( const std::string &  testMethodName  )  const

Returns the name of the test for the specified method.

testMethodName Name of the method that implements a test.
A string that is the concatenation of the test fixture name (returned by getFixtureName()) andtestMethodName, separated using '::'. This provides a fairly unique name for a given test.

TestFixture * TestSuiteBuilderContextBase::makeTestFixture (  )  const [protected]

Member Data Documentation

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

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