DataTestSuite< Fixture > Class Template Reference

#include <DataTestSuite.h> [code]

Inherits TestSuite.

Inheritance diagram for DataTestSuite< Fixture >:

Inheritance graph
[legend]
Collaboration diagram for DataTestSuite< Fixture >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class Fixture>
class DataTestSuite< Fixture >

Generate a test for fixture method containing a number of data tests.

A data test suite is created when you want to run the same test over a number of different data tests (e.g in order to test different boundary conditions).

The data suite creates a test for each data test declared for a method of a Fixture.

Definition at line 30 of file DataTestSuite.h.

Public Member Functions

 DataTestSuite (std::string name, TestMethod test, TestMethodData data, typename Fixture::TestSuiteBuilderContextType &context)
 ~DataTestSuite ()
std::string toString () const

Private Types

typedef CppUnitVector< std::pair<
std::string, void * > > 
Data
typedef void(Fixture::* TestMethod )()
typedef Data(Fixture::* TestMethodData )()

Private Member Functions

 DataTestSuite (const DataTestSuite &other)
DataTestSuiteoperator= (const DataTestSuite &other)


Member Typedef Documentation

template<class Fixture>
typedef CppUnitVector<std::pair <std::string, void *> > DataTestSuite< Fixture >::Data [private]
 

Definition at line 32 of file DataTestSuite.h.

template<class Fixture>
typedef void(Fixture::* DataTestSuite< Fixture >::TestMethod)() [private]
 

Definition at line 33 of file DataTestSuite.h.

template<class Fixture>
typedef Data(Fixture::* DataTestSuite< Fixture >::TestMethodData)() [private]
 

Definition at line 34 of file DataTestSuite.h.


Constructor & Destructor Documentation

template<class Fixture>
DataTestSuite< Fixture >::DataTestSuite std::string  name,
TestMethod  test,
TestMethodData  data,
typename Fixture::TestSuiteBuilderContextType &  context
[inline]
 

Constructor for DataTestSuite. This constructor does not create a new Fixture instance but accepts an existing one as parameter. The DataTestSuite will own the Fixture object and delete it in its destructor.

Parameters:
name name of this DataTestSuite
test the method this DataTestSuite calls in runTest()
data the method returning the data for each runTest() invokation.
fixture the Fixture to invoke the test method on.

Definition at line 47 of file DataTestSuite.h.

template<class Fixture>
DataTestSuite< Fixture >::~DataTestSuite  )  [inline]
 

Definition at line 64 of file DataTestSuite.h.

template<class Fixture>
DataTestSuite< Fixture >::DataTestSuite const DataTestSuite< Fixture > &  other  )  [private]
 


Member Function Documentation

template<class Fixture>
DataTestSuite& DataTestSuite< Fixture >::operator= const DataTestSuite< Fixture > &  other  )  [private]
 

template<class Fixture>
std::string DataTestSuite< Fixture >::toString  )  const [inline]
 

Definition at line 68 of file DataTestSuite.h.


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