robottestingframework::Test Class Referenceabstract

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

`#include <robottestingframework/Test.h>`

Inheritance diagram for robottestingframework::Test:
[legend]

## 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

  name | The test name
  description | An optional string which describes the test

Definition at line 43 of file Test.h.

## ~Test()

virtual robottestingframework::Test::~Test | ( |  | ) |

inline virtual

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 | ( |  | ) |

inline virtual

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

  result | an 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

  description | The description string

Definition at line 80 of file Test.h.

## setName()

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

inline protected

setName setting the test name

Parameters

  name | the 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:

- src/robottestingframework/include/robottestingframework/Test.h