Frobby  0.9.5
Public Member Functions | Private Attributes | List of all members
Test Class Referenceabstract

This class represents a test or a suite of tests according to the Composite Pattern. More...

#include <Test.h>

Inheritance diagram for Test:
TestCase TestSuite

Public Member Functions

 Test (const string &name)
 Construct a Test with the given name. More...
 
virtual ~Test ()
 
virtual bool accept (TestVisitor &visitor)=0
 Makes the visitor visit this object as per the Visitor Pattern. More...
 
const string & getName () const
 Returns the name passed to the constructor. More...
 
bool operator< (const Test &test) const
 Compares names lexicographically. More...
 

Private Attributes

string _name
 The name passed to the constructor. More...
 

Detailed Description

This class represents a test or a suite of tests according to the Composite Pattern.

The hierarchy of tests can be traversed according to the Visitor Pattern.

Definition at line 29 of file Test.h.

Constructor & Destructor Documentation

◆ Test()

Test::Test ( const string &  name)

Construct a Test with the given name.

Definition at line 20 of file Test.cpp.

◆ ~Test()

Test::~Test ( )
virtual

Definition at line 24 of file Test.cpp.

Member Function Documentation

◆ accept()

virtual bool Test::accept ( TestVisitor visitor)
pure virtual

Makes the visitor visit this object as per the Visitor Pattern.

Implemented in TestSuite, and TestCase.

◆ getName()

const string & Test::getName ( ) const

Returns the name passed to the constructor.

Definition at line 27 of file Test.cpp.

◆ operator<()

bool Test::operator< ( const Test test) const

Compares names lexicographically.

Definition at line 31 of file Test.cpp.

Member Data Documentation

◆ _name

string Test::_name
private

The name passed to the constructor.

Definition at line 48 of file Test.h.


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