|
1 /* |
|
2 * Copyright (c) 2002 - 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 the License "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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef TPROVIDERTEST_H |
|
22 #define TPROVIDERTEST_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <StifLogger.h> |
|
26 #include <TestScripterInternal.h> |
|
27 #include <StifTestModule.h> |
|
28 |
|
29 #include <LiwServiceHandler.h> |
|
30 #include <LiwCommon.h> |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 // CONSTANTS |
|
37 //const ?type ?constant_var = ?constant; |
|
38 |
|
39 // MACROS |
|
40 //#define ?macro ?macro_def |
|
41 // Logging path |
|
42 _LIT( KtprovidertestLogPath, "\\logs\\testframework\\tprovidertest\\" ); |
|
43 // Log file |
|
44 _LIT( KtprovidertestLogFile, "tprovidertest.txt" ); |
|
45 |
|
46 // FUNCTION PROTOTYPES |
|
47 //?type ?function_name(?arg_list); |
|
48 |
|
49 // FORWARD DECLARATIONS |
|
50 //class ?FORWARD_CLASSNAME; |
|
51 class Ctprovidertest; |
|
52 class CEventDetails; |
|
53 class CFilterDetails; |
|
54 |
|
55 // DATA TYPES |
|
56 //enum ?declaration |
|
57 //typedef ?declaration |
|
58 //extern ?data_type; |
|
59 |
|
60 // CLASS DECLARATION |
|
61 |
|
62 /** |
|
63 * Ctprovidertest test class for STIF Test Framework TestScripter. |
|
64 * ?other_description_lines |
|
65 * |
|
66 * @lib ?library |
|
67 * @since ?Series60_version |
|
68 */ |
|
69 NONSHARABLE_CLASS(Ctprovidertest) : public CScriptBase |
|
70 { |
|
71 public: // Constructors and destructor |
|
72 |
|
73 /** |
|
74 * Two-phased constructor. |
|
75 */ |
|
76 static Ctprovidertest* NewL( CTestModuleIf& aTestModuleIf ); |
|
77 |
|
78 /** |
|
79 * Destructor. |
|
80 */ |
|
81 virtual ~Ctprovidertest(); |
|
82 |
|
83 public: // New functions |
|
84 |
|
85 /** |
|
86 * ?member_description. |
|
87 * @since ?Series60_version |
|
88 * @param ?arg1 ?description |
|
89 * @return ?description |
|
90 */ |
|
91 //?type ?member_function( ?type ?arg1 ); |
|
92 |
|
93 public: // Functions from base classes |
|
94 |
|
95 /** |
|
96 * From CScriptBase Runs a script line. |
|
97 * @since ?Series60_version |
|
98 * @param aItem Script line containing method name and parameters |
|
99 * @return Symbian OS error code |
|
100 */ |
|
101 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
102 |
|
103 protected: // New functions |
|
104 |
|
105 /** |
|
106 * ?member_description. |
|
107 * @since ?Series60_version |
|
108 * @param ?arg1 ?description |
|
109 * @return ?description |
|
110 */ |
|
111 //?type ?member_function( ?type ?arg1 ); |
|
112 |
|
113 protected: // Functions from base classes |
|
114 |
|
115 /** |
|
116 * From ?base_class ?member_description |
|
117 */ |
|
118 //?type ?member_function(); |
|
119 |
|
120 private: |
|
121 |
|
122 /** |
|
123 * C++ default constructor. |
|
124 */ |
|
125 Ctprovidertest( CTestModuleIf& aTestModuleIf ); |
|
126 |
|
127 /** |
|
128 * By default Symbian 2nd phase constructor is private. |
|
129 */ |
|
130 void ConstructL(); |
|
131 |
|
132 // Prohibit copy constructor if not deriving from CBase. |
|
133 // ?classname( const ?classname& ); |
|
134 // Prohibit assigment operator if not deriving from CBase. |
|
135 // ?classname& operator=( const ?classname& ); |
|
136 |
|
137 /** |
|
138 * Frees all resources allocated from test methods. |
|
139 * @since ?Series60_version |
|
140 */ |
|
141 void Delete(); |
|
142 |
|
143 /** |
|
144 * Test methods are listed below. |
|
145 */ |
|
146 |
|
147 /** |
|
148 * Example test method. |
|
149 * @since ?Series60_version |
|
150 * @param aItem Script line containing parameters. |
|
151 * @return Symbian OS error code. |
|
152 */ |
|
153 virtual TInt ExampleL( CStifItemParser& aItem ); |
|
154 |
|
155 /** |
|
156 * Test case for add functionality |
|
157 */ |
|
158 virtual TInt AddTest1L( CStifItemParser& aItem ); |
|
159 virtual TInt AddTest2L( CStifItemParser& aItem ); |
|
160 virtual TInt AddGenericL( CStifItemParser& aItem ); |
|
161 |
|
162 /** |
|
163 * Test case for delete functionality |
|
164 */ |
|
165 |
|
166 virtual TInt DeletetestL( CStifItemParser& aItem ) ; |
|
167 |
|
168 /** |
|
169 * Testcase for GetListFunctionality |
|
170 */ |
|
171 |
|
172 virtual TInt GetListGenericL(CStifItemParser& aItem); |
|
173 |
|
174 /** |
|
175 * Position based add test case |
|
176 */ |
|
177 virtual TInt AddGenericPosL(CStifItemParser& aItem); |
|
178 |
|
179 /** |
|
180 *Position based delete testcase |
|
181 */ |
|
182 virtual TInt DeleteGenericPosL (CStifItemParser& aItem) ; |
|
183 |
|
184 /** |
|
185 * Position based GetList testcase |
|
186 */ |
|
187 virtual TInt GetListGenericPosL(CStifItemParser& aItem); |
|
188 |
|
189 //ADD NEW METHOD DEC HERE |
|
190 |
|
191 public: // Data |
|
192 // ?one_line_short_description_of_data |
|
193 //?data_declaration; |
|
194 |
|
195 protected: // Data |
|
196 // ?one_line_short_description_of_data |
|
197 //?data_declaration; |
|
198 |
|
199 private: // Data |
|
200 |
|
201 // ?one_line_short_description_of_data |
|
202 //?data_declaration; |
|
203 |
|
204 // Reserved pointer for future extension |
|
205 //TAny* iReserved; |
|
206 |
|
207 public: // Friend classes |
|
208 //?friend_class_declaration; |
|
209 |
|
210 protected: // Friend classes |
|
211 //?friend_class_declaration; |
|
212 private: // Friend classes |
|
213 //?friend_class_declaration; |
|
214 void taddtest1L(void) ; |
|
215 void taddtest2L(void) ; |
|
216 void tlogresultsL(const TLiwGenericParam *aGenericParam , TInt aRequestType) ; |
|
217 void taddresultsL(const TLiwGenericParam *aGenericParam ) ; |
|
218 void tlogGetListL(const TLiwGenericParam *aGenericParam ) ; |
|
219 void taddgenericL(CEventDetails *aDetails,TInt aParsedValue) ; |
|
220 |
|
221 void taddsyncgenericL(CEventDetails *aDetails); |
|
222 void taddasyncgenericL(CEventDetails *aDetails); |
|
223 |
|
224 void tdeleteTestL(TInt aExpected) ; |
|
225 void tdeleteFunctionalL(void) ; |
|
226 void tdeleteNegativeL(void) ; |
|
227 void tdeleteTestasyncL(TInt aExpected) ; |
|
228 void tdeleteFunctionalAsyncL(void) ; |
|
229 void tdeleteNegativeasyncL(void); |
|
230 |
|
231 void tdeleteAllEventsL(TInt val) ; |
|
232 void tdeleteAllEventsSyncL(void) ; |
|
233 void tdeleteAllEventsAsyncL(void) ; |
|
234 |
|
235 void tgetlistgenericL( CFilterDetails *aDetails,TInt aParsedValue) ; |
|
236 void tgetlistsyncgenericL(CFilterDetails *aDetails); |
|
237 void tgetlistasyncgenericL(CFilterDetails *aDetails); |
|
238 |
|
239 |
|
240 /** |
|
241 *Position based test cases |
|
242 */ |
|
243 |
|
244 void taddgenericPosL(CEventDetails *aDetails,TInt aParsedValue) ; |
|
245 void taddsyncgenericPosL(CEventDetails *aDetails); |
|
246 void taddasyncgenericPosL(CEventDetails *aDetails); |
|
247 |
|
248 /** |
|
249 * Delete Position Based |
|
250 */ |
|
251 |
|
252 void tdeleteTestPosL(TInt aExpected) ; |
|
253 void tdeleteFunctionalPosL(void) ; |
|
254 void tdeleteNegativePosL(void) ; |
|
255 void tdeleteTestasyncPosL(TInt aExpected) ; |
|
256 void tdeleteFunctionalAsyncPosL(void) ; |
|
257 void tdeleteNegativeasyncPosL(void); |
|
258 |
|
259 /** |
|
260 * GetList Position Based test cases |
|
261 */ |
|
262 void tgetlistgenericPosL( CFilterDetails *aDetails,TInt aParsedValue) ; |
|
263 void tgetlistsyncgenericPosL(CFilterDetails *aDetails); |
|
264 void tgetlistasyncgenericPosL(CFilterDetails *aDetails); |
|
265 |
|
266 }; |
|
267 |
|
268 #endif // TPROVIDERTEST_H |
|
269 |
|
270 // End of File |