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: Test Class which has the list of test cases |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef TESTLC_H |
|
21 #define TESTLC_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <StifLogger.h> |
|
25 #include <TestScripterInternal.h> |
|
26 #include <StifTestModule.h> |
|
27 |
|
28 |
|
29 // CONSTANTS |
|
30 // Logging path |
|
31 _LIT( KtestlcLogPath, "\\logs\\testframework\\testlc\\" ); |
|
32 // Log file |
|
33 _LIT( KtestlcLogFile, "testlc.txt" ); |
|
34 _LIT( KtestlcLogFileWithTitle, "testlc_[%S].txt" ); |
|
35 |
|
36 // FORWARD DECLARATIONS |
|
37 class CTestLc; |
|
38 |
|
39 // CLASS DECLARATION |
|
40 |
|
41 /** |
|
42 * CTestLc test class for STIF Test Framework TestScripter. |
|
43 * This is the testclass for Location Centre API |
|
44 * |
|
45 * @lib testlbslocacquisition.lib |
|
46 * @since S60 v5.0 |
|
47 */ |
|
48 NONSHARABLE_CLASS(CTestLc) : public CScriptBase |
|
49 { |
|
50 public: // Constructors and destructor |
|
51 |
|
52 /** |
|
53 * Two-phased constructor. |
|
54 */ |
|
55 static CTestLc* NewL( CTestModuleIf& aTestModuleIf ); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 virtual ~CTestLc(); |
|
61 |
|
62 public: // Functions from base classes |
|
63 |
|
64 /** |
|
65 * From CScriptBase Runs a script line. |
|
66 * @since S60 v5.0 |
|
67 * @param aItem Script line containing method name and parameters |
|
68 * @return Symbian OS error code |
|
69 */ |
|
70 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
71 |
|
72 private: |
|
73 |
|
74 /** |
|
75 * C++ default constructor. |
|
76 */ |
|
77 CTestLc( CTestModuleIf& aTestModuleIf ); |
|
78 |
|
79 /** |
|
80 * By default Symbian 2nd phase constructor is private. |
|
81 */ |
|
82 void ConstructL(); |
|
83 |
|
84 /** |
|
85 * Frees all resources allocated from test methods. |
|
86 * @since S60 v5.0 |
|
87 */ |
|
88 void Delete(); |
|
89 |
|
90 /** |
|
91 * Test Case for Creating the new instance of CLcService |
|
92 * This will test for Successful Creation on NewL |
|
93 * |
|
94 * @since S60 v5.0 |
|
95 * Returns KErrNone if successful. |
|
96 * |
|
97 */ |
|
98 TInt CheckServiceNewL( CStifItemParser& aItem ); |
|
99 |
|
100 /** |
|
101 * Test Case for Creating the new instance of CLcService |
|
102 * This will test for Successful Creation on NewLC |
|
103 * |
|
104 * @since S60 v5.0 |
|
105 * Returns KErrNone if successful. |
|
106 * |
|
107 */ |
|
108 TInt CheckServiceNewLC( CStifItemParser& aItem ); |
|
109 |
|
110 /** |
|
111 * Test Case for Getting all the Location Applications |
|
112 * This will test for Successful Get. |
|
113 * |
|
114 * @since S60 v5.0 |
|
115 * Returns KErrNone if successful. |
|
116 * |
|
117 */ |
|
118 TInt TestGetLocationApplicationsL( CStifItemParser& aItem ); |
|
119 |
|
120 /** |
|
121 * Test Case for Getting all the Location Applications Asynchronously. |
|
122 * This will test for Successful Get. |
|
123 * |
|
124 * @since S60 v5.0 |
|
125 * Returns KErrNone if successful. |
|
126 * |
|
127 */ |
|
128 TInt TestGetLocationApplicationsAsynL( CStifItemParser& aItem ); |
|
129 |
|
130 /** |
|
131 * Test Case for Getting all the Location Applications using Filter. |
|
132 * This will test for Successful Get |
|
133 * |
|
134 * @since S60 v5.0 |
|
135 * Returns KErrNone if successful. |
|
136 * |
|
137 */ |
|
138 TInt TestGetLocationApplicationsFilterL( CStifItemParser& aItem ); |
|
139 |
|
140 /** |
|
141 * Test Case for Getting all the Location Applications using Filter. |
|
142 * This will test for Successful Get |
|
143 * |
|
144 * @since S60 v5.0 |
|
145 * Returns KErrNone if successful. |
|
146 * |
|
147 */ |
|
148 TInt TestGetLocationApplicationsFilterAsynL( CStifItemParser& aItem ); |
|
149 |
|
150 /** |
|
151 * Test Case for Setting and Removing the Observer. |
|
152 * This will test for Successful Set and Remove. |
|
153 * |
|
154 * @since S60 v5.0 |
|
155 * Returns KErrNone if successful. |
|
156 * |
|
157 */ |
|
158 TInt TestSetRemoveObserverL( CStifItemParser& aItem ); |
|
159 |
|
160 /** |
|
161 * Test Case for Cancelling the GetLocationApplications request. |
|
162 * This will test for Successful Cancel |
|
163 * |
|
164 * @since S60 v5.0 |
|
165 * Returns KErrNone if successful. |
|
166 * |
|
167 */ |
|
168 TInt TestCancelGetLocationApplications( CStifItemParser& aItem ); |
|
169 |
|
170 /** |
|
171 * Test Case for Creating new instance of CLcLaunchParam |
|
172 * This will test for Successful Create. |
|
173 * |
|
174 * @since S60 v5.0 |
|
175 * Returns KErrNone if successful. |
|
176 * |
|
177 */ |
|
178 TInt TestCLcLaunchParamNewL( CStifItemParser& aItem ); |
|
179 |
|
180 /** |
|
181 * Test Case for Creating new instance of CLcLaunchParam |
|
182 * This will test for Successful Create. |
|
183 * |
|
184 * @since S60 v5.0 |
|
185 * Returns KErrNone if successful. |
|
186 * |
|
187 */ |
|
188 TInt TestCLcLaunchParamNewLC( CStifItemParser& aItem ); |
|
189 //---------- appinfo |
|
190 /** |
|
191 * Method to Check the LocationApp Info NewL |
|
192 * @since S60 5.0 |
|
193 * Returns KErrNone if successful. |
|
194 * |
|
195 */ |
|
196 TInt CheckNewL( CStifItemParser& aItem ); |
|
197 |
|
198 /** |
|
199 * Method to Check the LocationApp Info NewLC |
|
200 * @since S60 5.0 |
|
201 * Returns KErrNone if successful. |
|
202 * |
|
203 */ |
|
204 TInt CheckNewLC( CStifItemParser& aItem ); |
|
205 |
|
206 /** |
|
207 * Method to Check the LocationApp Info NewLC |
|
208 * Copy Constructor |
|
209 * @since S60 5.0 |
|
210 * Returns KErrNone if successful. |
|
211 * |
|
212 */ |
|
213 TInt CheckCopyNewL( CStifItemParser& aItem ); |
|
214 |
|
215 /** |
|
216 * Method to Check the LocationApp Info NewLC |
|
217 * Copy Constructor |
|
218 * @since S60 5.0 |
|
219 * Returns KErrNone if successful. |
|
220 * |
|
221 */ |
|
222 TInt CheckCopyNewLC( CStifItemParser& aItem ); |
|
223 |
|
224 /** |
|
225 * Method to Check Id |
|
226 * @since S60 5.0 |
|
227 * Returns KErrNone if successful. |
|
228 * |
|
229 */ |
|
230 TInt CheckId( CStifItemParser& aItem ); |
|
231 |
|
232 /** |
|
233 * Method to Check Name |
|
234 * @since S60 5.0 |
|
235 * Returns KErrNone if successful. |
|
236 * |
|
237 */ |
|
238 TInt CheckName( CStifItemParser& aItem ); |
|
239 |
|
240 /** |
|
241 * Method to Check Launch Mode |
|
242 * @since S60 5.0 |
|
243 * Returns KErrNone if successful. |
|
244 * |
|
245 */ |
|
246 TInt CheckLaunchMode( CStifItemParser& aItem ); |
|
247 |
|
248 /** |
|
249 * Method to Check System Characteristics |
|
250 * @since S60 5.0 |
|
251 * Returns KErrNone if successful. |
|
252 * |
|
253 */ |
|
254 TInt CheckSystemCharacteristics( CStifItemParser& aItem ); |
|
255 |
|
256 /** |
|
257 * Method to Check Application Characteristics |
|
258 * @since S60 5.0 |
|
259 * Returns KErrNone if successful. |
|
260 * |
|
261 */ |
|
262 TInt CheckApplicationCharacteristics( CStifItemParser& aItem ); |
|
263 |
|
264 //-----------Array |
|
265 /** |
|
266 * Method to Check the Creation of AppInfo Array using NewL |
|
267 * @since S60 5.0 |
|
268 * Returns KErrNone if successful. |
|
269 * |
|
270 */ |
|
271 TInt CheckArrayNewL( CStifItemParser& aItem ); |
|
272 |
|
273 /** |
|
274 * Method to Check the Creation of AppInfo Array using NewLC |
|
275 * @since S60 5.0 |
|
276 * Returns KErrNone if successful. |
|
277 * |
|
278 */ |
|
279 TInt CheckArrayNewLC( CStifItemParser& aItem ); |
|
280 |
|
281 /** |
|
282 * Method to Check the Count of AppInfo Array |
|
283 * @since S60 5.0 |
|
284 * Returns KErrNone if successful. |
|
285 * |
|
286 */ |
|
287 TInt CheckCount( CStifItemParser& aItem ); |
|
288 |
|
289 /** |
|
290 * Method to Check the append to AppInfo Array |
|
291 * @since S60 5.0 |
|
292 * Returns KErrNone if successful. |
|
293 * |
|
294 */ |
|
295 TInt CheckAppendL( CStifItemParser& aItem ); |
|
296 |
|
297 /** |
|
298 * Method to Check the Remove from AppInfo Array |
|
299 * @since S60 5.0 |
|
300 * Returns KErrNone if successful. |
|
301 * |
|
302 */ |
|
303 TInt CheckRemoveL( CStifItemParser& aItem ); |
|
304 |
|
305 /** |
|
306 * Method to Check the Reset of AppInfo Array |
|
307 * @since S60 5.0 |
|
308 * Returns KErrNone if successful. |
|
309 * |
|
310 */ |
|
311 TInt CheckResetL( CStifItemParser& aItem ); |
|
312 |
|
313 /** |
|
314 * Method to Check the [] Operator of AppInfo Array |
|
315 * @since S60 5.0 |
|
316 * Returns KErrNone if successful. |
|
317 * |
|
318 */ |
|
319 TInt CheckOperatorL( CStifItemParser& aItem ); |
|
320 |
|
321 // ----- Filter |
|
322 /** |
|
323 * Method to Check Creation of TLcLocationAppFilter |
|
324 * @since S60 v5.0 |
|
325 * Returns KErrNone if successful. |
|
326 * |
|
327 */ |
|
328 TInt CheckTLcLocationAppFilter( CStifItemParser& aItem ); |
|
329 |
|
330 /** |
|
331 * Method to Check set of FilterSystemCharacteristics |
|
332 * @since S60 v5.0 |
|
333 * Returns KErrNone if successful. |
|
334 * |
|
335 */ |
|
336 TInt CheckFilterSystemCharacteristics( CStifItemParser& aItem ); |
|
337 |
|
338 /** |
|
339 * Method to Check set of FilterApplicationCharacteristics |
|
340 * @since S60 v5.0 |
|
341 * Returns KErrNone if successful. |
|
342 * |
|
343 */ |
|
344 TInt CheckFilterApplicationCharacteristics( CStifItemParser& aItem ); |
|
345 |
|
346 |
|
347 /** |
|
348 * Method to Check set of SysCharFilterConfiguration |
|
349 * @since S60 v5.0 |
|
350 * Returns KErrNone if successful. |
|
351 * |
|
352 */ |
|
353 TInt CheckSysCharFilterConfiguration( CStifItemParser& aItem ); |
|
354 |
|
355 /** |
|
356 * Method to Check set of AppCharFilterConfiguration |
|
357 * @since S60 v5.0 |
|
358 * Returns KErrNone if successful. |
|
359 * |
|
360 */ |
|
361 TInt CheckAppCharFilterConfiguration( CStifItemParser& aItem ); |
|
362 |
|
363 private: // Data Members |
|
364 |
|
365 |
|
366 }; |
|
367 |
|
368 #endif // TESTLC_H |
|
369 |
|
370 // End of File |
|