winIDEA SDK
|
This class contains specification for one stub.
Since stubbed function will not be called, we have to specify its return values and other side effects. This information is stored in this class.
#include <CTestStub.h>
Public Types | |
enum | EStubSectionIds |
Ids of test specification sections. | |
Public Member Functions | |
CTestStub (const CTestBaseSPtr &parent) | |
Initializes new instance. More... | |
iconnect::ETristate | getActive () |
Returns string setting as specified in YAML file. More... | |
CTestBaseListSPtr | getAssignmentSteps (bool isConst) |
Returns assignment steps. | |
std::string | getFunctionName () |
Returns the name of stubbed function. | |
isys::CTestMinMaxSPtr | getHitLimits (bool isConst) |
Returns hit limits. | |
isys::CTestLogSPtr | getLogConfig (bool isConst) |
Returns logging configuration. | |
void | getParamNames (iconnect::StrVector ¶ms) |
Returns names of parameters assigned to stubbed function parameters. | |
std::string | getRetValName () |
Returns name assigned to the stub return value. | |
std::string | getScriptFunctionName () |
Returns the function to be called in the test suite, instead of the stubbed one on the target. More... | |
bool | isActive () |
Returns true, if stub is active during test execution. | |
bool | isCustomActivation () |
Returns true, if test point will not be activated before test execution, but during test execution from custom script. More... | |
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 | setCustomActivation (iconnect::ETristate isActive) |
If parameter is true , then the stub will not be activated before test execution, but during test execution from custom script. More... | |
void | setFunctionName (const std::string &functionName) |
Sets the name of the function to be stubbed. | |
void | setRetValName (const std::string &retValName) |
Sets name assigned to the stub return value. | |
void | setScriptFunctionName (const std::string &scriptFuncName) |
Sets name assigned to the stub return value. | |
virtual std::string | toString () |
Returns object data as YAML string. | |
Static Public Member Functions | |
static CTestStubSPtr | 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::CTestStub::CTestStub | ( | 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. |
iconnect::ETristate isys::CTestStub::getActive | ( | ) |
Returns string setting as specified in YAML file.
Empty string means default setting.
std::string isys::CTestStub::getScriptFunctionName | ( | ) |
Returns the function to be called in the test suite, instead of the stubbed one on the target.
This function may simulate side effects normally caused by the stubbed function.
bool isys::CTestStub::isCustomActivation | ( | ) |
Returns true, if test point will not be activated before test execution, but during test execution from custom script.
This functionality can be used when the order of test point hits is known, and there are not enough hardware breakpoints available.
|
virtual |
Returns true, if the CTestSpecification section containing this object is merged.
Reimplemented from isys::CTestBase.
void isys::CTestStub::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.
void isys::CTestStub::setCustomActivation | ( | iconnect::ETristate | isActive | ) |
If parameter is true
, then the stub will not be activated before test execution, but during test execution from custom script.
This functionality can be used when the order of test point hits is known, and there are not enough hardware breskpoints available.