This class contains specification for one user stub. More...
#include <CTestUserStub.h>
Public Types | |
| enum | EUserStubSections |
| 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. | |
| CTestBaseSPtr | createInstance (const CTestBaseSPtr &parent) const |
| CTestUserStub () | |
| Initializes new instance. | |
| CTestUserStub (const CTestBaseSPtr &parent) | |
| Initializes new instance. | |
| std::string | getClassName () const |
| virtual CTestTreeNodeSPtr | getContainerTestNode () |
| virtual CTestSpecificationSPtr getContainerTestSpec(); | |
| int | getEnumTagValue (int section) |
| Returns value of enum type. | |
| const std::string | getFunctionName () |
| Returns the name of stubbed function. | |
| CTestBaseSPtr | getParent () const |
| Returns parent. | |
| std::string | getReplacementFuncName () |
| Returns name of the function which will be called instead of the stubbed function. | |
| 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. | |
| 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. | |
| 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 | 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 | 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. | |
| ~CTestUserStub () | |
Static Public Member Functions | |
| static CTestUserStubSPtr | 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 user 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.
| isys::CTestUserStub::CTestUserStub | ( | ) |
Initializes new instance.
| 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. |
| isys::CTestUserStub::~CTestUserStub | ( | ) |
|
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.
|
inherited |
|
virtualinherited |
virtual CTestSpecificationSPtr getContainerTestSpec();
|
inherited |
Returns value of enum type.
| const std::string isys::CTestUserStub::getFunctionName | ( | ) |
Returns the name of stubbed function.
|
inherited |
Returns parent.
| std::string isys::CTestUserStub::getReplacementFuncName | ( | ) |
Returns name of the function which will be called instead of the stubbed function.
|
inherited |
Returns section ID for the given section name.
|
inherited |
|
inherited |
|
inherited |
Returns type of this object, which is CTestObject::ETestBase.
| iconnect::ETristate isys::CTestUserStub::isActive | ( | ) |
Returns true, if stub is active during test execution.
|
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::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.
|
virtualinherited |
|
inherited |
Sets value of enum type.
| void isys::CTestUserStub::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::CTestUserStub::setReplacementFuncName | ( | const std::string & | replacementFuncName | ) |
Sets name of the function to be called instead of the stubbed function.
|
virtualinherited |
Returns object data as YAML string.