winIDEA SDK
|
stub.
User stubs are implemented as replacement functions on target - this class contains information which function to call instead. During test execution the stubbed function in target memory is modified so that the function specified in this class is called instead of the stubbed function.
#include <CTestUserStub.h>
Public Types | |
enum | EUserStubSections |
Ids of test specification sections. | |
Public Member Functions | |
CTestUserStub () | |
Initializes new instance. | |
CTestUserStub (const CTestBaseSPtr &parent) | |
Initializes new instance. More... | |
const std::string | getFunctionName () |
Returns the name of stubbed function. | |
std::string | getReplacementFuncName () |
Returns name of the function which will be called instead of the stubbed function. | |
iconnect::ETristate | isActive () |
Returns true, if stub is active during test execution. | |
virtual bool | isEmpty () const |
This method returns true, if the object contains no data. | |
bool | isMerged () const |
Returns true, if the CTestSpecification section containing this object is merged. More... | |
virtual void | serialize (const isys::IEmitterSPtr &emitter) |
Sends contents of this class to emitter. | |
void | setActive (iconnect::ETristate isActive) |
If parameter is true , then the stub is active during test execution. More... | |
void | setFunctionName (const std::string &functionName) |
Sets the name of the function to be stubbed. | |
void | setReplacementFuncName (const std::string &replacementFuncName) |
Sets name of the function to be called instead of the stubbed function. | |
virtual std::string | toString () |
Returns object data as YAML string. | |
Static Public Member Functions | |
static CTestUserStubSPtr | cast (const 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, ... | |
isys::CTestUserStub::CTestUserStub | ( | const CTestBaseSPtr & | parent | ) |
Initializes new instance.
parent | an instance of parent CTestSpecification class. Used only when parsing YAML declaration. Can be specified as NULL if the object is not initialized by parser. |
|
static |
Casts the given object to this class.
Returns NULL if input is NULL.
IllegalArgumentException | if input object is not instance of this class. |
|
virtual |
Returns true, if the CTestSpecification section containing this object is merged.
Reimplemented from isys::CTestBase.
void isys::CTestUserStub::setActive | ( | iconnect::ETristate | isActive | ) |
If parameter is true
, then the stub is active during test execution.
Otherwise it will be ignored - the function on the target is called.