unittest::TestSet Class Reference

#include <Assertion.hpp>

List of all members.


Detailed Description

A TestSet contains all the tests to run.
Examples:

TestAssertion.cpp.

Definition at line 224 of file Assertion.hpp.

Public Types

typedef TestSet *(* TestSetFactory )()
 Method signature for test set factory methods.

Public Member Functions

 TestSet (string name)
 Constructs a TestSet with the given name.
 ~TestSet ()
 destructor
void run (TestReport &report)
 Runs all the tests reporting the test activity to the given TestReport.
bool hasSolo ()
 Returns true if at least one test in this set is marked as solo.

Static Public Member Functions

static void runAll (TestReport &report)
 Runs all the tests of all the TestSet object.
static void run (vector< string > testCases, TestReport &report)
 Runs all the tests of the TestSet identified by the given test cases names.

Public Attributes

string name
 the name of this TestSet
SetupMethod globalSetUp
 reference to the global setup method
TeardownMethod globalTearDown
 reference to the global tear down method
list< bool > solo
 list of solo flags for the tests
list< bool > muted
 list of mute flags for the tests
list< string > names
 list of test names
list< TestFactorytests
 list of test factories

Protected Member Functions

void execute (TestReport &report, string testName, list< TestFactory >::iterator &i)
 Starts executing all the tests of this set.

Classes

class  Chain
 All the TestSet objects are chained using Chain objects. More...


Constructor & Destructor Documentation

unittest::TestSet::TestSet string  name  ) 
 

Constructs a TestSet with the given name.

Parameters:
name the name of this test set

Definition at line 195 of file Assertion.cpp.

References globalSetUp, and globalTearDown.


Member Function Documentation

bool unittest::TestSet::hasSolo  ) 
 

Returns true if at least one test in this set is marked as solo.

Returns:
true if at least one test is SOLO

Definition at line 255 of file Assertion.cpp.

References solo.

Referenced by unittest::TestSet::Chain::run().

void unittest::TestSet::run vector< string >  testCases,
TestReport report
[static]
 

Runs all the tests of the TestSet identified by the given test cases names.

Parameters:
testCases a list of TestSet name
report the TestReport object for the results

Definition at line 277 of file Assertion.cpp.

References unittest::TestSet::Chain::factory, name, names, unittest::TestSet::Chain::next, and run().

void unittest::TestSet::run TestReport report  ) 
 

Runs all the tests reporting the test activity to the given TestReport.

Parameters:
report the TestReport object for the results

Definition at line 209 of file Assertion.cpp.

References execute(), globalSetUp, names, solo, and tests.

Referenced by run().

void unittest::TestSet::runAll TestReport report  )  [static]
 

Runs all the tests of all the TestSet object.

Parameters:
report the TestReport object for the results

Definition at line 271 of file Assertion.cpp.

References unittest::TestSet::Chain::run().


The documentation for this class was generated from the following files:
Generated on Mon Jun 5 22:05:27 2006 for ut4cpp by  doxygen 1.4.6-NO