|
1 /* |
|
2 * Copyright (c) 2008 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: Implementation of MT_CHSPSConfigurationIf class |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <s32mem.h> |
|
19 #include <eunitmacros.h> |
|
20 #include <eunitdecorators.h> |
|
21 #include <eunituids.h> |
|
22 #include <apgtask.h> |
|
23 #include <eikenv.h> |
|
24 #include <centralrepository.h> |
|
25 #include <bautils.h> |
|
26 #include "mt_hspsconfigurationif.h" |
|
27 #include "mt_hspsliwlistprinter.h" |
|
28 #include "mt_hspsinstallationservice.h" |
|
29 |
|
30 #include "liwgenericparam.hrh" |
|
31 |
|
32 // get active app conf |
|
33 #include "mt_hsps_getactiveappconf_1.h" |
|
34 #include "mt_hsps_getactiveappconf_2.h" |
|
35 #include "mt_hsps_getactiveappconf_3.h" |
|
36 // get plugin conf |
|
37 #include "mt_hsps_getpluginconf_1.h" |
|
38 #include "mt_hsps_getpluginconf_2.h" |
|
39 #include "mt_hsps_getpluginconf_3.h" |
|
40 #include "mt_hsps_getpluginconf_4.h" |
|
41 #include "mt_hsps_getpluginconf_5.h" |
|
42 // get plugins |
|
43 #include "mt_hsps_getplugins_1.h" |
|
44 #include "mt_hsps_getplugins_2.h" |
|
45 #include "mt_hsps_getplugins_3.h" |
|
46 #include "mt_hsps_getplugins_4.h" |
|
47 #include "mt_hsps_getplugins_5.h" |
|
48 #include "mt_hsps_getplugins_6.h" |
|
49 #include "mt_hsps_getplugins_7.h" |
|
50 // get plugin list |
|
51 #include "mt_hsps_getpluginlist_1.h" |
|
52 #include "mt_hsps_getpluginlist_2.h" |
|
53 #include "mt_hsps_getpluginlist_3.h" |
|
54 #include "mt_hsps_getpluginlist_4.h" |
|
55 #include "mt_hsps_getpluginlist_5.h" |
|
56 #include "mt_hsps_getpluginlist_6.h" |
|
57 #include "mt_hsps_getpluginlist_7.h" |
|
58 #include "mt_hsps_getpluginlist_8.h" |
|
59 // add plugin |
|
60 #include "mt_hsps_addplugin_1.h" |
|
61 #include "mt_hsps_addplugin_2.h" |
|
62 #include "mt_hsps_addplugin_3.h" |
|
63 #include "mt_hsps_addplugin_4.h" |
|
64 #include "mt_hsps_addplugin_5.h" |
|
65 #include "mt_hsps_addplugin_6.h" |
|
66 #include "mt_hsps_addplugin_7.h" |
|
67 #include "mt_hsps_addplugin_8.h" |
|
68 #include "mt_hsps_addplugin_9.h" |
|
69 #include "mt_hsps_addplugin_10.h" |
|
70 #include "mt_hsps_addplugin_11.h" |
|
71 // remove plugin |
|
72 #include "mt_hsps_removeplugin_1.h" |
|
73 #include "mt_hsps_removeplugin_2.h" |
|
74 #include "mt_hsps_removeplugin_3.h" |
|
75 #include "mt_hsps_removeplugin_4.h" |
|
76 // set plugin settings |
|
77 #include "mt_hsps_setpluginsettings_1.h" |
|
78 #include "mt_hsps_setpluginsettings_2.h" |
|
79 #include "mt_hsps_setpluginsettings_3.h" |
|
80 #include "mt_hsps_setpluginsettings_4.h" |
|
81 #include "mt_hsps_setpluginsettings_5.h" |
|
82 #include "mt_hsps_setpluginsettings_6.h" |
|
83 // get plugin setting |
|
84 #include "mt_hsps_getpluginsettings_1.h" |
|
85 #include "mt_hsps_getpluginsettings_2.h" |
|
86 #include "mt_hsps_getpluginsettings_3.h" |
|
87 // mvoe plugins |
|
88 #include "mt_hsps_moveplugins_1.h" |
|
89 #include "mt_hsps_moveplugins_2.h" |
|
90 #include "mt_hsps_moveplugins_3.h" |
|
91 #include "mt_hsps_moveplugins_4.h" |
|
92 #include "mt_hsps_moveplugins_5.h" |
|
93 #include "mt_hsps_moveplugins_6.h" |
|
94 // replace plugin |
|
95 #include "mt_hsps_replaceplugin_1.h" |
|
96 // get app confs |
|
97 #include "mt_hsps_getappconfs_1.h" |
|
98 // set app confs |
|
99 #include "mt_hsps_setactiveappconf_1.h" |
|
100 #include "mt_hsps_setactiveappconf_2.h" |
|
101 #include "mt_hsps_setactiveappconf_3.h" |
|
102 #include "mt_hsps_setactiveappconf_4.h" |
|
103 // request notification |
|
104 #include "mt_hsps_requestnotify_1.h" |
|
105 #include "mt_hsps_requestnotify_2.h" |
|
106 #include "mt_hsps_requestnotify_3.h" |
|
107 #include "mt_hsps_requestnotify_4.h" |
|
108 #include "mt_hsps_requestnotify_5.h" |
|
109 #include "mt_hsps_requestnotify_6.h" |
|
110 // set active plugin |
|
111 #include "mt_hsps_setactiveplugin_1.h" |
|
112 #include "mt_hsps_setactiveplugin_2.h" |
|
113 #include "mt_hsps_setactiveplugin_3.h" |
|
114 #include "mt_hsps_setactiveplugin_4.h" |
|
115 #include "mt_hsps_setactiveplugin_5.h" |
|
116 #include "mt_hsps_setactiveplugin_6.h" |
|
117 |
|
118 // ======== LOCAL CONSTANTS ==================================================== |
|
119 |
|
120 // Resource files copied by minimal configuration. |
|
121 _LIT( KMinimalResourceFile1, "c:\\private\\20000fb1\\2456\\270513751\\536916225\\1.0\\sources\\main.xml" ); |
|
122 _LIT( KMinimalResourceFile2, "c:\\private\\20000fb1\\2456\\270513751\\536916225\\1.0\\sources\\viewnavigationrules.xml" ); |
|
123 _LIT( KMinimalResourceFile3, "c:\\private\\20000fb1\\2456\\270513751\\536916225\\1.0\\sources\\resource.file" ); |
|
124 _LIT( KMinimalResourceFile4, "c:\\private\\20000fb1\\2456\\270513751\\536916225\\1.0\\sources\\picture.jpeg" ); |
|
125 |
|
126 // ======== LOCAL FUNCTIONS ==================================================== |
|
127 |
|
128 // ======== MEMBER FUNCTIONS =================================================== |
|
129 |
|
130 //------------------------------------------------------------------------------ |
|
131 // Two-phased constructor. |
|
132 //------------------------------------------------------------------------------ |
|
133 MT_CHSPSConfigurationIf* MT_CHSPSConfigurationIf::NewL() |
|
134 { |
|
135 MT_CHSPSConfigurationIf* self = new( ELeave ) MT_CHSPSConfigurationIf(); |
|
136 CleanupStack::PushL( self ); |
|
137 self->ConstructL(); |
|
138 CleanupStack::Pop( self ); |
|
139 |
|
140 return self; |
|
141 } |
|
142 |
|
143 //------------------------------------------------------------------------------ |
|
144 // Destructor. |
|
145 //------------------------------------------------------------------------------ |
|
146 MT_CHSPSConfigurationIf::~MT_CHSPSConfigurationIf() |
|
147 { |
|
148 iFileserver.Close(); |
|
149 } |
|
150 |
|
151 //------------------------------------------------------------------------------ |
|
152 // Constructor |
|
153 //------------------------------------------------------------------------------ |
|
154 MT_CHSPSConfigurationIf::MT_CHSPSConfigurationIf() |
|
155 { |
|
156 } |
|
157 |
|
158 //------------------------------------------------------------------------------ |
|
159 // Symbian Constructor |
|
160 //------------------------------------------------------------------------------ |
|
161 void MT_CHSPSConfigurationIf::ConstructL() |
|
162 { |
|
163 // The ConstructL from the base class CEUnitTestSuiteClass must be called. |
|
164 // It generates the test case table. |
|
165 CEUnitTestSuiteClass::ConstructL(); |
|
166 |
|
167 User::LeaveIfError( iFileserver.Connect() ); |
|
168 } |
|
169 |
|
170 //------------------------------------------------------------------------------ |
|
171 // Remove resources from client's private folder |
|
172 //------------------------------------------------------------------------------ |
|
173 void MT_CHSPSConfigurationIf::ResetClientFolderL() |
|
174 { |
|
175 // Remove all resource files from the test client's private folder (files are |
|
176 // copied back when an application configuration is fecthed) |
|
177 _LIT( KClientFolder, "c:\\private\\102750f0\\"); |
|
178 TFileName folderPath; |
|
179 folderPath.Copy( KClientFolder ); |
|
180 if( BaflUtils::FolderExists( iFileserver, folderPath ) ) |
|
181 { |
|
182 CFileMan* fileMan = CFileMan::NewL( iFileserver ); |
|
183 CleanupStack::PushL( fileMan ); |
|
184 |
|
185 folderPath.Append( _L("2456\\") ); |
|
186 if( BaflUtils::FolderExists( iFileserver, folderPath ) ) |
|
187 { |
|
188 User::LeaveIfError( fileMan->RmDir( folderPath ) ); |
|
189 } |
|
190 |
|
191 folderPath.Copy( KClientFolder ); |
|
192 folderPath.Append( _L("271012080\\") ); |
|
193 if( BaflUtils::FolderExists( iFileserver, folderPath ) ) |
|
194 { |
|
195 User::LeaveIfError( fileMan->RmDir( folderPath ) ); |
|
196 } |
|
197 |
|
198 CleanupStack::PopAndDestroy( fileMan ); |
|
199 } |
|
200 } |
|
201 |
|
202 //------------------------------------------------------------------------------ |
|
203 // Initialize test case |
|
204 //------------------------------------------------------------------------------ |
|
205 void MT_CHSPSConfigurationIf::SetupL() |
|
206 { |
|
207 MT_CHspsInstallationService* installationService = MT_CHspsInstallationService::NewL(); |
|
208 CleanupStack::PushL( installationService ); |
|
209 |
|
210 // Uninstall possible test configurations |
|
211 installationService->UninstallConfigurationL( KHSPSMTAppUid, KHSPSActiveConfMinimal ); |
|
212 installationService->UninstallConfigurationL( KHSPSMTInterfaceUid, KHSPSMinimalViewConf ); |
|
213 installationService->UninstallConfigurationL( KHSPSMTInterfaceUid, KHSPSMinimalWidgetConf ); |
|
214 installationService->UninstallConfigurationL( KHSPSMTAppUid, KHSPSActiveConfTypical ); |
|
215 installationService->UninstallConfigurationL( KHSPSMTInterfaceUid, KHSPSTypicalView1Conf ); |
|
216 installationService->UninstallConfigurationL( KHSPSMTInterfaceUid, KHSPSTypicalView2Conf ); |
|
217 installationService->UninstallConfigurationL( KHSPSMTInterfaceUid, KHSPSTypicalWidgetConf ); |
|
218 installationService->UninstallConfigurationL( KHSPSMTAppUid, KHSPSActiveConfOperator ); |
|
219 installationService->UninstallConfigurationL( KHSPSMTInterfaceUid, KHSPSOperatorViewConf ); |
|
220 installationService->UninstallConfigurationL( KHSPSMTInterfaceUid, KHSPSFinnishWidgetConf ); |
|
221 installationService->UninstallConfigurationL( KHSPSMTInterfaceUid, KHSPSInstalledWidgetConf ); |
|
222 |
|
223 // Remove test configurations from import folder |
|
224 CFileMan* fileManager = CFileMan::NewL( iFileserver ); |
|
225 CleanupStack::PushL( fileManager ); |
|
226 fileManager->Delete( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133.dat" ) ); |
|
227 fileManager->RmDir( _L( "c:\\private\\200159c0\\import\\0998\\" ) ); |
|
228 CleanupStack::PopAndDestroy( fileManager ); |
|
229 |
|
230 // Install test configurations |
|
231 installationService->InstallConfigurationL( KHSPSInstallMinimalRootConf ); |
|
232 installationService->InstallConfigurationL( KHSPSInstallMinimalViewConf ); |
|
233 installationService->InstallConfigurationL( KHSPSInstallMinimalWidgetConf ); |
|
234 installationService->InstallConfigurationL( KHSPSInstallTypicalRootConf ); |
|
235 installationService->InstallConfigurationL( KHSPSInstallTypicalView1Conf ); |
|
236 installationService->InstallConfigurationL( KHSPSInstallTypicalView2Conf ); |
|
237 installationService->InstallConfigurationL( KHSPSInstallTypicalWidgetConf ); |
|
238 installationService->InstallConfigurationL( KHSPSInstallOperatorRootConf ); |
|
239 installationService->InstallConfigurationL( KHSPSInstallOperatorViewConf ); |
|
240 installationService->InstallConfigurationL( KHSPSInstallFinnishWidgetConf ); |
|
241 |
|
242 CleanupStack::PopAndDestroy( installationService ); |
|
243 ResetResources(); |
|
244 } |
|
245 |
|
246 //------------------------------------------------------------------------------ |
|
247 // Deinitialize test case |
|
248 //------------------------------------------------------------------------------ |
|
249 void MT_CHSPSConfigurationIf::Teardown() |
|
250 { |
|
251 // Detach from HSPS |
|
252 TRAPD( err, DetachServiceL() ); |
|
253 // Remove test configuration resource files |
|
254 TRAP( err, RemoveResourceFilesL( iFileserver ) ); |
|
255 if ( err != KErrNone ) |
|
256 { |
|
257 EUNIT_FAIL_TEST( "Teardown failed." ); |
|
258 } |
|
259 } |
|
260 |
|
261 //------------------------------------------------------------------------------ |
|
262 // Prints liw list to a file. |
|
263 //------------------------------------------------------------------------------ |
|
264 void MT_CHSPSConfigurationIf::PrintReturnValuesL( |
|
265 CLiwGenericParamList& aOutParamList ) |
|
266 { |
|
267 CHspsLiwListPrinter* printer = CHspsLiwListPrinter::NewLC(); |
|
268 printer->PrintLiwListL( aOutParamList ); |
|
269 CleanupStack::PopAndDestroy( printer ); |
|
270 } |
|
271 |
|
272 //------------------------------------------------------------------------------ |
|
273 // Test case: GetActiveAppConf(1) |
|
274 //------------------------------------------------------------------------------ |
|
275 void MT_CHSPSConfigurationIf::GetActiveAppConf_1_L() |
|
276 { |
|
277 // Pre conditions |
|
278 //---------------------------------------------------------------- |
|
279 |
|
280 // Remove old resources |
|
281 ResetClientFolderL(); |
|
282 // Set active configuration to Minimal configuration |
|
283 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
284 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
285 // Attach to HSPS |
|
286 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
287 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
288 |
|
289 // Test step 1 |
|
290 //---------------------------------------------------------------- |
|
291 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
292 RunTestStepSyncL( |
|
293 ( TUint8* )getactiveappconf_1_ts_1_method, |
|
294 ( TUint8* )getactiveappconf_1_ts_1_input, |
|
295 ( TUint8* )getactiveappconf_1_ts_1_output, |
|
296 ETrue ); |
|
297 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
298 |
|
299 // Test step 2 |
|
300 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
301 RunTestStepSyncL( |
|
302 ( TUint8* )getactiveappconf_1_ts_2_method, |
|
303 ( TUint8* )getactiveappconf_1_ts_2_input, |
|
304 ( TUint8* )getactiveappconf_1_ts_2_output, |
|
305 ETrue ); |
|
306 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
307 |
|
308 // Test step 3 |
|
309 EUNIT_PRINT( _L8( "Test step 3" ) ); |
|
310 RunTestStepSyncL( |
|
311 ( TUint8* )getactiveappconf_1_ts_3_method, |
|
312 ( TUint8* )getactiveappconf_1_ts_3_input, |
|
313 ( TUint8* )getactiveappconf_1_ts_3_output ); |
|
314 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
315 |
|
316 // Test step 4 |
|
317 EUNIT_PRINT( _L8( "Test step 4" ) ); |
|
318 EUNIT_PRINT( _L8( "DetachServiceL" ) ); |
|
319 DetachServiceL(); |
|
320 EUNIT_PRINT( _L8( "Set KCenrepKeyCheckConf key" ) ); |
|
321 SetCentralRepositoryKeyL( 100000003, 1 ); |
|
322 EUNIT_PRINT( _L8( "AttachServiceL" ) ); |
|
323 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
324 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
325 |
|
326 // Test step 5 |
|
327 EUNIT_PRINT( _L8( "Test step 5" ) ); |
|
328 RunTestStepSyncL( |
|
329 ( TUint8* )getactiveappconf_1_ts_5_method, |
|
330 ( TUint8* )getactiveappconf_1_ts_5_input, |
|
331 ( TUint8* )getactiveappconf_1_ts_5_output ); |
|
332 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
333 |
|
334 // post condition check. |
|
335 //---------------------------------------------------------------- |
|
336 EUNIT_PRINT( _L8( "post condition check for resource file copy" ) ); |
|
337 ResetResources(); |
|
338 AddResourceL( KMinimalResourceFile1, 136 ); |
|
339 AddResourceL( KMinimalResourceFile2, 17 ); |
|
340 AddResourceL( KMinimalResourceFile3, 17 ); |
|
341 AddResourceL( KMinimalResourceFile4, 18 ); |
|
342 CheckResourcesL(); |
|
343 EUNIT_PRINT( _L8( "post condition check for resource file copy passed" ) ); |
|
344 |
|
345 } |
|
346 |
|
347 //------------------------------------------------------------------------------ |
|
348 // Test case: GetActiveAppConf(2) |
|
349 //------------------------------------------------------------------------------ |
|
350 void MT_CHSPSConfigurationIf::GetActiveAppConf_2_L() |
|
351 { |
|
352 |
|
353 // Pre conditions |
|
354 // Set active configuration to Minimal configuration |
|
355 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
356 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
357 // Attach to HSPS |
|
358 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
359 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
360 |
|
361 // Test step 1 |
|
362 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
363 RunTestStepSyncL( |
|
364 ( TUint8* )getactiveappconf_2_ts_1_method, |
|
365 ( TUint8* )getactiveappconf_2_ts_1_input, |
|
366 ( TUint8* )getactiveappconf_2_ts_1_output ); |
|
367 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
368 |
|
369 // Test step 2 |
|
370 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
371 RunTestStepSyncL( |
|
372 ( TUint8* )getactiveappconf_2_ts_2_method, |
|
373 ( TUint8* )getactiveappconf_2_ts_2_input, |
|
374 ( TUint8* )getactiveappconf_2_ts_2_output ); |
|
375 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
376 |
|
377 // Test step 3 |
|
378 EUNIT_PRINT( _L8( "Test step 3" ) ); |
|
379 EUNIT_PRINT( _L8( "DetachServiceL" ) ); |
|
380 DetachServiceL(); |
|
381 EUNIT_PRINT( _L8( "Set KCenrepKeyCheckConf key" ) ); |
|
382 SetCentralRepositoryKeyL( 100000003, 1 ); |
|
383 EUNIT_PRINT( _L8( "AttachServiceL" ) ); |
|
384 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
385 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
386 |
|
387 // Test step 3 |
|
388 EUNIT_PRINT( _L8( "Test step 4" ) ); |
|
389 RunTestStepSyncL( |
|
390 ( TUint8* )getactiveappconf_2_ts_4_method, |
|
391 ( TUint8* )getactiveappconf_2_ts_4_input, |
|
392 ( TUint8* )getactiveappconf_2_ts_4_output ); |
|
393 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
394 |
|
395 } |
|
396 |
|
397 //------------------------------------------------------------------------------ |
|
398 // Test case: GetActiveAppConf(3) |
|
399 //------------------------------------------------------------------------------ |
|
400 void MT_CHSPSConfigurationIf::GetActiveAppConf_3_L() |
|
401 { |
|
402 |
|
403 // Pre conditions |
|
404 // Set active configuration to Typical configuration |
|
405 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
406 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
407 // Attach to HSPS |
|
408 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
409 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
410 |
|
411 // Test step 1 |
|
412 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
413 RunTestStepSyncL( |
|
414 ( TUint8* )getactiveappconf_3_ts_1_method, |
|
415 ( TUint8* )getactiveappconf_3_ts_1_input, |
|
416 ( TUint8* )getactiveappconf_3_ts_1_output ); |
|
417 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
418 |
|
419 // Test step 2 |
|
420 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
421 RunTestStepSyncL( |
|
422 ( TUint8* )getactiveappconf_3_ts_2_method, |
|
423 ( TUint8* )getactiveappconf_3_ts_2_input, |
|
424 ( TUint8* )getactiveappconf_3_ts_2_output ); |
|
425 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
426 |
|
427 // Test step 3 |
|
428 EUNIT_PRINT( _L8( "Test step 3" ) ); |
|
429 EUNIT_PRINT( _L8( "DetachServiceL" ) ); |
|
430 DetachServiceL(); |
|
431 EUNIT_PRINT( _L8( "Set KCenrepKeyCheckConf key" ) ); |
|
432 SetCentralRepositoryKeyL( 100000003, 1 ); |
|
433 EUNIT_PRINT( _L8( "AttachServiceL" ) ); |
|
434 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
435 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
436 |
|
437 // Test step 4 |
|
438 EUNIT_PRINT( _L8( "Test step 3" ) ); |
|
439 RunTestStepSyncL( |
|
440 ( TUint8* )getactiveappconf_3_ts_4_method, |
|
441 ( TUint8* )getactiveappconf_3_ts_4_input, |
|
442 ( TUint8* )getactiveappconf_3_ts_4_output ); |
|
443 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
444 |
|
445 } |
|
446 |
|
447 //------------------------------------------------------------------------------ |
|
448 // Test case: GetPluginConf(1) |
|
449 //------------------------------------------------------------------------------ |
|
450 void MT_CHSPSConfigurationIf::GetPluginConf_1_L() |
|
451 { |
|
452 // Pre conditions |
|
453 // Set active configuration to Minimal configuration |
|
454 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
455 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
456 // Attach to HSPS |
|
457 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
458 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
459 |
|
460 // Test step 1 |
|
461 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
462 RunTestStepSyncL( |
|
463 ( TUint8* )getpluginconf_1_ts_1_method, |
|
464 ( TUint8* )getpluginconf_1_ts_1_input, |
|
465 ( TUint8* )getpluginconf_1_ts_1_output, |
|
466 ETrue ); |
|
467 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
468 |
|
469 // Test step 2 |
|
470 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
471 RunTestStepSyncL( |
|
472 ( TUint8* )getpluginconf_1_ts_2_method, |
|
473 ( TUint8* )getpluginconf_1_ts_2_input, |
|
474 ( TUint8* )getpluginconf_1_ts_2_output ); |
|
475 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
476 |
|
477 // Test step 3 |
|
478 EUNIT_PRINT( _L8( "Test step 3" ) ); |
|
479 RunTestStepSyncL( |
|
480 ( TUint8* )getpluginconf_1_ts_3_method, |
|
481 ( TUint8* )getpluginconf_1_ts_3_input, |
|
482 ( TUint8* )getpluginconf_1_ts_3_output ); |
|
483 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
484 |
|
485 // Test step 4 |
|
486 EUNIT_PRINT( _L8( "Test step 4" ) ); |
|
487 EUNIT_PRINT( _L8( "DetachServiceL" ) ); |
|
488 DetachServiceL(); |
|
489 EUNIT_PRINT( _L8( "Set KCenrepKeyCheckConf key" ) ); |
|
490 SetCentralRepositoryKeyL( 100000003, 1 ); |
|
491 EUNIT_PRINT( _L8( "AttachServiceL" ) ); |
|
492 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
493 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
494 |
|
495 // Test step 5 |
|
496 EUNIT_PRINT( _L8( "Test step 5" ) ); |
|
497 RunTestStepSyncL( |
|
498 ( TUint8* )getpluginconf_1_ts_5_method, |
|
499 ( TUint8* )getpluginconf_1_ts_5_input, |
|
500 ( TUint8* )getpluginconf_1_ts_5_output ); |
|
501 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
502 |
|
503 } |
|
504 |
|
505 //------------------------------------------------------------------------------ |
|
506 // Test case: GetPluginConf(2) |
|
507 //------------------------------------------------------------------------------ |
|
508 void MT_CHSPSConfigurationIf::GetPluginConf_2_L() |
|
509 { |
|
510 // Pre conditions |
|
511 // Set active configuration to Minimal configuration |
|
512 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
513 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
514 // Attach to HSPS |
|
515 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
516 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
517 |
|
518 // Test step 1 |
|
519 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
520 RunTestStepSyncL( |
|
521 ( TUint8* )getpluginconf_2_ts_1_method, |
|
522 ( TUint8* )getpluginconf_2_ts_1_input, |
|
523 ( TUint8* )getpluginconf_2_ts_1_output ); |
|
524 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
525 |
|
526 } |
|
527 |
|
528 //------------------------------------------------------------------------------ |
|
529 // Test case: GetPluginConf(3) |
|
530 //------------------------------------------------------------------------------ |
|
531 void MT_CHSPSConfigurationIf::GetPluginConf_3_L() |
|
532 { |
|
533 // Pre conditions |
|
534 // Set active configuration to Minimal configuration |
|
535 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
536 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
537 // Attach to HSPS |
|
538 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
539 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
540 |
|
541 // Test step 1 |
|
542 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
543 RunTestStepSyncL( |
|
544 ( TUint8* )getpluginconf_3_ts_1_method, |
|
545 ( TUint8* )getpluginconf_3_ts_1_input, |
|
546 ( TUint8* )getpluginconf_3_ts_1_output ); |
|
547 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
548 |
|
549 } |
|
550 |
|
551 //------------------------------------------------------------------------------ |
|
552 // Test case: GetPluginConf(4) |
|
553 //------------------------------------------------------------------------------ |
|
554 void MT_CHSPSConfigurationIf::GetPluginConf_4_L() |
|
555 { |
|
556 // Pre conditions |
|
557 // Set active configuration to Minimal configuration |
|
558 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
559 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
560 // Attach to HSPS |
|
561 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
562 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
563 |
|
564 // Test step 1 |
|
565 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
566 RunTestStepSyncL( |
|
567 ( TUint8* )getpluginconf_4_ts_1_method, |
|
568 ( TUint8* )getpluginconf_4_ts_1_input, |
|
569 ( TUint8* )getpluginconf_4_ts_1_output ); |
|
570 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
571 |
|
572 // Test step 2 |
|
573 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
574 RunTestStepSyncL( |
|
575 ( TUint8* )getpluginconf_4_ts_2_method, |
|
576 ( TUint8* )getpluginconf_4_ts_2_input, |
|
577 ( TUint8* )getpluginconf_4_ts_2_output ); |
|
578 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
579 |
|
580 // Test step 3 |
|
581 EUNIT_PRINT( _L8( "Test step 3" ) ); |
|
582 EUNIT_PRINT( _L8( "DetachServiceL" ) ); |
|
583 DetachServiceL(); |
|
584 EUNIT_PRINT( _L8( "Set KCenrepKeyCheckConf key" ) ); |
|
585 SetCentralRepositoryKeyL( 100000003, 1 ); |
|
586 EUNIT_PRINT( _L8( "AttachServiceL" ) ); |
|
587 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
588 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
589 |
|
590 // Test step 4 |
|
591 EUNIT_PRINT( _L8( "Test step 4" ) ); |
|
592 RunTestStepSyncL( |
|
593 ( TUint8* )getpluginconf_4_ts_4_method, |
|
594 ( TUint8* )getpluginconf_4_ts_4_input, |
|
595 ( TUint8* )getpluginconf_4_ts_4_output ); |
|
596 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
597 |
|
598 } |
|
599 |
|
600 //------------------------------------------------------------------------------ |
|
601 // Test case: GetPluginConf(5) |
|
602 //------------------------------------------------------------------------------ |
|
603 void MT_CHSPSConfigurationIf::GetPluginConf_5_L() |
|
604 { |
|
605 // Pre conditions |
|
606 // Set active configuration to Minimal configuration |
|
607 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
608 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
609 // Attach to HSPS |
|
610 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
611 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
612 |
|
613 // Test step 1 |
|
614 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
615 RunTestStepSyncL( |
|
616 ( TUint8* )getpluginconf_5_ts_1_method, |
|
617 ( TUint8* )getpluginconf_5_ts_1_input, |
|
618 ( TUint8* )getpluginconf_5_ts_1_output ); |
|
619 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
620 |
|
621 // Test step 2 |
|
622 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
623 RunTestStepSyncL( |
|
624 ( TUint8* )getpluginconf_5_ts_2_method, |
|
625 ( TUint8* )getpluginconf_5_ts_2_input, |
|
626 ( TUint8* )getpluginconf_5_ts_2_output ); |
|
627 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
628 |
|
629 // Test step 3 |
|
630 EUNIT_PRINT( _L8( "Test step 3" ) ); |
|
631 RunTestStepSyncL( |
|
632 ( TUint8* )getpluginconf_5_ts_3_method, |
|
633 ( TUint8* )getpluginconf_5_ts_3_input, |
|
634 ( TUint8* )getpluginconf_5_ts_3_output ); |
|
635 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
636 |
|
637 // Test step 4 |
|
638 EUNIT_PRINT( _L8( "Test step 4" ) ); |
|
639 EUNIT_PRINT( _L8( "DetachServiceL" ) ); |
|
640 DetachServiceL(); |
|
641 EUNIT_PRINT( _L8( "Set KCenrepKeyCheckConf key" ) ); |
|
642 SetCentralRepositoryKeyL( 100000003, 1 ); |
|
643 EUNIT_PRINT( _L8( "AttachServiceL" ) ); |
|
644 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
645 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
646 |
|
647 // Test step 5 |
|
648 EUNIT_PRINT( _L8( "Test step 5" ) ); |
|
649 RunTestStepSyncL( |
|
650 ( TUint8* )getpluginconf_5_ts_5_method, |
|
651 ( TUint8* )getpluginconf_5_ts_5_input, |
|
652 ( TUint8* )getpluginconf_5_ts_5_output ); |
|
653 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
654 |
|
655 } |
|
656 |
|
657 //------------------------------------------------------------------------------ |
|
658 // Test case: GetPlugins(1) |
|
659 //------------------------------------------------------------------------------ |
|
660 void MT_CHSPSConfigurationIf::GetPlugins_1_L() |
|
661 { |
|
662 |
|
663 // Pre conditions |
|
664 // Set active configuration to Minimal configuration |
|
665 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
666 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
667 // Attach to HSPS |
|
668 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
669 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
670 |
|
671 // Test step 1 |
|
672 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
673 RunTestStepSyncL( |
|
674 ( TUint8* )getplugins_1_ts_1_method, |
|
675 ( TUint8* )getplugins_1_ts_1_input, |
|
676 ( TUint8* )getplugins_1_ts_1_output, |
|
677 ETrue ); |
|
678 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
679 } |
|
680 |
|
681 //------------------------------------------------------------------------------ |
|
682 // Test case: GetPlugins(2) |
|
683 //------------------------------------------------------------------------------ |
|
684 void MT_CHSPSConfigurationIf::GetPlugins_2_L() |
|
685 { |
|
686 // Pre conditions |
|
687 // Set active configuration to Minimal configuration |
|
688 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
689 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
690 // Attach to HSPS |
|
691 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
692 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
693 |
|
694 // Test step 1 |
|
695 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
696 RunTestStepSyncL( |
|
697 ( TUint8* )getplugins_2_ts_1_method, |
|
698 ( TUint8* )getplugins_2_ts_1_input, |
|
699 ( TUint8* )getplugins_2_ts_1_output ); |
|
700 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
701 } |
|
702 |
|
703 //------------------------------------------------------------------------------ |
|
704 // Test case: GetPlugins(3) |
|
705 //------------------------------------------------------------------------------ |
|
706 void MT_CHSPSConfigurationIf::GetPlugins_3_L() |
|
707 { |
|
708 // Pre conditions |
|
709 // Set active configuration to Minimal configuration |
|
710 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
711 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
712 // Attach to HSPS |
|
713 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
714 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
715 |
|
716 // Test step 1 |
|
717 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
718 RunTestStepSyncL( |
|
719 ( TUint8* )getplugins_3_ts_1_method, |
|
720 ( TUint8* )getplugins_3_ts_1_input, |
|
721 ( TUint8* )getplugins_3_ts_1_output ); |
|
722 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
723 } |
|
724 |
|
725 //------------------------------------------------------------------------------ |
|
726 // Test case: GetPlugins(4) |
|
727 //------------------------------------------------------------------------------ |
|
728 void MT_CHSPSConfigurationIf::GetPlugins_4_L() |
|
729 { |
|
730 // Pre conditions |
|
731 // Set active configuration to Minimal configuration |
|
732 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
733 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
734 // Attach to HSPS |
|
735 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
736 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
737 |
|
738 // Test step 1 |
|
739 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
740 RunTestStepSyncL( |
|
741 ( TUint8* )getplugins_4_ts_1_method, |
|
742 ( TUint8* )getplugins_4_ts_1_input, |
|
743 ( TUint8* )getplugins_4_ts_1_output ); |
|
744 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
745 } |
|
746 |
|
747 //------------------------------------------------------------------------------ |
|
748 // Test case: GetPlugins(5) |
|
749 //------------------------------------------------------------------------------ |
|
750 void MT_CHSPSConfigurationIf::GetPlugins_5_L() |
|
751 { |
|
752 // Pre conditions |
|
753 // Set active configuration to Minimal configuration |
|
754 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
755 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
756 // Attach to HSPS |
|
757 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
758 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
759 |
|
760 // Test step 1 |
|
761 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
762 RunTestStepSyncL( |
|
763 ( TUint8* )getplugins_5_ts_1_method, |
|
764 ( TUint8* )getplugins_5_ts_1_input, |
|
765 ( TUint8* )getplugins_5_ts_1_output ); |
|
766 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
767 } |
|
768 |
|
769 //------------------------------------------------------------------------------ |
|
770 // Test case: GetPlugins(6) |
|
771 //------------------------------------------------------------------------------ |
|
772 void MT_CHSPSConfigurationIf::GetPlugins_6_L() |
|
773 { |
|
774 // Pre conditions |
|
775 // Set active configuration to Minimal configuration |
|
776 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
777 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
778 // Attach to HSPS |
|
779 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
780 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
781 |
|
782 // Test step 1 |
|
783 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
784 RunTestStepSyncL( |
|
785 ( TUint8* )getplugins_6_ts_1_method, |
|
786 ( TUint8* )getplugins_6_ts_1_input, |
|
787 ( TUint8* )getplugins_6_ts_1_output ); |
|
788 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
789 } |
|
790 |
|
791 //------------------------------------------------------------------------------ |
|
792 // Test case: GetPlugins(7) |
|
793 //------------------------------------------------------------------------------ |
|
794 void MT_CHSPSConfigurationIf::GetPlugins_7_L() |
|
795 { |
|
796 // Pre conditions |
|
797 // Set active configuration to Minimal configuration |
|
798 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
799 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
800 // Attach to HSPS |
|
801 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
802 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
803 |
|
804 // Test step 1 |
|
805 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
806 RunTestStepSyncL( |
|
807 ( TUint8* )getplugins_7_ts_1_method, |
|
808 ( TUint8* )getplugins_7_ts_1_input, |
|
809 ( TUint8* )getplugins_7_ts_1_output ); |
|
810 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
811 } |
|
812 |
|
813 //------------------------------------------------------------------------------ |
|
814 // Test case: GetPluginList(1) |
|
815 //------------------------------------------------------------------------------ |
|
816 void MT_CHSPSConfigurationIf::GetPluginList_1_L() |
|
817 { |
|
818 |
|
819 // Pre conditions |
|
820 // Set active configuration to Minimal configuration |
|
821 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
822 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
823 // Attach to HSPS |
|
824 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
825 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
826 |
|
827 // Test step 1 |
|
828 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
829 RunTestStepSyncL( |
|
830 ( TUint8* )getpluginlist_1_ts_1_method, |
|
831 ( TUint8* )getpluginlist_1_ts_1_input, |
|
832 ( TUint8* )getpluginlist_1_ts_1_output, |
|
833 ETrue ); |
|
834 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
835 } |
|
836 |
|
837 //------------------------------------------------------------------------------ |
|
838 // Test case: GetPluginList(2) |
|
839 //------------------------------------------------------------------------------ |
|
840 void MT_CHSPSConfigurationIf::GetPluginList_2_L() |
|
841 { |
|
842 |
|
843 // Pre conditions |
|
844 // Set active configuration to Minimal configuration |
|
845 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
846 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
847 // Attach to HSPS |
|
848 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
849 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
850 |
|
851 // Test step 1 |
|
852 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
853 RunTestStepSyncL( |
|
854 ( TUint8* )getpluginlist_2_ts_1_method, |
|
855 ( TUint8* )getpluginlist_2_ts_1_input, |
|
856 ( TUint8* )getpluginlist_2_ts_1_output ); |
|
857 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
858 } |
|
859 |
|
860 //------------------------------------------------------------------------------ |
|
861 // Test case: GetPluginList(3) |
|
862 //------------------------------------------------------------------------------ |
|
863 void MT_CHSPSConfigurationIf::GetPluginList_3_L() |
|
864 { |
|
865 |
|
866 // Pre conditions |
|
867 // Set active configuration to Minimal configuration |
|
868 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
869 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
870 // Attach to HSPS |
|
871 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
872 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
873 |
|
874 // Test step 1 |
|
875 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
876 RunTestStepSyncL( |
|
877 ( TUint8* )getpluginlist_3_ts_1_method, |
|
878 ( TUint8* )getpluginlist_3_ts_1_input, |
|
879 ( TUint8* )getpluginlist_3_ts_1_output ); |
|
880 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
881 } |
|
882 |
|
883 //------------------------------------------------------------------------------ |
|
884 // Test case: GetPluginList(4) |
|
885 //------------------------------------------------------------------------------ |
|
886 void MT_CHSPSConfigurationIf::GetPluginList_4_L() |
|
887 { |
|
888 |
|
889 // Pre conditions |
|
890 // Set active configuration to Minimal configuration |
|
891 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
892 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
893 // Attach to HSPS |
|
894 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
895 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
896 |
|
897 // Test step 1 |
|
898 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
899 RunTestStepSyncL( |
|
900 ( TUint8* )getpluginlist_4_ts_1_method, |
|
901 ( TUint8* )getpluginlist_4_ts_1_input, |
|
902 ( TUint8* )getpluginlist_4_ts_1_output ); |
|
903 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
904 } |
|
905 |
|
906 //------------------------------------------------------------------------------ |
|
907 // Test case: GetPluginList(5) |
|
908 //------------------------------------------------------------------------------ |
|
909 void MT_CHSPSConfigurationIf::GetPluginList_5_L() |
|
910 { |
|
911 |
|
912 // Pre conditions |
|
913 // Set active configuration to Minimal configuration |
|
914 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
915 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
916 // Attach to HSPS |
|
917 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
918 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
919 |
|
920 // Test step 1 |
|
921 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
922 RunTestStepSyncL( |
|
923 ( TUint8* )getpluginlist_5_ts_1_method, |
|
924 ( TUint8* )getpluginlist_5_ts_1_input, |
|
925 ( TUint8* )getpluginlist_5_ts_1_output ); |
|
926 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
927 } |
|
928 |
|
929 //------------------------------------------------------------------------------ |
|
930 // Test case: GetPluginList(6) |
|
931 //------------------------------------------------------------------------------ |
|
932 void MT_CHSPSConfigurationIf::GetPluginList_6_L() |
|
933 { |
|
934 |
|
935 // Pre conditions |
|
936 // Set active configuration to Minimal configuration |
|
937 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
938 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
939 // Attach to HSPS |
|
940 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
941 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
942 |
|
943 // Test step 1 |
|
944 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
945 RunTestStepSyncL( |
|
946 ( TUint8* )getpluginlist_6_ts_1_method, |
|
947 ( TUint8* )getpluginlist_6_ts_1_input, |
|
948 ( TUint8* )getpluginlist_6_ts_1_output ); |
|
949 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
950 } |
|
951 |
|
952 //------------------------------------------------------------------------------ |
|
953 // Test case: GetPluginList(7) |
|
954 //------------------------------------------------------------------------------ |
|
955 void MT_CHSPSConfigurationIf::GetPluginList_7_L() |
|
956 { |
|
957 |
|
958 // Pre conditions |
|
959 // Set active configuration to Minimal configuration |
|
960 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Operator" ) ); |
|
961 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfOperator ); |
|
962 // Attach to HSPS |
|
963 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
964 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
965 |
|
966 // Test step 1 |
|
967 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
968 RunTestStepSyncL( |
|
969 ( TUint8* )getpluginlist_7_ts_1_method, |
|
970 ( TUint8* )getpluginlist_7_ts_1_input, |
|
971 ( TUint8* )getpluginlist_7_ts_1_output ); |
|
972 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
973 } |
|
974 |
|
975 //------------------------------------------------------------------------------ |
|
976 // Test case: GetPluginList(8) |
|
977 //------------------------------------------------------------------------------ |
|
978 void MT_CHSPSConfigurationIf::GetPluginList_8_L() |
|
979 { |
|
980 |
|
981 // Pre conditions |
|
982 // Set active configuration to Minimal configuration |
|
983 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Operator" ) ); |
|
984 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfOperator ); |
|
985 // Attach to HSPS |
|
986 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
987 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
988 |
|
989 // Test step 1 |
|
990 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
991 RunTestStepSyncL( |
|
992 ( TUint8* )getpluginlist_8_ts_1_method, |
|
993 ( TUint8* )getpluginlist_8_ts_1_input, |
|
994 ( TUint8* )getpluginlist_8_ts_1_output ); |
|
995 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
996 } |
|
997 |
|
998 //------------------------------------------------------------------------------ |
|
999 // Test case: AddPlugin(1) |
|
1000 //------------------------------------------------------------------------------ |
|
1001 void MT_CHSPSConfigurationIf::AddPlugin_1_L() |
|
1002 { |
|
1003 // Pre conditions |
|
1004 // Set active configuration to Typical configuration |
|
1005 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
1006 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
1007 // Attach to HSPS |
|
1008 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1009 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1010 |
|
1011 // Test step 1 |
|
1012 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1013 RunTestStepSyncL( |
|
1014 ( TUint8* )addplugin_1_ts_1_method, |
|
1015 ( TUint8* )addplugin_1_ts_1_input, |
|
1016 ( TUint8* )addplugin_1_ts_1_output, |
|
1017 ETrue ); |
|
1018 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1019 |
|
1020 // Test step 2 |
|
1021 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
1022 RunTestStepSyncL( |
|
1023 ( TUint8* )addplugin_1_ts_2_method, |
|
1024 ( TUint8* )addplugin_1_ts_2_input, |
|
1025 ( TUint8* )addplugin_1_ts_2_output ); |
|
1026 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1027 |
|
1028 // Test step 3 |
|
1029 EUNIT_PRINT( _L8( "Test step 3" ) ); |
|
1030 RunTestStepSyncL( |
|
1031 ( TUint8* )addplugin_1_ts_3_method, |
|
1032 ( TUint8* )addplugin_1_ts_3_input, |
|
1033 ( TUint8* )addplugin_1_ts_3_output ); |
|
1034 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1035 |
|
1036 // Test step 4 |
|
1037 EUNIT_PRINT( _L8( "Test step 4" ) ); |
|
1038 RunTestStepSyncL( |
|
1039 ( TUint8* )addplugin_1_ts_4_method, |
|
1040 ( TUint8* )addplugin_1_ts_4_input, |
|
1041 ( TUint8* )addplugin_1_ts_4_output, |
|
1042 ETrue ); |
|
1043 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1044 |
|
1045 // Test step 5 |
|
1046 EUNIT_PRINT( _L8( "Test step 5" ) ); |
|
1047 RunTestStepSyncL( |
|
1048 ( TUint8* )addplugin_1_ts_5_method, |
|
1049 ( TUint8* )addplugin_1_ts_5_input, |
|
1050 ( TUint8* )addplugin_1_ts_5_output ); |
|
1051 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1052 } |
|
1053 |
|
1054 //------------------------------------------------------------------------------ |
|
1055 // Test case: AddPlugin(2) |
|
1056 //------------------------------------------------------------------------------ |
|
1057 void MT_CHSPSConfigurationIf::AddPlugin_2_L() |
|
1058 { |
|
1059 // Pre conditions |
|
1060 //---------------------------------------------------------------- |
|
1061 ResetClientFolderL(); // affects performance testing |
|
1062 |
|
1063 // Set active configuration to Typical configuration |
|
1064 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
1065 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
1066 // Attach to HSPS |
|
1067 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1068 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1069 |
|
1070 // Test step 1 |
|
1071 //---------------------------------------------------------------- |
|
1072 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1073 RunTestStepSyncL( |
|
1074 ( TUint8* )addplugin_2_ts_1_method, |
|
1075 ( TUint8* )addplugin_2_ts_1_input, |
|
1076 ( TUint8* )addplugin_2_ts_1_output ); |
|
1077 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1078 |
|
1079 // post condition check: verify that resources of the application configuration have been copied |
|
1080 EUNIT_PRINT( _L8( "post condition check for resource file copy" ) ); |
|
1081 ResetResources(); |
|
1082 // Typical - Root |
|
1083 AddResourceL( _L("c:\\private\\20000fb1\\536874929\\270513751\\536916240\\1.0\\sources\\root.bmp"), 165450 ); |
|
1084 // Typical - View1 |
|
1085 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916241\\1.0\\sources\\view1.bmp"), 9354 ); |
|
1086 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916241\\1.0\\sources\\hs_logoz.jpg"), 19519 ); |
|
1087 // Typical - View2 |
|
1088 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916242\\1.0\\sources\\view2.bmp"), 183654 ); |
|
1089 // Typical - Widget |
|
1090 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916256\\1.0\\sources\\hs_logo.jpg"), 18179 ); |
|
1091 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916256\\1.0\\sources\\widget.bmp"), 6446 ); |
|
1092 CheckResourcesL( ); |
|
1093 // Minimal - Widget |
|
1094 EUNIT_PRINT( _L8( "post condition check for resource copy passed" ) ); |
|
1095 |
|
1096 // Test step 2 |
|
1097 //---------------------------------------------------------------- |
|
1098 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
1099 RunTestStepSyncL( |
|
1100 ( TUint8* )addplugin_2_ts_2_method, |
|
1101 ( TUint8* )addplugin_2_ts_2_input, |
|
1102 ( TUint8* )addplugin_2_ts_2_output ); |
|
1103 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1104 |
|
1105 // Test step 3 |
|
1106 //---------------------------------------------------------------- |
|
1107 EUNIT_PRINT( _L8( "Test step 3" ) ); |
|
1108 RunTestStepSyncL( |
|
1109 ( TUint8* )addplugin_2_ts_3_method, |
|
1110 ( TUint8* )addplugin_2_ts_3_input, |
|
1111 ( TUint8* )addplugin_2_ts_3_output ); |
|
1112 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1113 |
|
1114 // Test step 4 |
|
1115 //---------------------------------------------------------------- |
|
1116 EUNIT_PRINT( _L8( "Test step 4" ) ); |
|
1117 RunTestStepSyncL( |
|
1118 ( TUint8* )addplugin_2_ts_4_method, |
|
1119 ( TUint8* )addplugin_2_ts_4_input, |
|
1120 ( TUint8* )addplugin_2_ts_4_output ); |
|
1121 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1122 |
|
1123 // Test step 5 |
|
1124 //---------------------------------------------------------------- |
|
1125 EUNIT_PRINT( _L8( "Test step 5" ) ); |
|
1126 RunTestStepSyncL( |
|
1127 ( TUint8* )addplugin_2_ts_5_method, |
|
1128 ( TUint8* )addplugin_2_ts_5_input, |
|
1129 ( TUint8* )addplugin_2_ts_5_output ); |
|
1130 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1131 } |
|
1132 |
|
1133 //------------------------------------------------------------------------------ |
|
1134 // Test case: AddPlugin(3) |
|
1135 //------------------------------------------------------------------------------ |
|
1136 void MT_CHSPSConfigurationIf::AddPlugin_3_L() |
|
1137 { |
|
1138 // Pre conditions |
|
1139 // Set active configuration to Minimal configuration |
|
1140 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
1141 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
1142 // Attach to HSPS |
|
1143 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1144 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1145 |
|
1146 // Test step 1 |
|
1147 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1148 RunTestStepSyncL( |
|
1149 ( TUint8* )addplugin_3_ts_1_method, |
|
1150 ( TUint8* )addplugin_3_ts_1_input, |
|
1151 ( TUint8* )addplugin_3_ts_1_output ); |
|
1152 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1153 |
|
1154 // Test step 2 |
|
1155 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
1156 RunTestStepSyncL( |
|
1157 ( TUint8* )addplugin_3_ts_2_method, |
|
1158 ( TUint8* )addplugin_3_ts_2_input, |
|
1159 ( TUint8* )addplugin_3_ts_2_output ); |
|
1160 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1161 } |
|
1162 |
|
1163 //------------------------------------------------------------------------------ |
|
1164 // Test case: AddPlugin(4) |
|
1165 //------------------------------------------------------------------------------ |
|
1166 void MT_CHSPSConfigurationIf::AddPlugin_4_L() |
|
1167 { |
|
1168 // Pre conditions |
|
1169 // Set active configuration to Minimal configuration |
|
1170 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
1171 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
1172 // Attach to HSPS |
|
1173 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1174 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1175 |
|
1176 // Test step 1 |
|
1177 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1178 RunTestStepSyncL( |
|
1179 ( TUint8* )addplugin_4_ts_1_method, |
|
1180 ( TUint8* )addplugin_4_ts_1_input, |
|
1181 ( TUint8* )addplugin_4_ts_1_output ); |
|
1182 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1183 } |
|
1184 |
|
1185 //------------------------------------------------------------------------------ |
|
1186 // Test case: AddPlugin(5) |
|
1187 //------------------------------------------------------------------------------ |
|
1188 void MT_CHSPSConfigurationIf::AddPlugin_5_L() |
|
1189 { |
|
1190 // Pre conditions |
|
1191 // Set active configuration to Minimal configuration |
|
1192 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
1193 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
1194 // Attach to HSPS |
|
1195 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1196 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1197 |
|
1198 // Test step 1 |
|
1199 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1200 RunTestStepSyncL( |
|
1201 ( TUint8* )addplugin_5_ts_1_method, |
|
1202 ( TUint8* )addplugin_5_ts_1_input, |
|
1203 ( TUint8* )addplugin_5_ts_1_output ); |
|
1204 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1205 } |
|
1206 |
|
1207 //------------------------------------------------------------------------------ |
|
1208 // Test case: AddPlugin(6) |
|
1209 //------------------------------------------------------------------------------ |
|
1210 void MT_CHSPSConfigurationIf::AddPlugin_6_L() |
|
1211 { |
|
1212 // Pre conditions |
|
1213 // Set active configuration to Operator configuration |
|
1214 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Operator" ) ); |
|
1215 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfOperator ); |
|
1216 // Attach to HSPS |
|
1217 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1218 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1219 |
|
1220 // Test step 1 |
|
1221 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1222 RunTestStepSyncL( |
|
1223 ( TUint8* )addplugin_6_ts_1_method, |
|
1224 ( TUint8* )addplugin_6_ts_1_input, |
|
1225 ( TUint8* )addplugin_6_ts_1_output ); |
|
1226 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1227 |
|
1228 // Test step 2 |
|
1229 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
1230 RunTestStepSyncL( |
|
1231 ( TUint8* )addplugin_6_ts_2_method, |
|
1232 ( TUint8* )addplugin_6_ts_2_input, |
|
1233 ( TUint8* )addplugin_6_ts_2_output ); |
|
1234 ResetResources(); |
|
1235 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916273\\1.0\\sources\\dummy.mif"), 4608 ); |
|
1236 CheckResourcesL( ); |
|
1237 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1238 |
|
1239 // Test step 3 |
|
1240 EUNIT_PRINT( _L8( "Test step 3" ) ); |
|
1241 RunTestStepSyncL( |
|
1242 ( TUint8* )addplugin_6_ts_3_method, |
|
1243 ( TUint8* )addplugin_6_ts_3_input, |
|
1244 ( TUint8* )addplugin_6_ts_3_output ); |
|
1245 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1246 |
|
1247 // Test step 4 |
|
1248 EUNIT_PRINT( _L8( "Test step 4" ) ); |
|
1249 RunTestStepSyncL( |
|
1250 ( TUint8* )addplugin_6_ts_4_method, |
|
1251 ( TUint8* )addplugin_6_ts_4_input, |
|
1252 ( TUint8* )addplugin_6_ts_4_output ); |
|
1253 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1254 |
|
1255 // Test step 5 |
|
1256 EUNIT_PRINT( _L8( "Test step 5" ) ); |
|
1257 RunTestStepSyncL( |
|
1258 ( TUint8* )addplugin_6_ts_5_method, |
|
1259 ( TUint8* )addplugin_6_ts_5_input, |
|
1260 ( TUint8* )addplugin_6_ts_5_output ); |
|
1261 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1262 } |
|
1263 |
|
1264 //------------------------------------------------------------------------------ |
|
1265 // Test case: AddPlugin(7) |
|
1266 //------------------------------------------------------------------------------ |
|
1267 void MT_CHSPSConfigurationIf::AddPlugin_7_L() |
|
1268 { |
|
1269 // Pre conditions |
|
1270 // Set active configuration to Operator configuration |
|
1271 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
1272 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
1273 // Attach to HSPS |
|
1274 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1275 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1276 |
|
1277 // Test step 1 |
|
1278 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1279 RunTestStepSyncL( |
|
1280 ( TUint8* )addplugin_7_ts_1_method, |
|
1281 ( TUint8* )addplugin_7_ts_1_input, |
|
1282 ( TUint8* )addplugin_7_ts_1_output ); |
|
1283 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1284 |
|
1285 // Test step 2 |
|
1286 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
1287 RunTestStepSyncL( |
|
1288 ( TUint8* )addplugin_7_ts_2_method, |
|
1289 ( TUint8* )addplugin_7_ts_2_input, |
|
1290 ( TUint8* )addplugin_7_ts_2_output ); |
|
1291 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1292 |
|
1293 // Test step 3 |
|
1294 EUNIT_PRINT( _L8( "Test step 3" ) ); |
|
1295 RunTestStepSyncL( |
|
1296 ( TUint8* )addplugin_7_ts_3_method, |
|
1297 ( TUint8* )addplugin_7_ts_3_input, |
|
1298 ( TUint8* )addplugin_7_ts_3_output ); |
|
1299 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1300 |
|
1301 // Test step 4 |
|
1302 EUNIT_PRINT( _L8( "Test step 4" ) ); |
|
1303 RunTestStepSyncL( |
|
1304 ( TUint8* )addplugin_7_ts_4_method, |
|
1305 ( TUint8* )addplugin_7_ts_4_input, |
|
1306 ( TUint8* )addplugin_7_ts_4_output ); |
|
1307 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1308 } |
|
1309 |
|
1310 //------------------------------------------------------------------------------ |
|
1311 // Test case: AddPlugin(8) |
|
1312 //------------------------------------------------------------------------------ |
|
1313 void MT_CHSPSConfigurationIf::AddPlugin_8_L() |
|
1314 { |
|
1315 // Pre conditions |
|
1316 //---------------------------------------------------------------- |
|
1317 ResetClientFolderL(); // affects performance testing |
|
1318 |
|
1319 // Active device language is ELangEnglish(=1) |
|
1320 // in \epoc32\RELEASE\WINSCW\udeb\Z\resource\BootData\Languages.txt |
|
1321 |
|
1322 // Set active configuration to Minimal configuration |
|
1323 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
1324 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
1325 |
|
1326 // Attach to HSPS |
|
1327 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1328 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1329 |
|
1330 // Test step 1: add widget with english locale to unlocalized configuration |
|
1331 //---------------------------------------------------------------- |
|
1332 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1333 RunTestStepSyncL( |
|
1334 ( TUint8* )addplugin_8_ts_1_method, |
|
1335 ( TUint8* )addplugin_8_ts_1_input, |
|
1336 ( TUint8* )addplugin_8_ts_1_output ); |
|
1337 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1338 |
|
1339 // Test step 2: get added plugin configuration |
|
1340 //---------------------------------------------------------------- |
|
1341 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
1342 RunTestStepSyncL( |
|
1343 ( TUint8* )addplugin_8_ts_2_method, |
|
1344 ( TUint8* )addplugin_8_ts_2_input, |
|
1345 ( TUint8* )addplugin_8_ts_2_output ); |
|
1346 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1347 |
|
1348 // post condition check: verify that resources of the application configuration have been copied |
|
1349 //---------------------------------------------------------------- |
|
1350 EUNIT_PRINT( _L8( "post condition check for resource file copy" ) ); |
|
1351 // Minimal - Root |
|
1352 // Minimal - View |
|
1353 ResetResources(); |
|
1354 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916225\\1.0\\sources\\main.xml"), 136 ); |
|
1355 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916225\\1.0\\sources\\picture.jpeg"), 18 ); |
|
1356 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916225\\1.0\\sources\\resource.file"), 17 ); |
|
1357 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916225\\1.0\\sources\\viewnavigationrules.xml"), 17 ); |
|
1358 // Minimal - Widget |
|
1359 // Typical - View1 |
|
1360 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916241\\1.0\\sources\\view1.bmp"), 9354 ); |
|
1361 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916241\\1.0\\sources\\hs_logoz.jpg"), 19519 ); |
|
1362 // Typical - Widget |
|
1363 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916256\\1.0\\sources\\hs_logo.jpg"), 18179 ); |
|
1364 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916256\\1.0\\sources\\widget.bmp"), 6446 ); |
|
1365 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916256\\1.0\\sources\\widget.bmp"), 6446 ); |
|
1366 CheckResourcesL(); |
|
1367 EUNIT_PRINT( _L8( "post condition check for resource copy passed" ) ); |
|
1368 |
|
1369 // Test step 3: restore configuration by removing the plugin |
|
1370 //---------------------------------------------------------------- |
|
1371 EUNIT_PRINT( _L8( "Test step 3" ) ); |
|
1372 RunTestStepSyncL( |
|
1373 ( TUint8* )addplugin_8_ts_3_method, |
|
1374 ( TUint8* )addplugin_8_ts_3_input, |
|
1375 ( TUint8* )addplugin_8_ts_3_output ); |
|
1376 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1377 } |
|
1378 |
|
1379 //------------------------------------------------------------------------------ |
|
1380 // Test case: AddPlugin(9) |
|
1381 //------------------------------------------------------------------------------ |
|
1382 void MT_CHSPSConfigurationIf::AddPlugin_9_L() |
|
1383 { |
|
1384 // Pre conditions |
|
1385 //---------------------------------------------------------------- |
|
1386 ResetClientFolderL(); // affects performance testing |
|
1387 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
1388 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
1389 |
|
1390 // Attach to HSPS |
|
1391 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1392 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1393 |
|
1394 // Test step 1: add widget with a finnish locale only |
|
1395 //---------------------------------------------------------------- |
|
1396 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1397 RunTestStepSyncL( |
|
1398 ( TUint8* )addplugin_9_ts_1_method, |
|
1399 ( TUint8* )addplugin_9_ts_1_input, |
|
1400 ( TUint8* )addplugin_9_ts_1_output ); |
|
1401 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1402 |
|
1403 // Test step 2: get added plugin configuration |
|
1404 //---------------------------------------------------------------- |
|
1405 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
1406 RunTestStepSyncL( |
|
1407 ( TUint8* )addplugin_9_ts_2_method, |
|
1408 ( TUint8* )addplugin_9_ts_2_input, |
|
1409 ( TUint8* )addplugin_9_ts_2_output ); |
|
1410 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1411 |
|
1412 // post condition check: verify that resources of the application configuration have been copied |
|
1413 //---------------------------------------------------------------- |
|
1414 EUNIT_PRINT( _L8( "post condition check for resource file copy" ) ); |
|
1415 ResetResources(); |
|
1416 // Typical - Root |
|
1417 // Typical - View1 |
|
1418 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916241\\1.0\\sources\\view1.bmp"), 9354 ); |
|
1419 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916241\\1.0\\sources\\hs_logoz.jpg"), 19519 ); |
|
1420 // Typical - View2 |
|
1421 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916242\\1.0\\sources\\view2.bmp"), 183654 ); |
|
1422 // Typical - Widget |
|
1423 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916256\\1.0\\sources\\hs_logo.jpg"), 18179 ); |
|
1424 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916256\\1.0\\sources\\widget.bmp"), 6446 ); |
|
1425 // Typical - Widget |
|
1426 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916256\\1.0\\sources\\hs_logo.jpg"), 18179 ); |
|
1427 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916256\\1.0\\sources\\widget.bmp"), 6446 ); |
|
1428 // Typical - FinnishWidget |
|
1429 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916274\\1.0\\sources\\common.jpg"), 19465 ); |
|
1430 AddResourceL( _L("c:\\private\\20000fb1\\2456\\270513751\\536916274\\1.0\\sources\\localizedbg.jpg"), 1214 ); |
|
1431 CheckResourcesL(); |
|
1432 EUNIT_PRINT( _L8( "post condition check for resource copy passed" ) ); |
|
1433 |
|
1434 // Test step 3: restore configuration by removing the plugin |
|
1435 //---------------------------------------------------------------- |
|
1436 EUNIT_PRINT( _L8( "Test step 3" ) ); |
|
1437 RunTestStepSyncL( |
|
1438 ( TUint8* )addplugin_9_ts_3_method, |
|
1439 ( TUint8* )addplugin_9_ts_3_input, |
|
1440 ( TUint8* )addplugin_9_ts_3_output ); |
|
1441 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1442 } |
|
1443 |
|
1444 //------------------------------------------------------------------------------ |
|
1445 // Test case: AddPlugin(10) |
|
1446 //------------------------------------------------------------------------------ |
|
1447 void MT_CHSPSConfigurationIf::AddPlugin_10_L() |
|
1448 { |
|
1449 // Pre conditions |
|
1450 |
|
1451 // Attach to HSPS |
|
1452 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1453 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1454 |
|
1455 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1456 RunTestStepSyncL( |
|
1457 ( TUint8* )addplugin_10_ts_1_method, |
|
1458 ( TUint8* )addplugin_10_ts_1_input, |
|
1459 ( TUint8* )addplugin_10_ts_1_output ); |
|
1460 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1461 |
|
1462 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
1463 RunTestStepSyncL( |
|
1464 ( TUint8* )addplugin_10_ts_2_method, |
|
1465 ( TUint8* )addplugin_10_ts_2_input, |
|
1466 ( TUint8* )addplugin_10_ts_2_output ); |
|
1467 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1468 |
|
1469 EUNIT_PRINT( _L8( "Test step 3" ) ); |
|
1470 RunTestStepSyncL( |
|
1471 ( TUint8* )addplugin_10_ts_3_method, |
|
1472 ( TUint8* )addplugin_10_ts_3_input, |
|
1473 ( TUint8* )addplugin_10_ts_3_output ); |
|
1474 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1475 |
|
1476 EUNIT_PRINT( _L8( "Test step 4" ) ); |
|
1477 RunTestStepSyncL( |
|
1478 ( TUint8* )addplugin_10_ts_4_method, |
|
1479 ( TUint8* )addplugin_10_ts_4_input, |
|
1480 ( TUint8* )addplugin_10_ts_4_output ); |
|
1481 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1482 |
|
1483 EUNIT_PRINT( _L8( "Test step 5" ) ); |
|
1484 RunTestStepSyncL( |
|
1485 ( TUint8* )addplugin_10_ts_5_method, |
|
1486 ( TUint8* )addplugin_10_ts_5_input, |
|
1487 ( TUint8* )addplugin_10_ts_5_output ); |
|
1488 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1489 |
|
1490 EUNIT_PRINT( _L8( "Test step 6" ) ); |
|
1491 RunTestStepSyncL( |
|
1492 ( TUint8* )addplugin_10_ts_6_method, |
|
1493 ( TUint8* )addplugin_10_ts_6_input, |
|
1494 ( TUint8* )addplugin_10_ts_6_output ); |
|
1495 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1496 |
|
1497 EUNIT_PRINT( _L8( "Test step 7" ) ); |
|
1498 RunTestStepSyncL( |
|
1499 ( TUint8* )addplugin_10_ts_7_method, |
|
1500 ( TUint8* )addplugin_10_ts_7_input, |
|
1501 ( TUint8* )addplugin_10_ts_7_output ); |
|
1502 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1503 |
|
1504 EUNIT_PRINT( _L8( "Test step 8" ) ); |
|
1505 RunTestStepSyncL( |
|
1506 ( TUint8* )addplugin_10_ts_8_method, |
|
1507 ( TUint8* )addplugin_10_ts_8_input, |
|
1508 ( TUint8* )addplugin_10_ts_8_output ); |
|
1509 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1510 } |
|
1511 |
|
1512 //------------------------------------------------------------------------------ |
|
1513 // Test case: AddPlugin(11) |
|
1514 //------------------------------------------------------------------------------ |
|
1515 void MT_CHSPSConfigurationIf::AddPlugin_11_L() |
|
1516 { |
|
1517 // Pre conditions |
|
1518 // Set active configuration to Typical configuration |
|
1519 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
1520 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
1521 |
|
1522 // Uninstall Widget Conf #1 |
|
1523 MT_CHspsInstallationService* installationService = MT_CHspsInstallationService::NewL(); |
|
1524 CleanupStack::PushL( installationService ); |
|
1525 installationService->UninstallConfigurationL( KHSPSMTInterfaceUid, KHSPSMinimalWidgetConf ); |
|
1526 CleanupStack::PopAndDestroy( installationService ); |
|
1527 |
|
1528 // Attach to HSPS |
|
1529 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1530 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1531 |
|
1532 // Test step 1 |
|
1533 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1534 RunTestStepSyncL( |
|
1535 ( TUint8* )addplugin_11_ts_1_method, |
|
1536 ( TUint8* )addplugin_11_ts_1_input, |
|
1537 ( TUint8* )addplugin_11_ts_1_output, |
|
1538 ETrue ); |
|
1539 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1540 |
|
1541 // Test step 2 |
|
1542 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
1543 RunTestStepSyncL( |
|
1544 ( TUint8* )addplugin_11_ts_2_method, |
|
1545 ( TUint8* )addplugin_11_ts_2_input, |
|
1546 ( TUint8* )addplugin_11_ts_2_output ); |
|
1547 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1548 } |
|
1549 |
|
1550 //------------------------------------------------------------------------------ |
|
1551 // Test case: RemovePlugin(1) |
|
1552 //------------------------------------------------------------------------------ |
|
1553 void MT_CHSPSConfigurationIf::RemovePlugin_1_L() |
|
1554 { |
|
1555 // Pre conditions |
|
1556 // Set active configuration to Typical configuration |
|
1557 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
1558 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
1559 // Attach to HSPS |
|
1560 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1561 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1562 |
|
1563 // Test step 1 |
|
1564 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1565 RunTestStepSyncL( |
|
1566 ( TUint8* )removeplugin_1_ts_1_method, |
|
1567 ( TUint8* )removeplugin_1_ts_1_input, |
|
1568 ( TUint8* )removeplugin_1_ts_1_output ); |
|
1569 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1570 |
|
1571 // Test step 2 |
|
1572 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
1573 RunTestStepSyncL( |
|
1574 ( TUint8* )removeplugin_1_ts_2_method, |
|
1575 ( TUint8* )removeplugin_1_ts_2_input, |
|
1576 ( TUint8* )removeplugin_1_ts_2_output ); |
|
1577 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1578 } |
|
1579 |
|
1580 //------------------------------------------------------------------------------ |
|
1581 // Test case: RemovePlugin(2) |
|
1582 //------------------------------------------------------------------------------ |
|
1583 void MT_CHSPSConfigurationIf::RemovePlugin_2_L() |
|
1584 { |
|
1585 // Pre conditions |
|
1586 |
|
1587 // Attach to HSPS |
|
1588 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1589 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1590 |
|
1591 // Test step 1 |
|
1592 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1593 RunTestStepSyncL( |
|
1594 ( TUint8* )removeplugin_2_ts_1_method, |
|
1595 ( TUint8* )removeplugin_2_ts_1_input, |
|
1596 ( TUint8* )removeplugin_2_ts_1_output ); |
|
1597 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1598 |
|
1599 // Test step 2 |
|
1600 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
1601 RunTestStepSyncL( |
|
1602 ( TUint8* )removeplugin_2_ts_2_method, |
|
1603 ( TUint8* )removeplugin_2_ts_2_input, |
|
1604 ( TUint8* )removeplugin_2_ts_2_output ); |
|
1605 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1606 |
|
1607 // Test step 3 |
|
1608 EUNIT_PRINT( _L8( "Test step 3" ) ); |
|
1609 RunTestStepSyncL( |
|
1610 ( TUint8* )removeplugin_2_ts_3_method, |
|
1611 ( TUint8* )removeplugin_2_ts_3_input, |
|
1612 ( TUint8* )removeplugin_2_ts_3_output ); |
|
1613 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1614 |
|
1615 // Test step 4 |
|
1616 EUNIT_PRINT( _L8( "Test step 4" ) ); |
|
1617 RunTestStepSyncL( |
|
1618 ( TUint8* )removeplugin_2_ts_4_method, |
|
1619 ( TUint8* )removeplugin_2_ts_4_input, |
|
1620 ( TUint8* )removeplugin_2_ts_4_output ); |
|
1621 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1622 |
|
1623 // Test step 5 |
|
1624 EUNIT_PRINT( _L8( "Test step 5" ) ); |
|
1625 RunTestStepSyncL( |
|
1626 ( TUint8* )removeplugin_2_ts_5_method, |
|
1627 ( TUint8* )removeplugin_2_ts_5_input, |
|
1628 ( TUint8* )removeplugin_2_ts_5_output ); |
|
1629 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1630 } |
|
1631 |
|
1632 //------------------------------------------------------------------------------ |
|
1633 // Test case: RemovePlugin(3) |
|
1634 //------------------------------------------------------------------------------ |
|
1635 void MT_CHSPSConfigurationIf::RemovePlugin_3_L() |
|
1636 { |
|
1637 // Pre conditions |
|
1638 // Set active configuration to Typical configuration |
|
1639 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
1640 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
1641 // Attach to HSPS |
|
1642 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1643 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1644 |
|
1645 // Test step 1 |
|
1646 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1647 RunTestStepSyncL( |
|
1648 ( TUint8* )removeplugin_3_ts_1_method, |
|
1649 ( TUint8* )removeplugin_3_ts_1_input, |
|
1650 ( TUint8* )removeplugin_3_ts_1_output ); |
|
1651 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1652 |
|
1653 // Test step 2 |
|
1654 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
1655 RunTestStepSyncL( |
|
1656 ( TUint8* )removeplugin_3_ts_2_method, |
|
1657 ( TUint8* )removeplugin_3_ts_2_input, |
|
1658 ( TUint8* )removeplugin_3_ts_2_output ); |
|
1659 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1660 } |
|
1661 |
|
1662 //------------------------------------------------------------------------------ |
|
1663 // Test case: RemovePlugin(4) |
|
1664 //------------------------------------------------------------------------------ |
|
1665 void MT_CHSPSConfigurationIf::RemovePlugin_4_L() |
|
1666 { |
|
1667 // Pre conditions |
|
1668 // Set active configuration to Typical configuration |
|
1669 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
1670 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
1671 // Attach to HSPS |
|
1672 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1673 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1674 |
|
1675 // Test step 1 |
|
1676 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1677 RunTestStepSyncL( |
|
1678 ( TUint8* )removeplugin_4_ts_1_method, |
|
1679 ( TUint8* )removeplugin_4_ts_1_input, |
|
1680 ( TUint8* )removeplugin_4_ts_1_output ); |
|
1681 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1682 |
|
1683 // Test step 2 |
|
1684 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
1685 RunTestStepSyncL( |
|
1686 ( TUint8* )removeplugin_4_ts_2_method, |
|
1687 ( TUint8* )removeplugin_4_ts_2_input, |
|
1688 ( TUint8* )removeplugin_4_ts_2_output ); |
|
1689 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1690 } |
|
1691 |
|
1692 //------------------------------------------------------------------------------ |
|
1693 // Test case: SetPluginSettings(1) |
|
1694 //------------------------------------------------------------------------------ |
|
1695 void MT_CHSPSConfigurationIf::SetPluginSettings_1_L() |
|
1696 { |
|
1697 // Pre conditions |
|
1698 // Set active configuration to Typical configuration |
|
1699 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
1700 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
1701 // Attach to HSPS |
|
1702 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1703 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1704 |
|
1705 // Test step 1 |
|
1706 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1707 RunTestStepSyncL( |
|
1708 ( TUint8* )setpluginsettings_1_ts_1_method, |
|
1709 ( TUint8* )setpluginsettings_1_ts_1_input, |
|
1710 ( TUint8* )setpluginsettings_1_ts_1_output, |
|
1711 ETrue ); |
|
1712 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1713 |
|
1714 // Test step 2 |
|
1715 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
1716 RunTestStepSyncL( |
|
1717 ( TUint8* )setpluginsettings_1_ts_2_method, |
|
1718 ( TUint8* )setpluginsettings_1_ts_2_input, |
|
1719 ( TUint8* )setpluginsettings_1_ts_2_output ); |
|
1720 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1721 |
|
1722 // Test step 3 |
|
1723 EUNIT_PRINT( _L8( "Test step 3" ) ); |
|
1724 RunTestStepSyncL( |
|
1725 ( TUint8* )setpluginsettings_1_ts_3_method, |
|
1726 ( TUint8* )setpluginsettings_1_ts_3_input, |
|
1727 ( TUint8* )setpluginsettings_1_ts_3_output ); |
|
1728 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1729 } |
|
1730 |
|
1731 //------------------------------------------------------------------------------ |
|
1732 // Test case: SetPluginSettings(2) |
|
1733 //------------------------------------------------------------------------------ |
|
1734 void MT_CHSPSConfigurationIf::SetPluginSettings_2_L() |
|
1735 { |
|
1736 // Pre conditions |
|
1737 // Set active configuration to Typical configuration |
|
1738 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
1739 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
1740 // Attach to HSPS |
|
1741 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1742 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1743 |
|
1744 // Test step 1 |
|
1745 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1746 RunTestStepSyncL( |
|
1747 ( TUint8* )setpluginsettings_2_ts_1_method, |
|
1748 ( TUint8* )setpluginsettings_2_ts_1_input, |
|
1749 ( TUint8* )setpluginsettings_2_ts_1_output ); |
|
1750 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1751 |
|
1752 // Test step 2 |
|
1753 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
1754 RunTestStepSyncL( |
|
1755 ( TUint8* )setpluginsettings_2_ts_2_method, |
|
1756 ( TUint8* )setpluginsettings_2_ts_2_input, |
|
1757 ( TUint8* )setpluginsettings_2_ts_2_output ); |
|
1758 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1759 |
|
1760 // Test step 2 |
|
1761 EUNIT_PRINT( _L8( "Test step 3" ) ); |
|
1762 RunTestStepSyncL( |
|
1763 ( TUint8* )setpluginsettings_2_ts_3_method, |
|
1764 ( TUint8* )setpluginsettings_2_ts_3_input, |
|
1765 ( TUint8* )setpluginsettings_2_ts_3_output ); |
|
1766 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1767 } |
|
1768 |
|
1769 //------------------------------------------------------------------------------ |
|
1770 // Test case: SetPluginSettings(3) |
|
1771 //------------------------------------------------------------------------------ |
|
1772 void MT_CHSPSConfigurationIf::SetPluginSettings_3_L() |
|
1773 { |
|
1774 // Pre conditions |
|
1775 // Set active configuration to Typical configuration |
|
1776 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
1777 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
1778 // Attach to HSPS |
|
1779 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1780 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1781 |
|
1782 // Test step 1 |
|
1783 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1784 RunTestStepSyncL( |
|
1785 ( TUint8* )setpluginsettings_3_ts_1_method, |
|
1786 ( TUint8* )setpluginsettings_3_ts_1_input, |
|
1787 ( TUint8* )setpluginsettings_3_ts_1_output ); |
|
1788 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1789 } |
|
1790 |
|
1791 //------------------------------------------------------------------------------ |
|
1792 // Test case: SetPluginSettings(4) |
|
1793 //------------------------------------------------------------------------------ |
|
1794 void MT_CHSPSConfigurationIf::SetPluginSettings_4_L() |
|
1795 { |
|
1796 // Pre conditions |
|
1797 // Set active configuration to Typical configuration |
|
1798 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
1799 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
1800 // Attach to HSPS |
|
1801 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1802 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1803 |
|
1804 // Test step 1 |
|
1805 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1806 RunTestStepSyncL( |
|
1807 ( TUint8* )setpluginsettings_4_ts_1_method, |
|
1808 ( TUint8* )setpluginsettings_4_ts_1_input, |
|
1809 ( TUint8* )setpluginsettings_4_ts_1_output ); |
|
1810 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1811 } |
|
1812 |
|
1813 //------------------------------------------------------------------------------ |
|
1814 // Test case: SetPluginSettings(5) |
|
1815 //------------------------------------------------------------------------------ |
|
1816 void MT_CHSPSConfigurationIf::SetPluginSettings_5_L() |
|
1817 { |
|
1818 // Pre conditions |
|
1819 // Set active configuration to Typical configuration |
|
1820 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
1821 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
1822 // Attach to HSPS |
|
1823 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1824 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1825 |
|
1826 // Test step 1 |
|
1827 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1828 RunTestStepSyncL( |
|
1829 ( TUint8* )setpluginsettings_5_ts_1_method, |
|
1830 ( TUint8* )setpluginsettings_5_ts_1_input, |
|
1831 ( TUint8* )setpluginsettings_5_ts_1_output ); |
|
1832 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1833 } |
|
1834 |
|
1835 //------------------------------------------------------------------------------ |
|
1836 // Test case: SetPluginSettings(6) |
|
1837 //------------------------------------------------------------------------------ |
|
1838 void MT_CHSPSConfigurationIf::SetPluginSettings_6_L() |
|
1839 { |
|
1840 // Pre conditions |
|
1841 // Set active configuration to Typical configuration |
|
1842 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
1843 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
1844 // Attach to HSPS |
|
1845 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1846 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1847 |
|
1848 // Test step 1 |
|
1849 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1850 RunTestStepSyncL( |
|
1851 ( TUint8* )setpluginsettings_6_ts_1_method, |
|
1852 ( TUint8* )setpluginsettings_6_ts_1_input, |
|
1853 ( TUint8* )setpluginsettings_6_ts_1_output ); |
|
1854 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1855 } |
|
1856 |
|
1857 //------------------------------------------------------------------------------ |
|
1858 // Test case: GetPluginSettings(1) |
|
1859 //------------------------------------------------------------------------------ |
|
1860 void MT_CHSPSConfigurationIf::GetPluginSettings_1_L() |
|
1861 { |
|
1862 // Pre conditions |
|
1863 // Set active configuration to Typical configuration |
|
1864 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
1865 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
1866 // Attach to HSPS |
|
1867 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1868 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1869 |
|
1870 // Test step 1 |
|
1871 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1872 RunTestStepSyncL( |
|
1873 ( TUint8* )getpluginsettings_1_ts_1_method, |
|
1874 ( TUint8* )getpluginsettings_1_ts_1_input, |
|
1875 ( TUint8* )getpluginsettings_1_ts_1_output, |
|
1876 ETrue ); |
|
1877 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1878 } |
|
1879 |
|
1880 //------------------------------------------------------------------------------ |
|
1881 // Test case: GetPluginSettings(2) |
|
1882 //------------------------------------------------------------------------------ |
|
1883 void MT_CHSPSConfigurationIf::GetPluginSettings_2_L() |
|
1884 { |
|
1885 // Pre conditions |
|
1886 // Set active configuration to Typical configuration |
|
1887 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
1888 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
1889 // Attach to HSPS |
|
1890 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1891 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1892 |
|
1893 // Test step 1 |
|
1894 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1895 RunTestStepSyncL( |
|
1896 ( TUint8* )getpluginsettings_2_ts_1_method, |
|
1897 ( TUint8* )getpluginsettings_2_ts_1_input, |
|
1898 ( TUint8* )getpluginsettings_2_ts_1_output ); |
|
1899 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1900 } |
|
1901 |
|
1902 //------------------------------------------------------------------------------ |
|
1903 // Test case: GetPluginSettings(3) |
|
1904 //------------------------------------------------------------------------------ |
|
1905 void MT_CHSPSConfigurationIf::GetPluginSettings_3_L() |
|
1906 { |
|
1907 // Pre conditions |
|
1908 // Set active configuration to Typical configuration |
|
1909 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
1910 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
1911 // Attach to HSPS |
|
1912 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1913 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1914 |
|
1915 // Test step 1 |
|
1916 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1917 RunTestStepSyncL( |
|
1918 ( TUint8* )getpluginsettings_3_ts_1_method, |
|
1919 ( TUint8* )getpluginsettings_3_ts_1_input, |
|
1920 ( TUint8* )getpluginsettings_3_ts_1_output ); |
|
1921 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1922 } |
|
1923 |
|
1924 //------------------------------------------------------------------------------ |
|
1925 // Test case: MovePlugins(1) |
|
1926 //------------------------------------------------------------------------------ |
|
1927 void MT_CHSPSConfigurationIf::MovePlugins_1_L() |
|
1928 { |
|
1929 // Pre conditions |
|
1930 // Set active configuration to Typical configuration |
|
1931 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
1932 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
1933 |
|
1934 // Attach to HSPS |
|
1935 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1936 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1937 |
|
1938 // Test step 1 |
|
1939 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1940 RunTestStepSyncL( |
|
1941 ( TUint8* )moveplugins_1_ts_1_method, |
|
1942 ( TUint8* )moveplugins_1_ts_1_input, |
|
1943 ( TUint8* )moveplugins_1_ts_1_output, |
|
1944 ETrue ); |
|
1945 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1946 |
|
1947 // Test step 2 |
|
1948 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
1949 RunTestStepSyncL( |
|
1950 ( TUint8* )moveplugins_1_ts_2_method, |
|
1951 ( TUint8* )moveplugins_1_ts_2_input, |
|
1952 ( TUint8* )moveplugins_1_ts_2_output ); |
|
1953 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1954 |
|
1955 // Test step 3 |
|
1956 EUNIT_PRINT( _L8( "Test step 3" ) ); |
|
1957 RunTestStepSyncL( |
|
1958 ( TUint8* )moveplugins_1_ts_3_method, |
|
1959 ( TUint8* )moveplugins_1_ts_3_input, |
|
1960 ( TUint8* )moveplugins_1_ts_3_output ); |
|
1961 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1962 |
|
1963 // Test step 4 |
|
1964 EUNIT_PRINT( _L8( "Test step 4" ) ); |
|
1965 RunTestStepSyncL( |
|
1966 ( TUint8* )moveplugins_1_ts_4_method, |
|
1967 ( TUint8* )moveplugins_1_ts_4_input, |
|
1968 ( TUint8* )moveplugins_1_ts_4_output ); |
|
1969 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1970 } |
|
1971 |
|
1972 //------------------------------------------------------------------------------ |
|
1973 // Test case: MovePlugins(2) |
|
1974 //------------------------------------------------------------------------------ |
|
1975 void MT_CHSPSConfigurationIf::MovePlugins_2_L() |
|
1976 { |
|
1977 // Pre conditions |
|
1978 // Set active configuration to Typical configuration |
|
1979 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
1980 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
1981 |
|
1982 // Attach to HSPS |
|
1983 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
1984 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
1985 |
|
1986 // Test step 1 |
|
1987 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
1988 RunTestStepSyncL( |
|
1989 ( TUint8* )moveplugins_2_ts_1_method, |
|
1990 ( TUint8* )moveplugins_2_ts_1_input, |
|
1991 ( TUint8* )moveplugins_2_ts_1_output ); |
|
1992 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
1993 } |
|
1994 |
|
1995 //------------------------------------------------------------------------------ |
|
1996 // Test case: MovePlugins(3) |
|
1997 //------------------------------------------------------------------------------ |
|
1998 void MT_CHSPSConfigurationIf::MovePlugins_3_L() |
|
1999 { |
|
2000 // Pre conditions |
|
2001 // Set active configuration to Typical configuration |
|
2002 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
2003 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
2004 |
|
2005 // Attach to HSPS |
|
2006 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
2007 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
2008 |
|
2009 // Test step 1 |
|
2010 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2011 RunTestStepSyncL( |
|
2012 ( TUint8* )moveplugins_3_ts_1_method, |
|
2013 ( TUint8* )moveplugins_3_ts_1_input, |
|
2014 ( TUint8* )moveplugins_3_ts_1_output ); |
|
2015 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2016 } |
|
2017 |
|
2018 //------------------------------------------------------------------------------ |
|
2019 // Test case: MovePlugins(4) |
|
2020 //------------------------------------------------------------------------------ |
|
2021 void MT_CHSPSConfigurationIf::MovePlugins_4_L() |
|
2022 { |
|
2023 // Pre conditions |
|
2024 // Set active configuration to Typical configuration |
|
2025 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
2026 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
2027 |
|
2028 // Attach to HSPS |
|
2029 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
2030 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
2031 |
|
2032 // Test step 1 |
|
2033 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2034 RunTestStepSyncL( |
|
2035 ( TUint8* )moveplugins_4_ts_1_method, |
|
2036 ( TUint8* )moveplugins_4_ts_1_input, |
|
2037 ( TUint8* )moveplugins_4_ts_1_output ); |
|
2038 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2039 } |
|
2040 |
|
2041 //------------------------------------------------------------------------------ |
|
2042 // Test case: MovePlugins(5) |
|
2043 //------------------------------------------------------------------------------ |
|
2044 void MT_CHSPSConfigurationIf::MovePlugins_5_L() |
|
2045 { |
|
2046 // Pre conditions |
|
2047 // Set active configuration to Typical configuration |
|
2048 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
2049 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
2050 |
|
2051 // Attach to HSPS |
|
2052 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
2053 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
2054 |
|
2055 // Test step 1 |
|
2056 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2057 RunTestStepSyncL( |
|
2058 ( TUint8* )moveplugins_5_ts_1_method, |
|
2059 ( TUint8* )moveplugins_5_ts_1_input, |
|
2060 ( TUint8* )moveplugins_5_ts_1_output ); |
|
2061 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2062 } |
|
2063 |
|
2064 //------------------------------------------------------------------------------ |
|
2065 // Test case: MovePlugins(6) |
|
2066 //------------------------------------------------------------------------------ |
|
2067 void MT_CHSPSConfigurationIf::MovePlugins_6_L() |
|
2068 { |
|
2069 // Pre conditions |
|
2070 |
|
2071 // Attach to HSPS |
|
2072 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
2073 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
2074 |
|
2075 // Test step 1 |
|
2076 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2077 RunTestStepSyncL( |
|
2078 ( TUint8* )moveplugins_6_ts_1_method, |
|
2079 ( TUint8* )moveplugins_6_ts_1_input, |
|
2080 ( TUint8* )moveplugins_6_ts_1_output ); |
|
2081 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2082 |
|
2083 // Test step 2 |
|
2084 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
2085 RunTestStepSyncL( |
|
2086 ( TUint8* )moveplugins_6_ts_2_method, |
|
2087 ( TUint8* )moveplugins_6_ts_2_input, |
|
2088 ( TUint8* )moveplugins_6_ts_2_output ); |
|
2089 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2090 |
|
2091 // Test step 3 |
|
2092 EUNIT_PRINT( _L8( "Test step 3" ) ); |
|
2093 RunTestStepSyncL( |
|
2094 ( TUint8* )moveplugins_6_ts_3_method, |
|
2095 ( TUint8* )moveplugins_6_ts_3_input, |
|
2096 ( TUint8* )moveplugins_6_ts_3_output ); |
|
2097 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2098 |
|
2099 // Test step 4 |
|
2100 EUNIT_PRINT( _L8( "Test step 4" ) ); |
|
2101 RunTestStepSyncL( |
|
2102 ( TUint8* )moveplugins_6_ts_4_method, |
|
2103 ( TUint8* )moveplugins_6_ts_4_input, |
|
2104 ( TUint8* )moveplugins_6_ts_4_output ); |
|
2105 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2106 |
|
2107 // Test step 5 |
|
2108 EUNIT_PRINT( _L8( "Test step 5" ) ); |
|
2109 RunTestStepSyncL( |
|
2110 ( TUint8* )moveplugins_6_ts_5_method, |
|
2111 ( TUint8* )moveplugins_6_ts_5_input, |
|
2112 ( TUint8* )moveplugins_6_ts_5_output ); |
|
2113 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2114 } |
|
2115 |
|
2116 //------------------------------------------------------------------------------ |
|
2117 // Test case: ReplacePlugin_1_L(1) |
|
2118 //------------------------------------------------------------------------------ |
|
2119 void MT_CHSPSConfigurationIf::ReplacePlugin_1_L() |
|
2120 { |
|
2121 // Pre conditions |
|
2122 |
|
2123 // Set active configuration to Typical configuration |
|
2124 EUNIT_PRINT( _L8( "Pre conditions: active configuration is Typical" ) ); |
|
2125 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
2126 |
|
2127 // Attach to HSPS |
|
2128 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
2129 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
2130 |
|
2131 // Test step 1 |
|
2132 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2133 RunTestStepSyncL( |
|
2134 ( TUint8* )replaceplugin_1_ts_1_method, |
|
2135 ( TUint8* )replaceplugin_1_ts_1_input, |
|
2136 ( TUint8* )replaceplugin_1_ts_1_output ); |
|
2137 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2138 |
|
2139 // Test step 2 |
|
2140 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
2141 RunTestStepSyncL( |
|
2142 ( TUint8* )replaceplugin_1_ts_2_method, |
|
2143 ( TUint8* )replaceplugin_1_ts_2_input, |
|
2144 ( TUint8* )replaceplugin_1_ts_2_output ); |
|
2145 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2146 |
|
2147 // Test step 3 |
|
2148 EUNIT_PRINT( _L8( "Test step 3" ) ); |
|
2149 RunTestStepSyncL( |
|
2150 ( TUint8* )replaceplugin_1_ts_3_method, |
|
2151 ( TUint8* )replaceplugin_1_ts_3_input, |
|
2152 ( TUint8* )replaceplugin_1_ts_3_output ); |
|
2153 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2154 |
|
2155 // Test step 4 |
|
2156 EUNIT_PRINT( _L8( "Test step 4" ) ); |
|
2157 RunTestStepSyncL( |
|
2158 ( TUint8* )replaceplugin_1_ts_4_method, |
|
2159 ( TUint8* )replaceplugin_1_ts_4_input, |
|
2160 ( TUint8* )replaceplugin_1_ts_4_output ); |
|
2161 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2162 |
|
2163 // Test step 5 |
|
2164 EUNIT_PRINT( _L8( "Test step 5" ) ); |
|
2165 RunTestStepSyncL( |
|
2166 ( TUint8* )replaceplugin_1_ts_5_method, |
|
2167 ( TUint8* )replaceplugin_1_ts_5_input, |
|
2168 ( TUint8* )replaceplugin_1_ts_5_output ); |
|
2169 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2170 |
|
2171 // Test step 6 |
|
2172 EUNIT_PRINT( _L8( "Test step 6" ) ); |
|
2173 RunTestStepSyncL( |
|
2174 ( TUint8* )replaceplugin_1_ts_6_method, |
|
2175 ( TUint8* )replaceplugin_1_ts_6_input, |
|
2176 ( TUint8* )replaceplugin_1_ts_6_output ); |
|
2177 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2178 |
|
2179 // Test step 7 |
|
2180 EUNIT_PRINT( _L8( "Test step 7" ) ); |
|
2181 RunTestStepSyncL( |
|
2182 ( TUint8* )replaceplugin_1_ts_7_method, |
|
2183 ( TUint8* )replaceplugin_1_ts_7_input, |
|
2184 ( TUint8* )replaceplugin_1_ts_7_output ); |
|
2185 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2186 |
|
2187 // Test step 8 |
|
2188 EUNIT_PRINT( _L8( "Test step 8" ) ); |
|
2189 RunTestStepSyncL( |
|
2190 ( TUint8* )replaceplugin_1_ts_8_method, |
|
2191 ( TUint8* )replaceplugin_1_ts_8_input, |
|
2192 ( TUint8* )replaceplugin_1_ts_8_output ); |
|
2193 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2194 |
|
2195 // Test step 9 |
|
2196 EUNIT_PRINT( _L8( "Test step 9" ) ); |
|
2197 RunTestStepSyncL( |
|
2198 ( TUint8* )replaceplugin_1_ts_9_method, |
|
2199 ( TUint8* )replaceplugin_1_ts_9_input, |
|
2200 ( TUint8* )replaceplugin_1_ts_9_output ); |
|
2201 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2202 |
|
2203 // Make sure resources of the typical-widget are removed |
|
2204 // from client's private folder, should be restored in next step |
|
2205 if ( BaflUtils::FileExists( iFileserver, _L( "c:\\private\\20000fb1\\2456\\270513751\\536916256\\1.0\\sources\\hs_logo.jpg" ) ) |
|
2206 || BaflUtils::FileExists( iFileserver, _L( "c:\\private\\20000fb1\\2456\\270513751\\536916256\\1.0\\sources\\widget.bmp" ) ) ) |
|
2207 { |
|
2208 CFileMan* fileManager = CFileMan::NewL( iFileserver ); |
|
2209 CleanupStack::PushL( fileManager ); |
|
2210 User::LeaveIfError( fileManager->Delete( _L( "c:\\private\\20000fb1\\2456\\270513751\\536916256\\1.0\\sources\\hs_logo.jpg" ) ) ); |
|
2211 User::LeaveIfError( fileManager->Delete( _L( "c:\\private\\20000fb1\\2456\\270513751\\536916256\\1.0\\sources\\widget.bmp" ) ) ); |
|
2212 CleanupStack::PopAndDestroy( fileManager ); |
|
2213 if ( BaflUtils::FileExists( iFileserver, _L( "c:\\private\\20000fb1\\2456\\270513751\\536916256\\1.0\\sources\\hs_logo.jpg" )) |
|
2214 || BaflUtils::FileExists( iFileserver, _L( "c:\\private\\20000fb1\\2456\\270513751\\536916256\\1.0\\sources\\widget.bmp" ) ) ) |
|
2215 { |
|
2216 User::Leave( KErrGeneral ); |
|
2217 } |
|
2218 } |
|
2219 |
|
2220 // Test step 10 |
|
2221 EUNIT_PRINT( _L8( "Test step 10" ) ); |
|
2222 RunTestStepSyncL( |
|
2223 ( TUint8* )replaceplugin_1_ts_10_method, |
|
2224 ( TUint8* )replaceplugin_1_ts_10_input, |
|
2225 ( TUint8* )replaceplugin_1_ts_10_output ); |
|
2226 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2227 |
|
2228 // Test step 11 |
|
2229 EUNIT_PRINT( _L8( "Test step 11" ) ); |
|
2230 RunTestStepSyncL( |
|
2231 ( TUint8* )replaceplugin_1_ts_11_method, |
|
2232 ( TUint8* )replaceplugin_1_ts_11_input, |
|
2233 ( TUint8* )replaceplugin_1_ts_11_output ); |
|
2234 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2235 |
|
2236 EUNIT_PRINT( _L8( "post condition check for resource file copy" ) ); |
|
2237 ResetResources(); |
|
2238 AddResourceL( _L( "c:\\private\\20000fb1\\2456\\270513751\\536916256\\1.0\\sources\\hs_logo.jpg" ), 18179 ); |
|
2239 AddResourceL( _L( "c:\\private\\20000fb1\\2456\\270513751\\536916256\\1.0\\sources\\widget.bmp" ), 6446 ); |
|
2240 CheckResourcesL(); |
|
2241 EUNIT_PRINT( _L8( "post condition check for resource file copy passed" ) ); |
|
2242 } |
|
2243 |
|
2244 //------------------------------------------------------------------------------ |
|
2245 // Test case: GetAppConfs(1) |
|
2246 //------------------------------------------------------------------------------ |
|
2247 void MT_CHSPSConfigurationIf::GetAppConfs_1_L() |
|
2248 { |
|
2249 // Pre conditions |
|
2250 // Set active configuration to Typical configuration |
|
2251 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
2252 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
2253 |
|
2254 // Attach to HSPS |
|
2255 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
2256 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
2257 |
|
2258 // Test step 1 |
|
2259 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2260 RunTestStepSyncL( |
|
2261 ( TUint8* )getappconfs_1_ts_1_method, |
|
2262 ( TUint8* )getappconfs_1_ts_1_input, |
|
2263 ( TUint8* )getappconfs_1_ts_1_output, |
|
2264 ETrue ); |
|
2265 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2266 } |
|
2267 |
|
2268 //------------------------------------------------------------------------------ |
|
2269 // Test case: SetActiveAppConf(1) |
|
2270 //------------------------------------------------------------------------------ |
|
2271 void MT_CHSPSConfigurationIf::SetActiveAppConf_1_L() |
|
2272 { |
|
2273 // Pre conditions |
|
2274 // Set active configuration to Typical configuration |
|
2275 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
2276 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
2277 |
|
2278 // Attach to HSPS |
|
2279 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
2280 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
2281 |
|
2282 // Test step 1 |
|
2283 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2284 RunTestStepSyncL( |
|
2285 ( TUint8* )setactiveappconf_1_ts_1_method, |
|
2286 ( TUint8* )setactiveappconf_1_ts_1_input, |
|
2287 ( TUint8* )setactiveappconf_1_ts_1_output, |
|
2288 ETrue ); |
|
2289 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2290 |
|
2291 // Test step 2 |
|
2292 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
2293 RunTestStepSyncL( |
|
2294 ( TUint8* )setactiveappconf_1_ts_2_method, |
|
2295 ( TUint8* )setactiveappconf_1_ts_2_input, |
|
2296 ( TUint8* )setactiveappconf_1_ts_2_output ); |
|
2297 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2298 } |
|
2299 |
|
2300 //------------------------------------------------------------------------------ |
|
2301 // Test case: SetActiveAppConf(2) |
|
2302 //------------------------------------------------------------------------------ |
|
2303 void MT_CHSPSConfigurationIf::SetActiveAppConf_2_L() |
|
2304 { |
|
2305 // Pre conditions |
|
2306 // Set active configuration to Typical configuration |
|
2307 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
2308 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
2309 |
|
2310 // Attach to HSPS |
|
2311 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
2312 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
2313 |
|
2314 // Test step 1 |
|
2315 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2316 RunTestStepSyncL( |
|
2317 ( TUint8* )setactiveappconf_2_ts_1_method, |
|
2318 ( TUint8* )setactiveappconf_2_ts_1_input, |
|
2319 ( TUint8* )setactiveappconf_2_ts_1_output ); |
|
2320 |
|
2321 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2322 |
|
2323 // Test step 2 |
|
2324 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
2325 |
|
2326 RunTestStepSyncL( |
|
2327 ( TUint8* )setactiveappconf_2_ts_2_method, |
|
2328 ( TUint8* )setactiveappconf_2_ts_2_input, |
|
2329 ( TUint8* )setactiveappconf_2_ts_2_output ); |
|
2330 |
|
2331 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2332 } |
|
2333 |
|
2334 //------------------------------------------------------------------------------ |
|
2335 // Test case: SetActiveAppConf(3) |
|
2336 //------------------------------------------------------------------------------ |
|
2337 void MT_CHSPSConfigurationIf::SetActiveAppConf_3_L() |
|
2338 { |
|
2339 // Pre conditions |
|
2340 // Set active configuration to Typical configuration |
|
2341 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
2342 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
2343 |
|
2344 // Attach to HSPS |
|
2345 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
2346 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
2347 |
|
2348 // Test step 1 |
|
2349 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2350 RunTestStepSyncL( |
|
2351 ( TUint8* )setactiveappconf_3_ts_1_method, |
|
2352 ( TUint8* )setactiveappconf_3_ts_1_input, |
|
2353 ( TUint8* )setactiveappconf_3_ts_1_output ); |
|
2354 |
|
2355 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2356 |
|
2357 // Test step 2 |
|
2358 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
2359 |
|
2360 RunTestStepSyncL( |
|
2361 ( TUint8* )setactiveappconf_3_ts_2_method, |
|
2362 ( TUint8* )setactiveappconf_3_ts_2_input, |
|
2363 ( TUint8* )setactiveappconf_3_ts_2_output ); |
|
2364 |
|
2365 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2366 } |
|
2367 |
|
2368 //------------------------------------------------------------------------------ |
|
2369 // Test case: SetActiveAppConf(4) |
|
2370 //------------------------------------------------------------------------------ |
|
2371 void MT_CHSPSConfigurationIf::SetActiveAppConf_4_L() |
|
2372 { |
|
2373 // Pre conditions |
|
2374 // Set active configuration to Typical configuration |
|
2375 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
2376 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
2377 |
|
2378 // Attach to HSPS |
|
2379 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
2380 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
2381 |
|
2382 // Test step 1 |
|
2383 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2384 RunTestStepSyncL( |
|
2385 ( TUint8* )setactiveappconf_4_ts_1_method, |
|
2386 ( TUint8* )setactiveappconf_4_ts_1_input, |
|
2387 ( TUint8* )setactiveappconf_4_ts_1_output ); |
|
2388 |
|
2389 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2390 |
|
2391 // Test step 2 |
|
2392 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
2393 |
|
2394 RunTestStepSyncL( |
|
2395 ( TUint8* )setactiveappconf_4_ts_2_method, |
|
2396 ( TUint8* )setactiveappconf_4_ts_2_input, |
|
2397 ( TUint8* )setactiveappconf_4_ts_2_output ); |
|
2398 |
|
2399 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2400 } |
|
2401 |
|
2402 //------------------------------------------------------------------------------ |
|
2403 // Test case: RequestNotify(1) |
|
2404 //------------------------------------------------------------------------------ |
|
2405 void MT_CHSPSConfigurationIf::RequestNotify_1_L() |
|
2406 { |
|
2407 // Pre conditions |
|
2408 // Set active configuration to Typical configuration |
|
2409 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
2410 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
2411 |
|
2412 // Test step 1 |
|
2413 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2414 RunTestStepAsyncL( |
|
2415 ( TUint8* )requestnotify_1_ts_1_method, |
|
2416 ( TUint8* )requestnotify_1_ts_1_input, |
|
2417 ( TUint8* )requestnotify_1_ts_1_output, |
|
2418 ( TInt ) requestnotify_1_ts_1_trigger ); |
|
2419 |
|
2420 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2421 } |
|
2422 |
|
2423 //------------------------------------------------------------------------------ |
|
2424 // Test case: RequestNotify(2) |
|
2425 //------------------------------------------------------------------------------ |
|
2426 void MT_CHSPSConfigurationIf::RequestNotify_2_L() |
|
2427 { |
|
2428 // Pre conditions |
|
2429 // Set active configuration to Typical configuration |
|
2430 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
2431 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
2432 |
|
2433 // Test step 1 |
|
2434 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2435 RunTestStepAsyncL( |
|
2436 ( TUint8* )requestnotify_2_ts_1_method, |
|
2437 ( TUint8* )requestnotify_2_ts_1_input, |
|
2438 ( TUint8* )requestnotify_2_ts_1_output, |
|
2439 ( TInt ) requestnotify_2_ts_1_trigger ); |
|
2440 |
|
2441 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2442 } |
|
2443 |
|
2444 //------------------------------------------------------------------------------ |
|
2445 // Test case: RequestNotify(3) |
|
2446 //------------------------------------------------------------------------------ |
|
2447 void MT_CHSPSConfigurationIf::RequestNotify_3_L() |
|
2448 { |
|
2449 // Pre conditions |
|
2450 // Set active configuration to Typical configuration |
|
2451 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
2452 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
2453 |
|
2454 // Test step 1 |
|
2455 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2456 RunTestStepAsyncL( |
|
2457 ( TUint8* )requestnotify_3_ts_1_method, |
|
2458 ( TUint8* )requestnotify_3_ts_1_input, |
|
2459 ( TUint8* )requestnotify_3_ts_1_output, |
|
2460 ( TInt ) requestnotify_3_ts_1_trigger ); |
|
2461 |
|
2462 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2463 } |
|
2464 |
|
2465 //------------------------------------------------------------------------------ |
|
2466 // Test case: RequestNotify(4) |
|
2467 //------------------------------------------------------------------------------ |
|
2468 void MT_CHSPSConfigurationIf::RequestNotify_4_L() |
|
2469 { |
|
2470 // Pre conditions |
|
2471 // Set active configuration to Typical configuration |
|
2472 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
2473 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
2474 |
|
2475 // Test step 1 |
|
2476 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2477 RunTestStepAsyncL( |
|
2478 ( TUint8* )requestnotify_4_ts_1_method, |
|
2479 ( TUint8* )requestnotify_4_ts_1_input, |
|
2480 ( TUint8* )requestnotify_4_ts_1_output, |
|
2481 ( TInt ) requestnotify_4_ts_1_trigger ); |
|
2482 |
|
2483 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2484 |
|
2485 // Test step 2 |
|
2486 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
2487 RunTestStepAsyncL( |
|
2488 ( TUint8* )requestnotify_4_ts_2_method, |
|
2489 ( TUint8* )requestnotify_4_ts_2_input, |
|
2490 ( TUint8* )requestnotify_4_ts_2_output, |
|
2491 ( TInt ) requestnotify_4_ts_2_trigger ); |
|
2492 |
|
2493 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2494 } |
|
2495 |
|
2496 //------------------------------------------------------------------------------ |
|
2497 // Test case: RequestNotify(5) |
|
2498 //------------------------------------------------------------------------------ |
|
2499 void MT_CHSPSConfigurationIf::RequestNotify_5_L() |
|
2500 { |
|
2501 // Pre conditions |
|
2502 // Set active configuration to Typical configuration |
|
2503 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
2504 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
2505 |
|
2506 // Test step 1 |
|
2507 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2508 RunTestStepAsyncL( |
|
2509 ( TUint8* )requestnotify_5_ts_1_method, |
|
2510 ( TUint8* )requestnotify_5_ts_1_input, |
|
2511 ( TUint8* )requestnotify_5_ts_1_output, |
|
2512 ( TInt ) requestnotify_5_ts_1_trigger ); |
|
2513 |
|
2514 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2515 } |
|
2516 |
|
2517 //------------------------------------------------------------------------------ |
|
2518 // Test case: RequestNotify(6) |
|
2519 //------------------------------------------------------------------------------ |
|
2520 void MT_CHSPSConfigurationIf::RequestNotify_6_L() |
|
2521 { |
|
2522 // Pre conditions |
|
2523 // Set active configuration to Minimal configuration |
|
2524 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) ); |
|
2525 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
2526 |
|
2527 // Test step 1: install a SISX package and check output from received notifiction |
|
2528 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2529 RunTestStepAsyncL( |
|
2530 ( TUint8* )requestnotify_6_ts_1_method, |
|
2531 ( TUint8* )requestnotify_6_ts_1_input, |
|
2532 ( TUint8* )requestnotify_6_ts_1_output, |
|
2533 ( TInt ) requestnotify_6_ts_1_trigger ); |
|
2534 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2535 |
|
2536 // Test step 2: update the SISX package and check output from received notifiction |
|
2537 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
2538 RunTestStepAsyncL( |
|
2539 ( TUint8* )requestnotify_6_ts_2_method, |
|
2540 ( TUint8* )requestnotify_6_ts_2_input, |
|
2541 ( TUint8* )requestnotify_6_ts_2_output, |
|
2542 ( TInt ) requestnotify_6_ts_2_trigger ); |
|
2543 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2544 |
|
2545 // Attach to HSPS, get active app configuration which generates full application configuration with IDs |
|
2546 EUNIT_PRINT( _L8( "Attach to HSPS service IConfiguration interface" ) ); |
|
2547 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
2548 |
|
2549 // Test step 3: add the installed v2 plugin to 1st view in the Minimal root configuration |
|
2550 EUNIT_PRINT( _L8( "Test step 3" ) ); |
|
2551 RunTestStepSyncL( |
|
2552 ( TUint8* )requestnotify_6_ts_3_method, |
|
2553 ( TUint8* )requestnotify_6_ts_3_input, |
|
2554 ( TUint8* )requestnotify_6_ts_3_output ); |
|
2555 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2556 |
|
2557 // Detach so that the next Typical app configuration gets read |
|
2558 TRAP_IGNORE( DetachServiceL() ); |
|
2559 |
|
2560 // Set active configuration to Typical configuration |
|
2561 EUNIT_PRINT( _L8( "Set Active configuration Typical" ) ); |
|
2562 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
2563 |
|
2564 // Attach to HSPS, get active app configuration which generates full application configuration with IDs |
|
2565 EUNIT_PRINT( _L8( "Attach to HSPS service IConfiguration interface" ) ); |
|
2566 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
2567 |
|
2568 // Test step 4: add the installed v2 plugin to 1st view in the Typical root configuration |
|
2569 EUNIT_PRINT( _L8( "Test step 4" ) ); |
|
2570 RunTestStepSyncL( |
|
2571 ( TUint8* )requestnotify_6_ts_4_method, |
|
2572 ( TUint8* )requestnotify_6_ts_4_input, |
|
2573 ( TUint8* )requestnotify_6_ts_4_output ); |
|
2574 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2575 |
|
2576 TRAP_IGNORE( DetachServiceL() ); |
|
2577 |
|
2578 // Test step 5: uninstall the SISX package and check output from received notification |
|
2579 EUNIT_PRINT( _L8( "Test step 5" ) ); |
|
2580 RunTestStepAsyncL( |
|
2581 ( TUint8* )requestnotify_6_ts_5_method, |
|
2582 ( TUint8* )requestnotify_6_ts_5_input, |
|
2583 ( TUint8* )requestnotify_6_ts_5_output, |
|
2584 ( TInt ) requestnotify_6_ts_5_trigger ); |
|
2585 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2586 |
|
2587 EUNIT_PRINT( _L8( "Set Active configuration Minimal" ) ); |
|
2588 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal ); |
|
2589 |
|
2590 // Attach to HSPS, get active app configuration which generates full application configuration with IDs |
|
2591 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
2592 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
2593 |
|
2594 // Test step 6: get plugin conf from the plugin instance in the Minimal root configuration |
|
2595 EUNIT_PRINT( _L8( "Test step 6" ) ); |
|
2596 RunTestStepSyncL( |
|
2597 ( TUint8* )requestnotify_6_ts_6_method, |
|
2598 ( TUint8* )requestnotify_6_ts_6_input, |
|
2599 ( TUint8* )requestnotify_6_ts_6_output ); |
|
2600 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2601 } |
|
2602 |
|
2603 //------------------------------------------------------------------------------ |
|
2604 // Test case: SisxInstallation(1) |
|
2605 //------------------------------------------------------------------------------ |
|
2606 void MT_CHSPSConfigurationIf::SisxInstallation_1_L() |
|
2607 { |
|
2608 // Pre conditions |
|
2609 // Attach to HSPS |
|
2610 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
2611 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
2612 |
|
2613 // Test step 1: |
|
2614 EUNIT_PRINT( _L8( "Test step 1: simulate installation of a SISX package" ) ); |
|
2615 |
|
2616 CFileMan* fileManager = CFileMan::NewL( iFileserver ); |
|
2617 CleanupStack::PushL( fileManager ); |
|
2618 |
|
2619 // Copy installation files to c\private\200159c0\import |
|
2620 User::LeaveIfError( fileManager->Copy( |
|
2621 _L( "c:\\data\\mt_hsps\\installed_widget\\0\\" ), |
|
2622 _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\0\\" ), |
|
2623 CFileMan::ERecurse|CFileMan::EOverWrite ) ); |
|
2624 User::LeaveIfError( fileManager->Copy( |
|
2625 _L( "c:\\data\\mt_hsps\\installed_widget\\1\\" ), |
|
2626 _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\1\\" ), |
|
2627 CFileMan::ERecurse|CFileMan::EOverWrite ) ); |
|
2628 User::LeaveIfError( fileManager->Copy( |
|
2629 _L( "c:\\data\\mt_hsps\\installed_widget\\9\\" ), |
|
2630 _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\9\\" ), |
|
2631 CFileMan::ERecurse|CFileMan::EOverWrite ) ); |
|
2632 User::LeaveIfError( fileManager->Copy( |
|
2633 _L( "c:\\data\\mt_hsps\\installed_widget\\widgetconfiguration.xml" ), |
|
2634 _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\" ), |
|
2635 CFileMan::EOverWrite ) ); |
|
2636 User::LeaveIfError( fileManager->Copy( |
|
2637 _L( "c:\\data\\mt_hsps\\installed_widget\\manifest.dat" ), |
|
2638 _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\" ), |
|
2639 CFileMan::EOverWrite ) ); |
|
2640 User::LeaveIfError( fileManager->Copy( |
|
2641 _L( "c:\\data\\mt_hsps\\installed_widget\\plugin_0998_101FB657_2000B133_1.0.dat" ), |
|
2642 _L( "c:\\private\\200159c0\\import\\" ), |
|
2643 CFileMan::EOverWrite ) ); |
|
2644 |
|
2645 // Wait until configuration is installed |
|
2646 User::After( 5000000 ); |
|
2647 |
|
2648 // Make sure "InstalledWidget" is installed |
|
2649 if ( !BaflUtils::FileExists( iFileserver, _L( "c:\\private\\200159c0\\themes\\2456\\270513751\\536916275\\1.0\\InstallWidgetConf.o0000" ) ) ) |
|
2650 { |
|
2651 User::Leave( KErrGeneral ); |
|
2652 } |
|
2653 |
|
2654 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2655 |
|
2656 // Test step 2: |
|
2657 EUNIT_PRINT( _L8( "Test step 2: simulate un-installation of the SISX package" ) ); |
|
2658 |
|
2659 // Remove installation files from c\private\200159c0\import |
|
2660 User::LeaveIfError( fileManager->RmDir( _L( "c:\\private\\200159c0\\import\\0998\\" ) ) ); |
|
2661 fileManager->Attribs( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133.dat" ), |
|
2662 0, |
|
2663 KEntryAttReadOnly, |
|
2664 TTime( 0 ) ); // TTime(0) = preserve original time stamp. |
|
2665 User::LeaveIfError( fileManager->Delete( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_1.0.dat" ) ) ); |
|
2666 // Removing of *.dat file causes configuration uninstallation |
|
2667 // Wait until configuration is uninstalled |
|
2668 User::After( 5000000 ); |
|
2669 |
|
2670 // Make sure "InstalledWidget" is uninstalled |
|
2671 if ( BaflUtils::FileExists( iFileserver, _L( "c:\\private\\200159c0\\themes\\2456\\270513751\\536916275\\1.0\\InstallWidgetConf.o0000" ) ) ) |
|
2672 { |
|
2673 User::Leave( KErrGeneral ); |
|
2674 } |
|
2675 |
|
2676 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2677 |
|
2678 |
|
2679 CleanupStack::PopAndDestroy( fileManager ); |
|
2680 } |
|
2681 |
|
2682 //------------------------------------------------------------------------------ |
|
2683 // Test case: NativeInstallation(1) |
|
2684 //------------------------------------------------------------------------------ |
|
2685 void MT_CHSPSConfigurationIf::NativeInstallation_1_L() |
|
2686 { |
|
2687 // Pre conditions |
|
2688 _LIT(KFileThemes, "c:\\private\\200159C0\\themes\\2456\\270513751\\536916275\\1.0\\InstallWidgetConf.o0000"); |
|
2689 |
|
2690 // Attach to HSPS |
|
2691 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
2692 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
2693 |
|
2694 MT_CHspsInstallationService* installationService = MT_CHspsInstallationService::NewL(); |
|
2695 CleanupStack::PushL( installationService ); |
|
2696 |
|
2697 // Test step 1: |
|
2698 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2699 installationService->InstallConfigurationL( KHSPSInstallInstalledWidgetConf ); |
|
2700 if ( !BaflUtils::FileExists( iFileserver, KFileThemes) ) |
|
2701 { |
|
2702 User::Leave( KErrGeneral ); |
|
2703 } |
|
2704 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2705 |
|
2706 // Test step 2: |
|
2707 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
2708 installationService->UninstallConfigurationL( KHSPSMTInterfaceUid, KHSPSInstalledWidgetConf ); |
|
2709 if ( BaflUtils::FileExists( iFileserver, KFileThemes) ) |
|
2710 { |
|
2711 User::Leave( KErrGeneral ); |
|
2712 } |
|
2713 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2714 |
|
2715 CleanupStack::PopAndDestroy( installationService ); |
|
2716 } |
|
2717 |
|
2718 //------------------------------------------------------------------------------ |
|
2719 // Test case: SetActivePlugin(1) |
|
2720 //------------------------------------------------------------------------------ |
|
2721 void MT_CHSPSConfigurationIf::SetActivePlugin_1_L() |
|
2722 { |
|
2723 // Pre conditions |
|
2724 // Set active configuration to Typical configuration |
|
2725 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
2726 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
2727 // Attach to HSPS |
|
2728 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
2729 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
2730 |
|
2731 // Test step 1 |
|
2732 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2733 RunTestStepSyncL( |
|
2734 ( TUint8* )setactiveplugin_1_ts_1_method, |
|
2735 ( TUint8* )setactiveplugin_1_ts_1_input, |
|
2736 ( TUint8* )setactiveplugin_1_ts_1_output ); |
|
2737 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2738 |
|
2739 // Test step 2 |
|
2740 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
2741 RunTestStepSyncL( |
|
2742 ( TUint8* )setactiveplugin_1_ts_2_method, |
|
2743 ( TUint8* )setactiveplugin_1_ts_2_input, |
|
2744 ( TUint8* )setactiveplugin_1_ts_2_output ); |
|
2745 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2746 } |
|
2747 |
|
2748 //------------------------------------------------------------------------------ |
|
2749 // Test case: SetActivePlugin(2) |
|
2750 //------------------------------------------------------------------------------ |
|
2751 void MT_CHSPSConfigurationIf::SetActivePlugin_2_L() |
|
2752 { |
|
2753 // Pre conditions |
|
2754 // Set active configuration to Typical configuration |
|
2755 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
2756 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
2757 // Attach to HSPS |
|
2758 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
2759 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
2760 |
|
2761 // Test step 1 |
|
2762 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2763 RunTestStepSyncL( |
|
2764 ( TUint8* )setactiveplugin_2_ts_1_method, |
|
2765 ( TUint8* )setactiveplugin_2_ts_1_input, |
|
2766 ( TUint8* )setactiveplugin_2_ts_1_output ); |
|
2767 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2768 |
|
2769 // Test step 2 |
|
2770 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
2771 RunTestStepSyncL( |
|
2772 ( TUint8* )setactiveplugin_2_ts_2_method, |
|
2773 ( TUint8* )setactiveplugin_2_ts_2_input, |
|
2774 ( TUint8* )setactiveplugin_2_ts_2_output ); |
|
2775 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2776 } |
|
2777 |
|
2778 //------------------------------------------------------------------------------ |
|
2779 // Test case: SetActivePlugin(3) |
|
2780 //------------------------------------------------------------------------------ |
|
2781 void MT_CHSPSConfigurationIf::SetActivePlugin_3_L() |
|
2782 { |
|
2783 // Pre conditions |
|
2784 // Set active configuration to Typical configuration |
|
2785 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
2786 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
2787 // Attach to HSPS |
|
2788 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
2789 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
2790 |
|
2791 // Test step 1 |
|
2792 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2793 RunTestStepSyncL( |
|
2794 ( TUint8* )setactiveplugin_3_ts_1_method, |
|
2795 ( TUint8* )setactiveplugin_3_ts_1_input, |
|
2796 ( TUint8* )setactiveplugin_3_ts_1_output ); |
|
2797 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2798 |
|
2799 // Test step 2 |
|
2800 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
2801 RunTestStepSyncL( |
|
2802 ( TUint8* )setactiveplugin_3_ts_2_method, |
|
2803 ( TUint8* )setactiveplugin_3_ts_2_input, |
|
2804 ( TUint8* )setactiveplugin_3_ts_2_output ); |
|
2805 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2806 } |
|
2807 |
|
2808 //------------------------------------------------------------------------------ |
|
2809 // Test case: SetActivePlugin(4) |
|
2810 //------------------------------------------------------------------------------ |
|
2811 void MT_CHSPSConfigurationIf::SetActivePlugin_4_L() |
|
2812 { |
|
2813 // Pre conditions |
|
2814 // Set active configuration to Typical configuration |
|
2815 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
2816 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
2817 // Attach to HSPS |
|
2818 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
2819 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
2820 |
|
2821 // Test step 1 |
|
2822 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2823 RunTestStepSyncL( |
|
2824 ( TUint8* )setactiveplugin_4_ts_1_method, |
|
2825 ( TUint8* )setactiveplugin_4_ts_1_input, |
|
2826 ( TUint8* )setactiveplugin_4_ts_1_output ); |
|
2827 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2828 |
|
2829 // Test step 2 |
|
2830 EUNIT_PRINT( _L8( "Test step 2" ) ); |
|
2831 RunTestStepSyncL( |
|
2832 ( TUint8* )setactiveplugin_4_ts_2_method, |
|
2833 ( TUint8* )setactiveplugin_4_ts_2_input, |
|
2834 ( TUint8* )setactiveplugin_4_ts_2_output ); |
|
2835 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2836 } |
|
2837 |
|
2838 //------------------------------------------------------------------------------ |
|
2839 // Test case: SetActivePlugin(5) |
|
2840 //------------------------------------------------------------------------------ |
|
2841 void MT_CHSPSConfigurationIf::SetActivePlugin_5_L() |
|
2842 { |
|
2843 // Pre conditions |
|
2844 // Set active configuration to Typical configuration |
|
2845 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
2846 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
2847 // Attach to HSPS |
|
2848 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
2849 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
2850 |
|
2851 // Test step 1 |
|
2852 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2853 RunTestStepSyncL( |
|
2854 ( TUint8* )setactiveplugin_5_ts_1_method, |
|
2855 ( TUint8* )setactiveplugin_5_ts_1_input, |
|
2856 ( TUint8* )setactiveplugin_5_ts_1_output ); |
|
2857 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2858 } |
|
2859 |
|
2860 //------------------------------------------------------------------------------ |
|
2861 // Test case: SetActivePlugin(6) |
|
2862 //------------------------------------------------------------------------------ |
|
2863 void MT_CHSPSConfigurationIf::SetActivePlugin_6_L() |
|
2864 { |
|
2865 // Pre conditions |
|
2866 // Set active configuration to Typical configuration |
|
2867 EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Typical" ) ); |
|
2868 SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfTypical ); |
|
2869 // Attach to HSPS |
|
2870 EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) ); |
|
2871 AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid ); |
|
2872 |
|
2873 // Test step 1 |
|
2874 EUNIT_PRINT( _L8( "Test step 1" ) ); |
|
2875 RunTestStepSyncL( |
|
2876 ( TUint8* )setactiveplugin_6_ts_1_method, |
|
2877 ( TUint8* )setactiveplugin_6_ts_1_input, |
|
2878 ( TUint8* )setactiveplugin_6_ts_1_output ); |
|
2879 EUNIT_PRINT( _L8( "Test step passed" ) ); |
|
2880 } |
|
2881 |
|
2882 //------------------------------------------------------------------------------ |
|
2883 // Test case table |
|
2884 //------------------------------------------------------------------------------ |
|
2885 EUNIT_BEGIN_TEST_TABLE( |
|
2886 MT_CHSPSConfigurationIf, |
|
2887 "This is a test suite for HSPS configuration interface.", |
|
2888 "UNIT" ) |
|
2889 |
|
2890 // Get configuration test group |
|
2891 EUNIT_TEST( |
|
2892 "GetActiveAppConf(1)", |
|
2893 "IConfiguration", |
|
2894 "GetActiveAppConf", |
|
2895 "FUNCTIONALITY", |
|
2896 SetupL, GetActiveAppConf_1_L, Teardown ) |
|
2897 |
|
2898 EUNIT_TEST( |
|
2899 "GetActiveAppConf(2)", |
|
2900 "IConfiguration", |
|
2901 "GetActiveAppConf", |
|
2902 "FUNCTIONALITY", |
|
2903 SetupL, GetActiveAppConf_2_L, Teardown ) |
|
2904 |
|
2905 EUNIT_TEST( |
|
2906 "GetActiveAppConf(3)", |
|
2907 "IConfiguration", |
|
2908 "GetActiveAppConf", |
|
2909 "FUNCTIONALITY", |
|
2910 SetupL, GetActiveAppConf_3_L, Teardown ) |
|
2911 |
|
2912 EUNIT_TEST( |
|
2913 "GetPluginConf(1)", |
|
2914 "IConfiguration", |
|
2915 "GetPluginConf", |
|
2916 "FUNCTIONALITY", |
|
2917 SetupL, GetPluginConf_1_L, Teardown ) |
|
2918 |
|
2919 EUNIT_TEST( |
|
2920 "GetPluginConf(2)", |
|
2921 "IConfiguration", |
|
2922 "GetPluginConf", |
|
2923 "FUNCTIONALITY", |
|
2924 SetupL, GetPluginConf_2_L, Teardown ) |
|
2925 |
|
2926 EUNIT_TEST( |
|
2927 "GetPluginConf(3)", |
|
2928 "IConfiguration", |
|
2929 "GetPluginConf", |
|
2930 "FUNCTIONALITY", |
|
2931 SetupL, GetPluginConf_3_L, Teardown ) |
|
2932 |
|
2933 EUNIT_TEST( |
|
2934 "GetPluginConf(4)", |
|
2935 "IConfiguration", |
|
2936 "GetPluginConf", |
|
2937 "FUNCTIONALITY", |
|
2938 SetupL, GetPluginConf_4_L, Teardown ) |
|
2939 |
|
2940 EUNIT_TEST( |
|
2941 "GetPluginConf(5)", |
|
2942 "IConfiguration", |
|
2943 "GetPluginConf", |
|
2944 "FUNCTIONALITY", |
|
2945 SetupL, GetPluginConf_5_L, Teardown ) |
|
2946 |
|
2947 // Modify Configuration test group |
|
2948 EUNIT_TEST( |
|
2949 "GetPlugins(1)", |
|
2950 "IConfiguration", |
|
2951 "GetPlugins", |
|
2952 "FUNCTIONALITY", |
|
2953 SetupL, GetPlugins_1_L, Teardown ) |
|
2954 |
|
2955 EUNIT_TEST( |
|
2956 "GetPlugins(2)", |
|
2957 "IConfiguration", |
|
2958 "GetPlugins", |
|
2959 "FUNCTIONALITY", |
|
2960 SetupL, GetPlugins_2_L, Teardown ) |
|
2961 |
|
2962 EUNIT_TEST( |
|
2963 "GetPlugins(3)", |
|
2964 "IConfiguration", |
|
2965 "GetPlugins", |
|
2966 "FUNCTIONALITY", |
|
2967 SetupL, GetPlugins_3_L, Teardown ) |
|
2968 |
|
2969 EUNIT_TEST( |
|
2970 "GetPlugins(4)", |
|
2971 "IConfiguration", |
|
2972 "GetPlugins", |
|
2973 "FUNCTIONALITY", |
|
2974 SetupL, GetPlugins_4_L, Teardown ) |
|
2975 |
|
2976 EUNIT_TEST( |
|
2977 "GetPlugins(5)", |
|
2978 "IConfiguration", |
|
2979 "GetPlugins", |
|
2980 "FUNCTIONALITY", |
|
2981 SetupL, GetPlugins_5_L, Teardown ) |
|
2982 |
|
2983 EUNIT_TEST( |
|
2984 "GetPlugins(6)", |
|
2985 "IConfiguration", |
|
2986 "GetPlugins", |
|
2987 "FUNCTIONALITY", |
|
2988 SetupL, GetPlugins_6_L, Teardown ) |
|
2989 |
|
2990 EUNIT_TEST( |
|
2991 "GetPlugins(7)", |
|
2992 "IConfiguration", |
|
2993 "GetPlugins", |
|
2994 "FUNCTIONALITY", |
|
2995 SetupL, GetPlugins_7_L, Teardown ) |
|
2996 |
|
2997 EUNIT_TEST( |
|
2998 "GetPluginList(1)", |
|
2999 "IConfiguration", |
|
3000 "GetPluginList", |
|
3001 "FUNCTIONALITY", |
|
3002 SetupL, GetPluginList_1_L, Teardown ) |
|
3003 |
|
3004 EUNIT_TEST( |
|
3005 "GetPluginList(2)", |
|
3006 "IConfiguration", |
|
3007 "GetPluginList", |
|
3008 "FUNCTIONALITY", |
|
3009 SetupL, GetPluginList_2_L, Teardown ) |
|
3010 |
|
3011 EUNIT_TEST( |
|
3012 "GetPluginList(3)", |
|
3013 "IConfiguration", |
|
3014 "GetPluginList", |
|
3015 "FUNCTIONALITY", |
|
3016 SetupL, GetPluginList_3_L, Teardown ) |
|
3017 |
|
3018 EUNIT_TEST( |
|
3019 "GetPluginList(4)", |
|
3020 "IConfiguration", |
|
3021 "GetPluginList", |
|
3022 "FUNCTIONALITY", |
|
3023 SetupL, GetPluginList_4_L, Teardown ) |
|
3024 |
|
3025 EUNIT_TEST( |
|
3026 "GetPluginList(5)", |
|
3027 "IConfiguration", |
|
3028 "GetPluginList", |
|
3029 "FUNCTIONALITY", |
|
3030 SetupL, GetPluginList_5_L, Teardown ) |
|
3031 |
|
3032 EUNIT_TEST( |
|
3033 "GetPluginList(6)", |
|
3034 "IConfiguration", |
|
3035 "GetPluginList", |
|
3036 "FUNCTIONALITY", |
|
3037 SetupL, GetPluginList_6_L, Teardown ) |
|
3038 |
|
3039 EUNIT_TEST( |
|
3040 "GetPluginList(7)", |
|
3041 "IConfiguration", |
|
3042 "GetPluginList", |
|
3043 "FUNCTIONALITY", |
|
3044 SetupL, GetPluginList_7_L, Teardown ) |
|
3045 |
|
3046 EUNIT_TEST( |
|
3047 "GetPluginList(8)", |
|
3048 "IConfiguration", |
|
3049 "GetPluginList", |
|
3050 "FUNCTIONALITY", |
|
3051 SetupL, GetPluginList_8_L, Teardown ) |
|
3052 |
|
3053 EUNIT_TEST( |
|
3054 "AddPlugin(1)", |
|
3055 "IConfiguration", |
|
3056 "AddPlugin", |
|
3057 "FUNCTIONALITY", |
|
3058 SetupL, AddPlugin_1_L, Teardown ) |
|
3059 |
|
3060 EUNIT_TEST( |
|
3061 "AddPlugin(2)", |
|
3062 "IConfiguration", |
|
3063 "AddPlugin", |
|
3064 "FUNCTIONALITY", |
|
3065 SetupL, AddPlugin_2_L, Teardown ) |
|
3066 |
|
3067 EUNIT_TEST( |
|
3068 "AddPlugin(3)", |
|
3069 "IConfiguration", |
|
3070 "AddPlugin", |
|
3071 "FUNCTIONALITY", |
|
3072 SetupL, AddPlugin_3_L, Teardown ) |
|
3073 |
|
3074 EUNIT_TEST( |
|
3075 "AddPlugin(4)", |
|
3076 "IConfiguration", |
|
3077 "AddPlugin", |
|
3078 "FUNCTIONALITY", |
|
3079 SetupL, AddPlugin_4_L, Teardown ) |
|
3080 |
|
3081 EUNIT_TEST( |
|
3082 "AddPlugin(5)", |
|
3083 "IConfiguration", |
|
3084 "AddPlugin", |
|
3085 "FUNCTIONALITY", |
|
3086 SetupL, AddPlugin_5_L, Teardown ) |
|
3087 |
|
3088 EUNIT_TEST( |
|
3089 "AddPlugin(6)", |
|
3090 "IConfiguration", |
|
3091 "AddPlugin", |
|
3092 "FUNCTIONALITY", |
|
3093 SetupL, AddPlugin_6_L, Teardown ) |
|
3094 |
|
3095 EUNIT_TEST( |
|
3096 "AddPlugin(7)", |
|
3097 "IConfiguration", |
|
3098 "AddPlugin", |
|
3099 "FUNCTIONALITY", |
|
3100 SetupL, AddPlugin_7_L, Teardown ) |
|
3101 |
|
3102 EUNIT_TEST( |
|
3103 "AddPlugin(8)", |
|
3104 "IConfiguration", |
|
3105 "AddPlugin", |
|
3106 "FUNCTIONALITY", |
|
3107 SetupL, AddPlugin_8_L, Teardown ) |
|
3108 |
|
3109 EUNIT_TEST( |
|
3110 "AddPlugin(9)", |
|
3111 "IConfiguration", |
|
3112 "AddPlugin", |
|
3113 "FUNCTIONALITY", |
|
3114 SetupL, AddPlugin_9_L, Teardown ) |
|
3115 |
|
3116 EUNIT_TEST( |
|
3117 "AddPlugin(10)", |
|
3118 "IConfiguration", |
|
3119 "AddPlugin", |
|
3120 "FUNCTIONALITY", |
|
3121 SetupL, AddPlugin_10_L, Teardown ) |
|
3122 |
|
3123 EUNIT_TEST( |
|
3124 "AddPlugin(11)", |
|
3125 "IConfiguration", |
|
3126 "AddPlugin", |
|
3127 "FUNCTIONALITY", |
|
3128 SetupL, AddPlugin_11_L, Teardown ) |
|
3129 |
|
3130 EUNIT_TEST( |
|
3131 "RemovePlugin(1)", |
|
3132 "IConfiguration", |
|
3133 "RemovePlugin", |
|
3134 "FUNCTIONALITY", |
|
3135 SetupL, RemovePlugin_1_L, Teardown ) |
|
3136 |
|
3137 EUNIT_TEST( |
|
3138 "RemovePlugin(2)", |
|
3139 "IConfiguration", |
|
3140 "RemovePlugin", |
|
3141 "FUNCTIONALITY", |
|
3142 SetupL, RemovePlugin_2_L, Teardown ) |
|
3143 |
|
3144 EUNIT_TEST( |
|
3145 "RemovePlugin(3)", |
|
3146 "IConfiguration", |
|
3147 "RemovePlugin", |
|
3148 "FUNCTIONALITY", |
|
3149 SetupL, RemovePlugin_3_L, Teardown ) |
|
3150 |
|
3151 EUNIT_TEST( |
|
3152 "RemovePlugin(4)", |
|
3153 "IConfiguration", |
|
3154 "RemovePlugin", |
|
3155 "FUNCTIONALITY", |
|
3156 SetupL, RemovePlugin_4_L, Teardown ) |
|
3157 |
|
3158 EUNIT_TEST( |
|
3159 "SetPluginSettings(1)", |
|
3160 "IConfiguration", |
|
3161 "SetPluginSettings", |
|
3162 "FUNCTIONALITY", |
|
3163 SetupL, SetPluginSettings_1_L, Teardown ) |
|
3164 |
|
3165 EUNIT_TEST( |
|
3166 "SetPluginSettings(2)", |
|
3167 "IConfiguration", |
|
3168 "SetPluginSettings", |
|
3169 "FUNCTIONALITY", |
|
3170 SetupL, SetPluginSettings_2_L, Teardown ) |
|
3171 |
|
3172 EUNIT_TEST( |
|
3173 "SetPluginSettings(3)", |
|
3174 "IConfiguration", |
|
3175 "SetPluginSettings", |
|
3176 "FUNCTIONALITY", |
|
3177 SetupL, SetPluginSettings_3_L, Teardown ) |
|
3178 |
|
3179 EUNIT_TEST( |
|
3180 "SetPluginSettings(4)", |
|
3181 "IConfiguration", |
|
3182 "SetPluginSettings", |
|
3183 "FUNCTIONALITY", |
|
3184 SetupL, SetPluginSettings_4_L, Teardown ) |
|
3185 |
|
3186 EUNIT_TEST( |
|
3187 "SetPluginSettings(5)", |
|
3188 "IConfiguration", |
|
3189 "SetPluginSettings", |
|
3190 "FUNCTIONALITY", |
|
3191 SetupL, SetPluginSettings_5_L, Teardown ) |
|
3192 |
|
3193 EUNIT_TEST( |
|
3194 "SetPluginSettings(6)", |
|
3195 "IConfiguration", |
|
3196 "SetPluginSettings", |
|
3197 "FUNCTIONALITY", |
|
3198 SetupL, SetPluginSettings_6_L, Teardown ) |
|
3199 |
|
3200 EUNIT_TEST( |
|
3201 "GetPluginSettings(1)", |
|
3202 "IConfiguration", |
|
3203 "GetPluginSettings", |
|
3204 "FUNCTIONALITY", |
|
3205 SetupL, GetPluginSettings_1_L, Teardown ) |
|
3206 |
|
3207 EUNIT_TEST( |
|
3208 "GetPluginSettings(2)", |
|
3209 "IConfiguration", |
|
3210 "GetPluginSettings", |
|
3211 "FUNCTIONALITY", |
|
3212 SetupL, GetPluginSettings_2_L, Teardown ) |
|
3213 |
|
3214 EUNIT_TEST( |
|
3215 "GetPluginSettings(3)", |
|
3216 "IConfiguration", |
|
3217 "GetPluginSettings", |
|
3218 "FUNCTIONALITY", |
|
3219 SetupL, GetPluginSettings_3_L, Teardown ) |
|
3220 |
|
3221 EUNIT_TEST( |
|
3222 "MovePlugins(1)", |
|
3223 "IConfiguration", |
|
3224 "MovePlugins", |
|
3225 "FUNCTIONALITY", |
|
3226 SetupL, MovePlugins_1_L, Teardown ) |
|
3227 |
|
3228 EUNIT_TEST( |
|
3229 "MovePlugins(2)", |
|
3230 "IConfiguration", |
|
3231 "MovePlugins", |
|
3232 "FUNCTIONALITY", |
|
3233 SetupL, MovePlugins_2_L, Teardown ) |
|
3234 |
|
3235 EUNIT_TEST( |
|
3236 "MovePlugins(3)", |
|
3237 "IConfiguration", |
|
3238 "MovePlugins", |
|
3239 "FUNCTIONALITY", |
|
3240 SetupL, MovePlugins_3_L, Teardown ) |
|
3241 |
|
3242 EUNIT_TEST( |
|
3243 "MovePlugins(4)", |
|
3244 "IConfiguration", |
|
3245 "MovePlugins", |
|
3246 "FUNCTIONALITY", |
|
3247 SetupL, MovePlugins_4_L, Teardown ) |
|
3248 |
|
3249 EUNIT_TEST( |
|
3250 "MovePlugins(5)", |
|
3251 "IConfiguration", |
|
3252 "MovePlugins", |
|
3253 "FUNCTIONALITY", |
|
3254 SetupL, MovePlugins_5_L, Teardown ) |
|
3255 |
|
3256 EUNIT_TEST( |
|
3257 "MovePlugins(6)", |
|
3258 "IConfiguration", |
|
3259 "MovePlugins", |
|
3260 "FUNCTIONALITY", |
|
3261 SetupL, MovePlugins_6_L, Teardown ) |
|
3262 |
|
3263 EUNIT_TEST( |
|
3264 "ReplacePlugin(1)", |
|
3265 "IConfiguration", |
|
3266 "ReplacePlugin", |
|
3267 "FUNCTIONALITY", |
|
3268 SetupL, ReplacePlugin_1_L, Teardown ) |
|
3269 |
|
3270 EUNIT_TEST( |
|
3271 "GetAppConfs(1)", |
|
3272 "IConfiguration", |
|
3273 "GetAppConfs", |
|
3274 "FUNCTIONALITY", |
|
3275 SetupL, GetAppConfs_1_L, Teardown ) |
|
3276 |
|
3277 EUNIT_TEST( |
|
3278 "SetActiveAppConf(1)", |
|
3279 "IConfiguration", |
|
3280 "SetActiveAppConf", |
|
3281 "FUNCTIONALITY", |
|
3282 SetupL, SetActiveAppConf_1_L, Teardown ) |
|
3283 |
|
3284 EUNIT_TEST( |
|
3285 "SetActiveAppConf(2)", |
|
3286 "IConfiguration", |
|
3287 "SetActiveAppConf", |
|
3288 "FUNCTIONALITY", |
|
3289 SetupL, SetActiveAppConf_2_L, Teardown ) |
|
3290 |
|
3291 EUNIT_TEST( |
|
3292 "SetActiveAppConf(3)", |
|
3293 "IConfiguration", |
|
3294 "SetActiveAppConf", |
|
3295 "FUNCTIONALITY", |
|
3296 SetupL, SetActiveAppConf_3_L, Teardown ) |
|
3297 |
|
3298 EUNIT_TEST( |
|
3299 "SetActiveAppConf(4)", |
|
3300 "IConfiguration", |
|
3301 "SetActiveAppConf", |
|
3302 "FUNCTIONALITY", |
|
3303 SetupL, SetActiveAppConf_4_L, Teardown ) |
|
3304 |
|
3305 EUNIT_TEST( |
|
3306 "RequestNotify(1)", |
|
3307 "IConfiguration", |
|
3308 "RequestNotify", |
|
3309 "FUNCTIONALITY", |
|
3310 SetupL, RequestNotify_1_L, Teardown ) |
|
3311 |
|
3312 EUNIT_TEST( |
|
3313 "RequestNotify(2)", |
|
3314 "IConfiguration", |
|
3315 "RequestNotify", |
|
3316 "FUNCTIONALITY", |
|
3317 SetupL, RequestNotify_2_L, Teardown ) |
|
3318 |
|
3319 EUNIT_TEST( |
|
3320 "RequestNotify(3)", |
|
3321 "IConfiguration", |
|
3322 "RequestNotify", |
|
3323 "FUNCTIONALITY", |
|
3324 SetupL, RequestNotify_3_L, Teardown ) |
|
3325 |
|
3326 EUNIT_TEST( |
|
3327 "RequestNotify(4)", |
|
3328 "IConfiguration", |
|
3329 "RequestNotify", |
|
3330 "FUNCTIONALITY", |
|
3331 SetupL, RequestNotify_4_L, Teardown ) |
|
3332 |
|
3333 EUNIT_TEST( |
|
3334 "RequestNotify(5)", |
|
3335 "IConfiguration", |
|
3336 "RequestNotify", |
|
3337 "FUNCTIONALITY", |
|
3338 SetupL, RequestNotify_5_L, Teardown ) |
|
3339 |
|
3340 EUNIT_TEST( |
|
3341 "RequestNotify(6)", |
|
3342 "IConfiguration", |
|
3343 "RequestNotify", |
|
3344 "FUNCTIONALITY", |
|
3345 SetupL, RequestNotify_6_L, Teardown ) |
|
3346 |
|
3347 EUNIT_TEST( |
|
3348 "SisxInstallation(1)", |
|
3349 "IConfiguration", |
|
3350 "SisxInstallation", |
|
3351 "FUNCTIONALITY", |
|
3352 SetupL, SisxInstallation_1_L, Teardown ) |
|
3353 |
|
3354 EUNIT_TEST( |
|
3355 "NativeInstallation(1)", |
|
3356 "IConfiguration", |
|
3357 "NativeInstallation", |
|
3358 "FUNCTIONALITY", |
|
3359 SetupL, NativeInstallation_1_L, Teardown ) |
|
3360 |
|
3361 EUNIT_TEST( |
|
3362 "SetActivePlugin(1)", |
|
3363 "IConfiguration", |
|
3364 "SetActivePlugin", |
|
3365 "FUNCTIONALITY", |
|
3366 SetupL, SetActivePlugin_1_L, Teardown ) |
|
3367 |
|
3368 EUNIT_TEST( |
|
3369 "SetActivePlugin(2)", |
|
3370 "IConfiguration", |
|
3371 "SetActivePlugin", |
|
3372 "FUNCTIONALITY", |
|
3373 SetupL, SetActivePlugin_2_L, Teardown ) |
|
3374 |
|
3375 EUNIT_TEST( |
|
3376 "SetActivePlugin(3)", |
|
3377 "IConfiguration", |
|
3378 "SetActivePlugin", |
|
3379 "FUNCTIONALITY", |
|
3380 SetupL, SetActivePlugin_3_L, Teardown ) |
|
3381 |
|
3382 EUNIT_TEST( |
|
3383 "SetActivePlugin(4)", |
|
3384 "IConfiguration", |
|
3385 "SetActivePlugin", |
|
3386 "FUNCTIONALITY", |
|
3387 SetupL, SetActivePlugin_4_L, Teardown ) |
|
3388 |
|
3389 EUNIT_TEST( |
|
3390 "SetActivePlugin(5)", |
|
3391 "IConfiguration", |
|
3392 "SetActivePlugin", |
|
3393 "FUNCTIONALITY", |
|
3394 SetupL, SetActivePlugin_5_L, Teardown ) |
|
3395 |
|
3396 EUNIT_TEST( |
|
3397 "SetActivePlugin(6)", |
|
3398 "IConfiguration", |
|
3399 "SetActivePlugin", |
|
3400 "FUNCTIONALITY", |
|
3401 SetupL, SetActivePlugin_6_L, Teardown ) |
|
3402 |
|
3403 EUNIT_END_TEST_TABLE |
|
3404 |
|
3405 // END OF FILE |