|
1 /* |
|
2 * Copyright (c) 2007 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 test case |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_BCTESTTEMPLATECASE_H |
|
20 #define C_BCTESTTEMPLATECASE_H |
|
21 |
|
22 #include "bctestcase.h" |
|
23 |
|
24 class CBCTestTemplateContainer; |
|
25 class CCoeControl; |
|
26 |
|
27 /** |
|
28 * test case for various classes |
|
29 */ |
|
30 class CBCTestTemplateCase: public CBCTestCase |
|
31 { |
|
32 public: // constructor and destructor |
|
33 |
|
34 /** |
|
35 * Symbian 2nd static constructor |
|
36 */ |
|
37 static CBCTestTemplateCase* NewL( CBCTestTemplateContainer* aContainer ); |
|
38 |
|
39 /** |
|
40 * Destructor |
|
41 */ |
|
42 virtual ~CBCTestTemplateCase(); |
|
43 |
|
44 public: // from CBCTestCase |
|
45 |
|
46 /** |
|
47 * Execute corresponding test functions for UI command |
|
48 * @param aCmd, UI command |
|
49 */ |
|
50 void RunL( TInt aCmd ); |
|
51 |
|
52 protected: // new functions |
|
53 |
|
54 /** |
|
55 * Build autotest script |
|
56 */ |
|
57 void BuildScriptL(); |
|
58 |
|
59 /** |
|
60 * Create control or allocate resource for test |
|
61 * @param aCmd UI command, maybe you need to do some work |
|
62 * for different outline |
|
63 */ |
|
64 void PrepareCaseL( TInt aCmd ); |
|
65 |
|
66 /** |
|
67 * Release resource used in test |
|
68 */ |
|
69 void ReleaseCaseL(); |
|
70 |
|
71 /** |
|
72 * Test functions |
|
73 */ |
|
74 void TestFunction(); |
|
75 |
|
76 private: // constructor |
|
77 |
|
78 /** |
|
79 * C++ default constructor |
|
80 */ |
|
81 CBCTestTemplateCase( CBCTestTemplateContainer* aContainer ); |
|
82 |
|
83 /** |
|
84 * Symbian 2nd constructor |
|
85 */ |
|
86 void ConstructL(); |
|
87 |
|
88 private: // data |
|
89 |
|
90 /** |
|
91 * Pointer to a control, maybe you need one in your test |
|
92 * own |
|
93 */ |
|
94 CCoeControl* iControl; |
|
95 |
|
96 /** |
|
97 * Pointer to container. |
|
98 * not own |
|
99 */ |
|
100 CBCTestTemplateContainer* iContainer; |
|
101 |
|
102 }; |
|
103 |
|
104 #endif // C_BCTESTTEMPLATECASE_H |