RobotTestingFramework  2.0.1
Robot Testing Framework
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
robottestingframework::Test Class Referenceabstract

The simplest form of a test unit. More...

#include <robottestingframework/Test.h>

+ Inheritance diagram for robottestingframework::Test:

Public Member Functions

 Test (std::string name, std::string description="")
 Test constructor. More...
 
virtual ~Test ()
 Test destructor. More...
 
const std::string getName () const
 getName Getting test name. More...
 
const std::string getDescription () const
 getDescription Getting test description More...
 
void setDescription (const std::string description)
 setDescription Sets an optional string which describes the test. More...
 
virtual void run (TestResult &result)=0
 the main caller of a test. More...
 
virtual void interrupt ()
 interrupt interrupts the current test run More...
 
virtual bool succeeded () const =0
 succeeded More...
 

Protected Member Functions

void setName (std::string name)
 setName setting the test name More...
 

Private Attributes

std::string strName
 
std::string strDescription
 

Detailed Description

The simplest form of a test unit.

Definition at line 34 of file Test.h.

Constructor & Destructor Documentation

◆ Test()

robottestingframework::Test::Test ( std::string  name,
std::string  description = "" 
)
inline

Test constructor.

Parameters
nameThe test name
descriptionAn optional string which describes the test

Definition at line 43 of file Test.h.

◆ ~Test()

virtual robottestingframework::Test::~Test ( )
inlinevirtual

Test destructor.

Definition at line 53 of file Test.h.

Member Function Documentation

◆ getDescription()

const std::string robottestingframework::Test::getDescription ( ) const
inline

getDescription Getting test description

Returns
The description of the test

Definition at line 70 of file Test.h.

◆ getName()

const std::string robottestingframework::Test::getName ( ) const
inline

getName Getting test name.

Returns
The name of the test.

Definition at line 61 of file Test.h.

◆ interrupt()

virtual void robottestingframework::Test::interrupt ( )
inlinevirtual

interrupt interrupts the current test run

Reimplemented in robottestingframework::TestSuite, and robottestingframework::TestCase.

Definition at line 95 of file Test.h.

◆ run()

virtual void robottestingframework::Test::run ( TestResult result)
pure virtual

the main caller of a test.

Parameters
resultan instance of a TestResult to collect the result of the test

Implemented in robottestingframework::TestSuite, and robottestingframework::TestCase.

◆ setDescription()

void robottestingframework::Test::setDescription ( const std::string  description)
inline

setDescription Sets an optional string which describes the test.

Parameters
descriptionThe description string

Definition at line 80 of file Test.h.

◆ setName()

void robottestingframework::Test::setName ( std::string  name)
inlineprotected

setName setting the test name

Parameters
namethe test name

Definition at line 111 of file Test.h.

◆ succeeded()

virtual bool robottestingframework::Test::succeeded ( ) const
pure virtual

succeeded

Returns
true or false representing whether the test was successful or not.

Implemented in robottestingframework::TestSuite, and robottestingframework::TestCase.

Member Data Documentation

◆ strDescription

std::string robottestingframework::Test::strDescription
private

Definition at line 118 of file Test.h.

◆ strName

std::string robottestingframework::Test::strName
private

Definition at line 117 of file Test.h.


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