RobotTestingFramework  2.0.1
Robot Testing Framework
Public Member Functions | Private Attributes | List of all members
robottestingframework::TestMessage Class Reference

A formated message with details. More...

#include <robottestingframework/TestMessage.h>

Public Member Functions

 TestMessage ()
 TestMessage construct an emty test message. More...
 
 TestMessage (const TestMessage &other)
 Copy constructor. More...
 
 TestMessage (const std::string msg, const std::string filename="", unsigned int line=0)
 TestMessage construct a test message. More...
 
 TestMessage (const std::string msg, const std::string detail, const std::string filename="", unsigned int line=0)
 TestMessage construct a test message. More...
 
virtual ~TestMessage ()
 ~TestMessage Destructor More...
 
void setMessage (const std::string message)
 setMessage sets the message More...
 
void setDetail (const std::string detail)
 setDetail sets the detail of the messsage More...
 
std::string getMessage ()
 getMessage returns the message string More...
 
std::string getDetail ()
 getMessage returns the detail string More...
 
void setSourceLineNumber (unsigned int line)
 setSourceLineNumber set the line number of the code for the corresponding message More...
 
unsigned int getSourceLineNumber ()
 getSourceLineNumber More...
 
void setSourceFileName (const std::string filename)
 setSourceFileName set the source file name of the code for the corresponding message More...
 
std::string getSourceFileName ()
 getSourceFileName More...
 
void clear ()
 clears the test message More...
 

Private Attributes

unsigned int lineNumber
 
std::string strFileName
 
std::string strMessage
 
std::string strDetail
 

Detailed Description

A formated message with details.

Examples:
simple_fixture.cpp.

Definition at line 32 of file TestMessage.h.

Constructor & Destructor Documentation

◆ TestMessage() [1/4]

robottestingframework::TestMessage::TestMessage ( )

TestMessage construct an emty test message.

◆ TestMessage() [2/4]

robottestingframework::TestMessage::TestMessage ( const TestMessage other)

Copy constructor.

Parameters
othera TestMessage

◆ TestMessage() [3/4]

robottestingframework::TestMessage::TestMessage ( const std::string  msg,
const std::string  filename = "",
unsigned int  line = 0 
)

TestMessage construct a test message.

Parameters
msgthe message
filenamethe source file name of the code for the corresponding message
linethe line number of the code for the corresponding message

◆ TestMessage() [4/4]

robottestingframework::TestMessage::TestMessage ( const std::string  msg,
const std::string  detail,
const std::string  filename = "",
unsigned int  line = 0 
)

TestMessage construct a test message.

Parameters
msgthe message
detailthe detail of the message
filenamethe source file name of the code for the corresponding message
linethe line number of the code for the corresponding message

◆ ~TestMessage()

virtual robottestingframework::TestMessage::~TestMessage ( )
virtual

~TestMessage Destructor

Member Function Documentation

◆ clear()

void robottestingframework::TestMessage::clear ( )

clears the test message

◆ getDetail()

std::string robottestingframework::TestMessage::getDetail ( )

getMessage returns the detail string

Returns
string

◆ getMessage()

std::string robottestingframework::TestMessage::getMessage ( )

getMessage returns the message string

Returns
string

◆ getSourceFileName()

std::string robottestingframework::TestMessage::getSourceFileName ( )

getSourceFileName

Returns
the source file name of the code for the corresponding message

◆ getSourceLineNumber()

unsigned int robottestingframework::TestMessage::getSourceLineNumber ( )

getSourceLineNumber

Returns
the line number of the code for the corresponding message

◆ setDetail()

void robottestingframework::TestMessage::setDetail ( const std::string  detail)

setDetail sets the detail of the messsage

Parameters
detailthe detailed message string

◆ setMessage()

void robottestingframework::TestMessage::setMessage ( const std::string  message)

setMessage sets the message

Parameters
messagethe message string

◆ setSourceFileName()

void robottestingframework::TestMessage::setSourceFileName ( const std::string  filename)

setSourceFileName set the source file name of the code for the corresponding message

Parameters
filenamesource file name

◆ setSourceLineNumber()

void robottestingframework::TestMessage::setSourceLineNumber ( unsigned int  line)

setSourceLineNumber set the line number of the code for the corresponding message

Parameters
linenumber

Member Data Documentation

◆ lineNumber

unsigned int robottestingframework::TestMessage::lineNumber
private

Definition at line 140 of file TestMessage.h.

◆ strDetail

std::string robottestingframework::TestMessage::strDetail
private

Definition at line 143 of file TestMessage.h.

◆ strFileName

std::string robottestingframework::TestMessage::strFileName
private

Definition at line 141 of file TestMessage.h.

◆ strMessage

std::string robottestingframework::TestMessage::strMessage
private

Definition at line 142 of file TestMessage.h.


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