|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Declaration of CTFAStifTestSuiteAdapterRoot class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __TFASTIFTESTSUITEADAPTERROOT_H__ |
|
20 #define __TFASTIFTESTSUITEADAPTERROOT_H__ |
|
21 |
|
22 #include "stiftestinterface.h" |
|
23 #include "mtfatestsuiteadapter.h" |
|
24 |
|
25 class CTFAStifTestCaseAdapter; |
|
26 class CTFAStifTestSuiteAdapter; |
|
27 class CTFATestSuite; |
|
28 class CTFAEntryPoint; |
|
29 |
|
30 /** |
|
31 * This cannot inherit from CTFATestSuiteAdapter, since that would |
|
32 * result in multiple paths to CBase root class. Thus this needs |
|
33 * to reimplement the MTFATestSuiteAdapter interface. |
|
34 */ |
|
35 NONSHARABLE_CLASS( CTFAStifTestSuiteAdapterRoot ): public CTestModuleBase, public MTFATestSuiteAdapter |
|
36 { |
|
37 public: |
|
38 /** |
|
39 * Creates a new test suite adapter root that wraps the given test suite |
|
40 */ |
|
41 static CTFAStifTestSuiteAdapterRoot* NewLC( CTFATestSuite& aTestSuite, CTFAEntryPoint* aEntryPoint ); |
|
42 |
|
43 /** |
|
44 * Destructor |
|
45 */ |
|
46 virtual ~CTFAStifTestSuiteAdapterRoot( void ); |
|
47 |
|
48 private: |
|
49 /** |
|
50 * Constructor |
|
51 */ |
|
52 CTFAStifTestSuiteAdapterRoot( void ); |
|
53 |
|
54 /** |
|
55 * 2nd phase constructor |
|
56 */ |
|
57 void ConstructL( CTFATestSuite& aTestSuite, CTFAEntryPoint* aEntryPoint ); |
|
58 |
|
59 /** |
|
60 * Copy constructor is hidden |
|
61 */ |
|
62 CTFAStifTestSuiteAdapterRoot( const CTFAStifTestSuiteAdapterRoot& aAdapter ); |
|
63 |
|
64 /** |
|
65 * Assignment operator is hidden |
|
66 */ |
|
67 CTFAStifTestSuiteAdapterRoot& operator=( const CTFAStifTestSuiteAdapterRoot& aAdapter ); |
|
68 |
|
69 public: |
|
70 /** |
|
71 * Returns test suite type |
|
72 */ |
|
73 TTFATestType Type( void ) const; |
|
74 |
|
75 /** |
|
76 * Adds a sub-suite / test case |
|
77 */ |
|
78 void AddL( MTFATestAdapter& aAdapter ); |
|
79 |
|
80 /** |
|
81 * Adds a test case to this suite |
|
82 */ |
|
83 void AddTestL( const CTFAStifTestCaseAdapter& aAdapter ); |
|
84 |
|
85 /** |
|
86 * Gets the test cases. STIF-TF calls this |
|
87 */ |
|
88 TInt GetTestCasesL( const TFileName& aIniFile, RPointerArray<TTestCaseInfo> &aCases ); |
|
89 |
|
90 /** |
|
91 * Runs a test case. STIF-TF calls this |
|
92 */ |
|
93 TInt RunTestCaseL( const TInt aCaseNumber, const TFileName& aIniFile, TTestResult& aResult ); |
|
94 |
|
95 private: |
|
96 CTFAStifTestSuiteAdapter* iWrappedAdapter; |
|
97 RPointerArray<CTFAStifTestCaseAdapter> iTestCases; |
|
98 TBool iFirstTest; |
|
99 }; |
|
100 |
|
101 #endif |