This class contains specification for one stub. More...
#include <CTestStub.h>
Public Types | |
| enum | EStubSectionIds |
| Ids of test specification sections. | |
Public Member Functions | |
| CTestStub (const CTestBaseSPtr &parent) | |
| Initializes new instance. | |
| iconnect::ETristate | getActive () |
| Returns string setting as specified in YAML file. | |
| 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. | |
| 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. | |
| bool | isEmpty () const override |
| This method returns true, if the object contains no data. | |
| bool | isMerged () const override |
| Returns true, if the CTestSpecification section containing this object is merged. | |
| 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. | |
| 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. | |
| 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. | |
| std::string | toString () override |
| Returns object data as YAML string. | |
Static Public Member Functions | |
| static CTestStubSPtr | cast (const CTestBaseSPtr &testBase) |
| Casts the given object to this class. | |
Protected Member Functions | |
| void | setStaticTagsAsConst () |
| This method is called by all objects which are immediately contained in CTestSpecification, for example CTestCoverage, CTestHIL, ... | |
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.
| 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.
| CTestBaseListSPtr isys::CTestStub::getAssignmentSteps | ( | bool | isConst | ) |
Returns assignment steps.
| std::string isys::CTestStub::getFunctionName | ( | ) |
Returns the name of stubbed function.
| isys::CTestMinMaxSPtr isys::CTestStub::getHitLimits | ( | bool | isConst | ) |
Returns hit limits.
| isys::CTestLogSPtr isys::CTestStub::getLogConfig | ( | bool | isConst | ) |
Returns logging configuration.
| void isys::CTestStub::getParamNames | ( | iconnect::StrVector & | params | ) |
Returns names of parameters assigned to stubbed function parameters.
| std::string isys::CTestStub::getRetValName | ( | ) |
Returns name assigned to the stub return value.
| 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::isActive | ( | ) |
Returns true, if stub is active during test execution.
| 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.
|
overrideinherited |
This method returns true, if the object contains no data.
|
overridevirtual |
Returns true, if the CTestSpecification section containing this object is merged.
Reimplemented from isys::CTestBase.
|
virtualinherited |
Sends contents of this class to emitter.
Reimplemented in isys::CLogResult, and isys::CTestEnvironmentConfig.
| 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.
| void isys::CTestStub::setFunctionName | ( | const std::string & | functionName | ) |
Sets the name of the function to be stubbed.
| void isys::CTestStub::setRetValName | ( | const std::string & | retValName | ) |
Sets name assigned to the stub return value.
| void isys::CTestStub::setScriptFunctionName | ( | const std::string & | scriptFuncName | ) |
Sets name assigned to the stub return value.
|
overrideinherited |
Returns object data as YAML string.