This class contains specification for one stub. More...
#include <CTestStub.h>
Public Types | |
| enum | EStubSectionIds |
| Ids of test specification sections. | |
Public Member Functions | |
| virtual void | assign (const CTestObjectSPtr &base) |
| Assigns members of base to this. | |
| bool | containsSection (int section) const |
| Returns true, if the specified section exists for this object. | |
| virtual CTestObjectSPtr | copy () const |
| Creates a deep copy of this object. | |
| virtual CTestBaseSPtr | createInstance (const CTestBaseSPtr &parent) const |
| void | createInstance (CTestBaseSPtr &obj, const CTestBaseSPtr &parent) const |
| CTestStub () | |
| 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 | getClassName () const |
| virtual CTestTreeNodeSPtr | getContainerTestNode () |
| virtual CTestSpecificationSPtr getContainerTestSpec(); | |
| int | getEnumTagValue (int section) |
| Returns value of enum type. | |
| 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. | |
| CTestBaseSPtr | getParent () const |
| Returns parent. | |
| 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. | |
| int | getSectionId (const std::string §ionName) |
| Returns section ID for the given section name. | |
| CTestBaseSPtr | getTestBase (int section, bool isConst) |
| CTestBaseListSPtr | getTestBaseList (int section, bool isConst) |
| CTestObject::ETestObjType | getTestObjType () const |
| Returns type of this object, which is CTestObject::ETestBase. | |
| 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. | |
| 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. | |
| bool | isSectionEmpty (int sectionId) |
| Returns true, if the given section is empty. | |
| virtual bool | isSerializedAsList (bool isParsing) |
| Returns true if object should be serialized as list, for example CTestFunction. | |
| 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. | |
| virtual void | setComment (int section, int idx, const std::string &nlComment, const std::string &eolComment) |
| 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 | setEnumTagValue (int section, int enumValue) |
| Sets value of enum type. | |
| void | setFunctionName (const std::string &functionName) |
| Sets the name of the function to be stubbed. | |
| virtual void | setMainMapStyle (isys::IEmitter::EYamlStyle mappingStyle) |
| Sets style of the mapping for complete object. | |
| void | setParent (CTestBaseSPtr parent) |
| Sets parent. | |
| 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. | |
| ~CTestStub () | |
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 | ( | ) |
| 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. |
| isys::CTestStub::~CTestStub | ( | ) |
|
virtualinherited |
|
static |
Casts the given object to this class.
Returns NULL if input is NULL.
| IllegalArgumentException | if input object is not instance of this class. |
|
inherited |
Returns true, if the specified section exists for this object.
|
virtualinherited |
Creates a deep copy of this object.
Parent is set.
|
virtual |
Implements isys::CTestBase.
| void isys::CTestStub::createInstance | ( | CTestBaseSPtr & | obj, |
| const CTestBaseSPtr & | parent ) const |
| 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.
|
inherited |
|
virtualinherited |
virtual CTestSpecificationSPtr getContainerTestSpec();
|
inherited |
Returns value of enum type.
| 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.
|
inherited |
Returns parent.
| 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.
|
inherited |
Returns section ID for the given section name.
|
inherited |
|
inherited |
|
inherited |
Returns type of this object, which is CTestObject::ETestBase.
| 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.
|
virtualinherited |
This method returns true, if the object contains no data.
|
virtual |
Returns true, if the CTestSpecification section containing this object is merged.
Reimplemented from isys::CTestBase.
|
inherited |
Returns true, if the given section is empty.
|
virtualinherited |
Returns true if object should be serialized as list, for example CTestFunction.
Reimplemented in isys::CTestFunction.
|
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.
|
virtualinherited |
| 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.
|
inherited |
Sets value of enum type.
| void isys::CTestStub::setFunctionName | ( | const std::string & | functionName | ) |
Sets the name of the function to be stubbed.
|
virtualinherited |
Sets style of the mapping for complete object.
|
inherited |
Sets parent.
| 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.
|
virtualinherited |
Returns object data as YAML string.