CComponentTester Class Reference
class CComponentTester : public CActive |
Comments : Abstract class from which developers can derive their own component testing classes. To write a derived class just implement a NewLC() and a ConstructL() from which ComponentTesterConstructL() should be the first thing called.
Constructor & Destructor Documentation
CComponentTester(CDataLogger &, MComponentTestObserver &)
Intended Usage : Default Constructor
- Since
- 7.0
~CComponentTester()
IMPORT_C | ~CComponentTester | ( | ) | |
Intended Usage : Standardized virtual destruction method
- Since
- 7.0
Member Functions Documentation
AddParamUnitTestL(const CUnitTest *)
IMPORT_C void | AddParamUnitTestL | ( | const CUnitTest * | aUnitTest | ) | [protected] |
Intended Usage : Used by derived classes to add UnitTests which can only be run when they are supplied with parameters from the UI. Error Condition :
- Since
- 7.0
- Pre-condition
- None
- Post-condition
- The specified unit test is added to the list of test to be executed and is flagged as requiring parameters
Parameters
const CUnitTest * aUnitTest | The unit test to add to the list |
AddUnitTestL(const CUnitTest *)
IMPORT_C void | AddUnitTestL | ( | const CUnitTest * | aUnitTest | ) | [protected] |
Intended Usage : Used by derived class to add UnitTests to the list Error Condition :
- Since
- 7.0
- Pre-condition
- None
- Post-condition
- The specified unit test is added to the list of tests to be executed.
Parameters
const CUnitTest * aUnitTest | The UnitTest to be added |
Complete(CUnitTest *)
Intended Usage : Used, by the observed unit test, to indicate that the test has completed Error Condition :
- Since
- 7.0
- Pre-condition
- None
- Post-condition
- If this was the last unit test then iObserver is informed that this component is complete.
Parameters
CUnitTest * aUnitTest | The unit test which has completed. |
ComponentTesterConstructL()
IMPORT_C void | ComponentTesterConstructL | ( | ) | [protected] |
Intended Usage : Must be called by derived class
ConstructL() to perform base class initialisation. Error Condition :
- Since
- 7.0
- Pre-condition
- None
- Post-condition
- Object is fully constructed
ConstructL()
IMPORT_C void | ConstructL | ( | ) | [protected, pure virtual] |
Intended Usage : Standard two-phase construction method. To be implemented in derived class Error Condition :
- Since
- 7.0
- Pre-condition
- First phase of construction is complete
- Post-condition
- Object is fully constructed
DoCancel()
IMPORT_C void | DoCancel | ( | ) | [protected, virtual] |
Intended Usage : Error Condition :
- Since
- 7.0
- Pre-condition
- This CComponentTester is fully constructed.
- Post-condition
- Any outstanding asynchronous requests are cancelled.
RunL()
IMPORT_C void | RunL | ( | ) | [protected, virtual] |
SetRTest(RTest *)
IMPORT_C void | SetRTest | ( | RTest * | aRTest | ) | |
TestComponent(RPointerArray< TTestInfo > *)
Intended Usage : Called to perform a full test of the component. Runs the listed tests or all unit tests if aTests == 0 Error Condition :
- Since
- 7.0
- Pre-condition
- This CComponentTester is fully initialized
- Post-condition
- All unit tests will be set up to run
TransitionSetsL()
Intended Usage : Called to provide a list of the transition sets in this component test. Ownership of the array is passed to the calling object. Error Condition :
- Since
- 7.0
- Pre-condition
- None
Member Data Documentation
TInt
iCurrentUnitTest
TInt
| iCurrentUnitTest | [protected] |
The index of the unittest which is to be run next
CDataLogger & iDataLogger
The test logging mechanism
MComponentTestObserver & iObserver
The observer to inform when we have completed the test
RArray< TInt > iParameterizedTests
A list of the test which cannot run without a parameter set from the UI
RTest * iRTest
Optional reference to the RTest object used in the EXE test harness code which kicked off this test framework
RPointerArray< CUnitTestInfo > * iTransitionSets
A placeholder which is only used to ensure correct object cleanup when TransitionSetsL() leaves
RPointerArray< CUnitTest > * iUnitTests
List of all the unit tests which make up this component test
RPointerArray< TTestInfo > * iUnitTestsToRun
The list of tests to run, NULL means run all tests. We take ownership of the list but not the items on it.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.