winIDEA SDK
isys::CTestAssert Class Reference

Description

This class defines assertions for test result.

#include <CTestAssert.h>

Inheritance diagram for isys::CTestAssert:
isys::CTestBase

Public Member Functions

 CTestAssert ()
 Initializes new instance.
 
 CTestAssert (const CTestBaseSPtr &parent)
 Initializes new instance. More...
 
bool isMerged () const
 Returns true, if the CTestSpecification section containing this object is merged. More...
 
iconnect::ETristate isExpectException ()
 Returns true, if exception is expected to be thrown from function under test. More...
 
void setExpectException (iconnect::ETristate isExpectException)
 Sets whether exception is expected as test result. More...
 
void getExpressions (iconnect::StrVector &expressions)
 Returns expressions, which are expected to evaluate to true after test ends.
 
void setExpressions (const iconnect::StrVector &expressions)
 Sets expressions, which are expected to evaluate to true after test ends.
 
virtual bool isEmpty () const
 This method returns true, if the object contains no data.
 
virtual void serialize (const isys::IEmitterSPtr &emitter)
 Sends contents of this class to emitter.
 
virtual std::string toString ()
 Returns object data as YAML string.
 

Static Public Member Functions

static isys::CTestAssertSPtr cast (CTestBaseSPtr &testBase)
 Casts the given object to this class. More...
 

Protected Member Functions

void setStaticTagsAsConst ()
 This method is called by all objects which are immediately contained in CTestSpecification, for example CTestCoverage, CTestHIL, ...
 

Constructor & Destructor Documentation

◆ CTestAssert()

isys::CTestAssert::CTestAssert ( const CTestBaseSPtr parent)

Initializes new instance.

Parameters
parentan instance of parent CTestSpecification class.

Member Function Documentation

◆ cast()

static isys::CTestAssertSPtr isys::CTestAssert::cast ( CTestBaseSPtr testBase)
static

Casts the given object to this class.

Returns NULL if input is NULL.

Exceptions
IllegalArgumentExceptionif input object is not instance of this class.

◆ isExpectException()

iconnect::ETristate isys::CTestAssert::isExpectException ( )

Returns true, if exception is expected to be thrown from function under test.

Throws exception if this class is used to store test pre-condition.

◆ isMerged()

bool isys::CTestAssert::isMerged ( ) const
virtual

Returns true, if the CTestSpecification section containing this object is merged.


Reimplemented from isys::CTestBase.

◆ setExpectException()

void isys::CTestAssert::setExpectException ( iconnect::ETristate  isExpectException)

Sets whether exception is expected as test result.

Throws exception if this class is used to store test pre-condition.