|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include "cctsysimfunegative.h" |
|
17 |
|
18 #include <e32math.h> |
|
19 #include <etelmm.h> |
|
20 #include <etelmmerr.h> |
|
21 #include <ctsy/ltsy/mltsydispatchsecurityinterface.h> |
|
22 |
|
23 #include "config.h" |
|
24 #include <ctsy/ltsy/mltsydispatchsiminterface.h> |
|
25 #include <test/tmockltsydata.h> |
|
26 |
|
27 |
|
28 /* static */ |
|
29 CTestSuite* CCTsySimFUNegative::CreateSuiteL(const TDesC& aName) |
|
30 { |
|
31 SUB_SUITE; |
|
32 ADD_TEST_STEP_ISO_CPP(CCTsySimFUNegative, TestGetServiceTableL); |
|
33 ADD_TEST_STEP_ISO_CPP(CCTsySimFUNegative, TestSetIccMessageWaitingIndicatorsL); |
|
34 ADD_TEST_STEP_ISO_CPP(CCTsySimFUNegative, TestGetIccMessageWaitingIndicatorsL); |
|
35 ADD_TEST_STEP_ISO_CPP(CCTsySimFUNegative, TestGetAPNControlListServiceStatusL); |
|
36 ADD_TEST_STEP_ISO_CPP(CCTsySimFUNegative, TestSetApnControlListServiceStatusL); |
|
37 ADD_TEST_STEP_ISO_CPP(CCTsySimFUNegative, TestEnumerateAPNEntriesL); |
|
38 ADD_TEST_STEP_ISO_CPP(CCTsySimFUNegative, TestGetAPNnameL); |
|
39 ADD_TEST_STEP_ISO_CPP(CCTsySimFUNegative, TestDeleteAPNNameL); |
|
40 ADD_TEST_STEP_ISO_CPP(CCTsySimFUNegative, TestAppendAPNNameL); |
|
41 ADD_TEST_STEP_ISO_CPP(CCTsySimFUNegative, TestChangeSecurityCodeL); |
|
42 ADD_TEST_STEP_ISO_CPP(CCTsySimFUNegative, TestGetSubscriberIdL); |
|
43 |
|
44 ADD_TEST_STEP_ISO_CPP(CCTsySimFUNegative, TestPowerSimOffL); |
|
45 ADD_TEST_STEP_ISO_CPP(CCTsySimFUNegative, TestSendAPDUReqL); |
|
46 |
|
47 ADD_TEST_STEP_ISO_CPP(CCTsySimFUNegative, TestSimWarmResetL); |
|
48 |
|
49 ADD_TEST_STEP_ISO_CPP(CCTsySimFUNegative, TestReadSimFileL); |
|
50 ADD_TEST_STEP_ISO_CPP(CCTsySimFUNegative, TestActivateSimLockL); |
|
51 ADD_TEST_STEP_ISO_CPP(CCTsySimFUNegative, TestDeActivateSimLockL); |
|
52 ADD_TEST_STEP_ISO_CPP(CCTsySimFUNegative, TestGetAnswerToResetL); |
|
53 ADD_TEST_STEP_ISO_CPP(CCTsySimFUNegative, TestGetSimCardReaderStatusL); |
|
54 ADD_TEST_STEP_ISO_CPP(CCTsySimFUNegative, TestGetSimAuthenticationEapSimDataL); |
|
55 ADD_TEST_STEP_ISO_CPP(CCTsySimFUNegative, TestGetSimAuthenticationEapAkaDataL); |
|
56 |
|
57 END_SUITE; |
|
58 } |
|
59 |
|
60 |
|
61 /** |
|
62 * @SYMTestCaseID BA-CTSYD-DIS-SIM-NEGATIVE-UN0001 |
|
63 * @SYMComponent telephony_ctsy |
|
64 * @SYMTestCaseDesc Test handing in CTSY dispatch when the GetServiceTable API is disabled |
|
65 * @SYMTestPriority High |
|
66 * @SYMTestActions Disable API, call API, check correct error returned |
|
67 * @SYMTestExpectedResults Pass |
|
68 * @SYMTestType CT |
|
69 */ |
|
70 void CCTsySimFUNegative::TestGetServiceTableL() |
|
71 { |
|
72 TConfig config; |
|
73 config.SetSupportedValue(MLtsyDispatchSimGetServiceTable::KLtsyDispatchSimGetServiceTableApiId, EFalse); |
|
74 config.PushL(); |
|
75 |
|
76 OpenEtelServerL(EUseExtendedError); |
|
77 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
78 |
|
79 OpenPhoneNegativeL(MLtsyDispatchSimGetServiceTable::KLtsyDispatchSimGetServiceTableApiId); |
|
80 |
|
81 RMobilePhone::TMobilePhoneServiceTableV1 tbData; |
|
82 RMobilePhone::TMobilePhoneServiceTableV1Pckg pkg(tbData); |
|
83 |
|
84 TRequestStatus status; |
|
85 iPhone.GetServiceTable(status, RMobilePhone::EUSIMServiceTable, pkg); |
|
86 User::WaitForRequest(status); |
|
87 ASSERT_EQUALS(status.Int(), KErrMMEtelWrongMode); |
|
88 |
|
89 AssertMockLtsyStatusL(); |
|
90 |
|
91 config.Reset(); |
|
92 CleanupStack::PopAndDestroy(2, &config); // this, config |
|
93 } |
|
94 |
|
95 |
|
96 /** |
|
97 * @SYMTestCaseID BBA-CTSYD-DIS-SIM-NEGATIVE-UN0002 |
|
98 * @SYMComponent telephony_ctsy |
|
99 * @SYMTestCaseDesc Test handing in CTSY dispatch when the SetIccMessageWaitingIndicators API is disabled |
|
100 * @SYMTestPriority High |
|
101 * @SYMTestActions Disable API, call API, check correct error returned |
|
102 * @SYMTestExpectedResults Pass |
|
103 * @SYMTestType CT |
|
104 */ |
|
105 void CCTsySimFUNegative::TestSetIccMessageWaitingIndicatorsL() |
|
106 { |
|
107 TConfig config; |
|
108 config.SetSupportedValue(MLtsyDispatchSimSetIccMessageWaitingIndicators::KLtsyDispatchSimSetIccMessageWaitingIndicatorsApiId, EFalse); |
|
109 config.PushL(); |
|
110 |
|
111 OpenEtelServerL(EUseExtendedError); |
|
112 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
113 OpenPhoneL(); |
|
114 |
|
115 RMobilePhone::TMobilePhoneMessageWaitingV1 mwiSet; |
|
116 RMobilePhone::TMobilePhoneMessageWaitingV1Pckg mwiSetRetPckg(mwiSet); |
|
117 |
|
118 TRequestStatus status; |
|
119 iPhone.SetIccMessageWaitingIndicators(status, mwiSetRetPckg); |
|
120 User::WaitForRequest(status); |
|
121 ASSERT_EQUALS(status.Int(), KErrNotSupported); |
|
122 AssertMockLtsyStatusL(); |
|
123 |
|
124 config.Reset(); |
|
125 CleanupStack::PopAndDestroy(2, &config); // this, config |
|
126 } |
|
127 |
|
128 |
|
129 /** |
|
130 * @SYMTestCaseID BA-CTSYD-DIS-SIM-NEGATIVE-UN0003 |
|
131 * @SYMComponent telephony_ctsy |
|
132 * @SYMTestCaseDesc Test handing in CTSY dispatch when the GetIccMessageWaitingIndicators API is disabled |
|
133 * @SYMTestPriority High |
|
134 * @SYMTestActions Disable API, call API, check correct error returned |
|
135 * @SYMTestExpectedResults Pass |
|
136 * @SYMTestType CT |
|
137 */ |
|
138 void CCTsySimFUNegative::TestGetIccMessageWaitingIndicatorsL() |
|
139 { |
|
140 TConfig config; |
|
141 config.SetSupportedValue(MLtsyDispatchSimGetIccMessageWaitingIndicators::KLtsyDispatchSimGetIccMessageWaitingIndicatorsApiId, EFalse); |
|
142 config.PushL(); |
|
143 |
|
144 OpenEtelServerL(EUseExtendedError); |
|
145 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
146 |
|
147 OpenPhoneNegativeL(MLtsyDispatchSimGetIccMessageWaitingIndicators::KLtsyDispatchSimGetIccMessageWaitingIndicatorsApiId); |
|
148 |
|
149 RMobilePhone::TMobilePhoneMessageWaitingV1 mwi; |
|
150 RMobilePhone::TMobilePhoneMessageWaitingV1Pckg mwiRetPckg(mwi); |
|
151 |
|
152 TRequestStatus status; |
|
153 iPhone.GetIccMessageWaitingIndicators(status, mwiRetPckg); |
|
154 User::WaitForRequest(status); |
|
155 ASSERT_EQUALS(status.Int(), KErrNotSupported); |
|
156 |
|
157 AssertMockLtsyStatusL(); |
|
158 config.Reset(); |
|
159 CleanupStack::PopAndDestroy(2, &config); // this, config |
|
160 } |
|
161 |
|
162 |
|
163 /** |
|
164 * @SYMTestCaseID BA-CTSYD-DIS-SIM-NEGATIVE-UN0004 |
|
165 * @SYMComponent telephony_ctsy |
|
166 * @SYMTestCaseDesc Test handing in CTSY dispatch when the GetAPNControlListServiceStatus API is disabled |
|
167 * @SYMTestPriority High |
|
168 * @SYMTestActions Disable API, call API, check correct error returned |
|
169 * @SYMTestExpectedResults Pass |
|
170 * @SYMTestType CT |
|
171 */ |
|
172 void CCTsySimFUNegative::TestGetAPNControlListServiceStatusL() |
|
173 { |
|
174 TConfig config; |
|
175 config.SetSupportedValue(MLtsyDispatchSimGetApnControlListServiceStatus::KLtsyDispatchSimGetApnControlListServiceStatusApiId, EFalse); |
|
176 config.PushL(); |
|
177 |
|
178 OpenEtelServerL(EUseExtendedError); |
|
179 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
180 OpenPhoneL(); |
|
181 |
|
182 RMobilePhone::TAPNControlListServiceStatus statusGet; |
|
183 |
|
184 TRequestStatus status; |
|
185 iPhone.GetAPNControlListServiceStatus(status, statusGet); |
|
186 User::WaitForRequest(status); |
|
187 ASSERT_EQUALS(status.Int(), KErrNotSupported); |
|
188 AssertMockLtsyStatusL(); |
|
189 |
|
190 config.Reset(); |
|
191 CleanupStack::PopAndDestroy(2, &config); // this, config |
|
192 } |
|
193 |
|
194 |
|
195 /** |
|
196 * @SYMTestCaseID BA-CTSYD-DIS-SIM-NEGATIVE-UN0005 |
|
197 * @SYMComponent telephony_ctsy |
|
198 * @SYMTestCaseDesc Test handing in CTSY dispatch when the SetApnControlListServiceStatus API is disabled |
|
199 * @SYMTestPriority High |
|
200 * @SYMTestActions Disable API, call SetAPNControlListServiceStatus, check correct error returned |
|
201 * @SYMTestExpectedResults Pass |
|
202 * @SYMTestType CT |
|
203 */ |
|
204 void CCTsySimFUNegative::TestSetApnControlListServiceStatusL() |
|
205 { |
|
206 TConfig config; |
|
207 config.SetSupportedValue(MLtsyDispatchSimSetApnControlListServiceStatus::KLtsyDispatchSimSetApnControlListServiceStatusApiId, EFalse); |
|
208 config.PushL(); |
|
209 |
|
210 OpenEtelServerL(EUseExtendedError); |
|
211 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
212 OpenPhoneL(); |
|
213 |
|
214 RMobilePhone::TAPNControlListServiceStatus statusSet = RMobilePhone::EAPNControlListServiceEnabled; |
|
215 |
|
216 TRequestStatus status; |
|
217 iPhone.SetAPNControlListServiceStatus(status, statusSet); |
|
218 User::WaitForRequest(status); |
|
219 ASSERT_EQUALS(status.Int(), KErrNotSupported); |
|
220 |
|
221 AssertMockLtsyStatusL(); |
|
222 config.Reset(); |
|
223 CleanupStack::PopAndDestroy(2, &config); // this, config |
|
224 } |
|
225 |
|
226 |
|
227 /** |
|
228 * @SYMTestCaseID BA-CTSYD-DIS-SIM-NEGATIVE-UN0006 |
|
229 * @SYMComponent telephony_ctsy |
|
230 * @SYMTestCaseDesc Test handing in CTSY dispatch when the EnumerateAPNEntries API is disabled |
|
231 * @SYMTestPriority High |
|
232 * @SYMTestActions Disable API, call API, check correct error returned |
|
233 * @SYMTestExpectedResults Pass |
|
234 * @SYMTestType CT |
|
235 */ |
|
236 void CCTsySimFUNegative::TestEnumerateAPNEntriesL() |
|
237 { |
|
238 TConfig config; |
|
239 config.SetSupportedValue(MLtsyDispatchSimEnumerateApnEntries::KLtsyDispatchSimEnumerateApnEntriesApiId, EFalse); |
|
240 config.PushL(); |
|
241 |
|
242 OpenEtelServerL(EUseExtendedError); |
|
243 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
244 OpenPhoneL(); |
|
245 |
|
246 TUint32 enmrtRet; |
|
247 TRequestStatus status; |
|
248 iPhone.EnumerateAPNEntries(status, enmrtRet); |
|
249 User::WaitForRequest(status); |
|
250 ASSERT_EQUALS(status.Int(), KErrNotSupported); |
|
251 |
|
252 AssertMockLtsyStatusL(); |
|
253 config.Reset(); |
|
254 CleanupStack::PopAndDestroy(2, &config); // this, config |
|
255 } |
|
256 |
|
257 |
|
258 /** |
|
259 * @SYMTestCaseID BA-CTSYD-DIS-SIM-NEGATIVE-UN0007 |
|
260 * @SYMComponent telephony_ctsy |
|
261 * @SYMTestCaseDesc Test handing in CTSY dispatch when the GetAPNname API is disabled |
|
262 * @SYMTestPriority High |
|
263 * @SYMTestActions Disable API, call API, check correct error returned |
|
264 * @SYMTestExpectedResults Pass |
|
265 * @SYMTestType CT |
|
266 */ |
|
267 void CCTsySimFUNegative::TestGetAPNnameL() |
|
268 { |
|
269 TConfig config; |
|
270 config.SetSupportedValue(MLtsyDispatchSimGetApnName::KLtsyDispatchSimGetApnNameApiId, EFalse); |
|
271 config.PushL(); |
|
272 |
|
273 OpenEtelServerL(EUseExtendedError); |
|
274 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
275 OpenPhoneL(); |
|
276 |
|
277 RMobilePhone::TAPNEntryV3 apnEntryGet; |
|
278 RMobilePhone::TAPNEntryV3Pckg apnEntryGetPckg(apnEntryGet); |
|
279 |
|
280 TRequestStatus status; |
|
281 iPhone.GetAPNname(status, 1, apnEntryGetPckg); |
|
282 User::WaitForRequest(status); |
|
283 ASSERT_EQUALS(status.Int(), KErrNotSupported); |
|
284 |
|
285 AssertMockLtsyStatusL(); |
|
286 config.Reset(); |
|
287 CleanupStack::PopAndDestroy(2, &config); // this, config |
|
288 } |
|
289 |
|
290 |
|
291 /** |
|
292 * @SYMTestCaseID BA-CTSYD-DIS-SIM-NEGATIVE-UN0008 |
|
293 * @SYMComponent telephony_ctsy |
|
294 * @SYMTestCaseDesc Test handing in CTSY dispatch when the DeleteAPNName API is disabled |
|
295 * @SYMTestPriority High |
|
296 * @SYMTestActions Disable API, call API, check correct error returned |
|
297 * @SYMTestExpectedResults Pass |
|
298 * @SYMTestType CT |
|
299 */ |
|
300 void CCTsySimFUNegative::TestDeleteAPNNameL() |
|
301 { |
|
302 TConfig config; |
|
303 config.SetSupportedValue(MLtsyDispatchSimDeleteApnName::KLtsyDispatchSimDeleteApnNameApiId, EFalse); |
|
304 config.PushL(); |
|
305 |
|
306 OpenEtelServerL(EUseExtendedError); |
|
307 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
308 OpenPhoneL(); |
|
309 |
|
310 TRequestStatus status; |
|
311 iPhone.DeleteAPNName(status, 1); |
|
312 User::WaitForRequest(status); |
|
313 ASSERT_EQUALS(status.Int(), KErrNotSupported); |
|
314 |
|
315 AssertMockLtsyStatusL(); |
|
316 config.Reset(); |
|
317 CleanupStack::PopAndDestroy(2, &config); // this, config |
|
318 } |
|
319 |
|
320 |
|
321 /** |
|
322 * @SYMTestCaseID BA-CTSYD-DIS-SIM-NEGATIVE-UN0009 |
|
323 * @SYMComponent telephony_ctsy |
|
324 * @SYMTestCaseDesc Test handing in CTSY dispatch when the AppendAPNName API is disabled |
|
325 * @SYMTestPriority High |
|
326 * @SYMTestActions Disable API, call API, check correct error returned |
|
327 * @SYMTestExpectedResults Pass |
|
328 * @SYMTestType CT |
|
329 */ |
|
330 void CCTsySimFUNegative::TestAppendAPNNameL() |
|
331 { |
|
332 TConfig config; |
|
333 config.SetSupportedValue(MLtsyDispatchSimAppendApnName::KLtsyDispatchSimAppendApnNameApiId, EFalse); |
|
334 config.PushL(); |
|
335 |
|
336 OpenEtelServerL(EUseExtendedError); |
|
337 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
338 OpenPhoneL(); |
|
339 |
|
340 RMobilePhone::TAPNEntryV3 entryExp; |
|
341 RMobilePhone::TAPNEntryV3Pckg entryAppPckg(entryExp); |
|
342 |
|
343 TRequestStatus status; |
|
344 iPhone.AppendAPNName(status, entryAppPckg); |
|
345 User::WaitForRequest(status); |
|
346 ASSERT_EQUALS(status.Int(), KErrNotSupported); |
|
347 |
|
348 AssertMockLtsyStatusL(); |
|
349 config.Reset(); |
|
350 CleanupStack::PopAndDestroy(2, &config); // this, config |
|
351 } |
|
352 |
|
353 /** |
|
354 * @SYMTestCaseID BA-CTSYD-DIS-SIM-NEGATIVE-UN0010 |
|
355 * @SYMComponent telephony_ctsy |
|
356 * @SYMTestCaseDesc Test handing in CTSY dispatch when the ChangeSecurityCode API is disabled |
|
357 * @SYMTestPriority High |
|
358 * @SYMTestActions Disable API, call API, check correct error returned |
|
359 * @SYMTestExpectedResults Pass |
|
360 * @SYMTestType CT |
|
361 */ |
|
362 void CCTsySimFUNegative::TestChangeSecurityCodeL() |
|
363 { |
|
364 TConfig config; |
|
365 config.SetSupportedValue(MLtsyDispatchSimChangeSecurityCode::KLtsyDispatchSimChangeSecurityCodeApiId, EFalse); |
|
366 config.PushL(); |
|
367 |
|
368 OpenEtelServerL(EUseExtendedError); |
|
369 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
370 OpenPhoneL(); |
|
371 |
|
372 _LIT(KOldPwd,"oldPswd"); |
|
373 _LIT(KNewPwd,"newPswd"); |
|
374 RMobilePhone::TMobilePhonePasswordChangeV1 pwdChange; |
|
375 pwdChange.iNewPassword = KNewPwd; |
|
376 pwdChange.iOldPassword = KOldPwd; |
|
377 // Choose Phone Device Lock |
|
378 RMobilePhone::TMobilePhoneSecurityCode secCode = RMobilePhone::ESecurityCodePhonePassword; |
|
379 |
|
380 TRequestStatus status; |
|
381 iPhone.ChangeSecurityCode(status, secCode, pwdChange); |
|
382 User::WaitForRequest(status); |
|
383 ASSERT_EQUALS(status.Int(), KErrNotSupported); |
|
384 |
|
385 AssertMockLtsyStatusL(); |
|
386 config.Reset(); |
|
387 CleanupStack::PopAndDestroy(2, &config); // this, config |
|
388 } |
|
389 |
|
390 /** |
|
391 * @SYMTestCaseID BA-CTSYD-DIS-SIM-NEGATIVE-UN0011 |
|
392 * @SYMComponent telephony_ctsy |
|
393 * @SYMTestCaseDesc Test handing in CTSY dispatch when the GetSubscriberId API is disabled |
|
394 * @SYMTestPriority High |
|
395 * @SYMTestActions Disable API, call API, check correct error returned |
|
396 * @SYMTestExpectedResults Pass |
|
397 * @SYMTestType CT |
|
398 */ |
|
399 void CCTsySimFUNegative::TestGetSubscriberIdL() |
|
400 { |
|
401 TConfig config; |
|
402 config.SetSupportedValue(MLtsyDispatchSimGetSubscriberId::KLtsyDispatchSimGetSubscriberIdApiId, EFalse); |
|
403 config.PushL(); |
|
404 |
|
405 OpenEtelServerL(EUseExtendedError); |
|
406 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
407 OpenPhoneL(); |
|
408 |
|
409 RMobilePhone::TMobilePhoneSubscriberId idGet; |
|
410 |
|
411 TRequestStatus status; |
|
412 iPhone.GetSubscriberId(status, idGet); |
|
413 User::WaitForRequest(status); |
|
414 ASSERT_EQUALS(status.Int(), KErrNotSupported); |
|
415 |
|
416 AssertMockLtsyStatusL(); |
|
417 config.Reset(); |
|
418 CleanupStack::PopAndDestroy(2, &config); // this, config |
|
419 } |
|
420 |
|
421 /** |
|
422 * @SYMTestCaseID BA-CTSYD-DIS-SIM-NEGATIVE-UN0015 |
|
423 * @SYMComponent telephony_ctsy |
|
424 * @SYMTestCaseDesc Test handing in CTSY dispatch when the PowerSimOff API is disabled |
|
425 * @SYMTestPriority High |
|
426 * @SYMTestActions Disable API, call API, check correct error returned |
|
427 * @SYMTestExpectedResults Pass |
|
428 * @SYMTestType CT |
|
429 */ |
|
430 void CCTsySimFUNegative::TestPowerSimOffL() |
|
431 { |
|
432 TConfig config; |
|
433 config.SetSupportedValue(MLtsyDispatchSimPowerSimOff::KLtsyDispatchSimPowerSimOffApiId, EFalse); |
|
434 config.PushL(); |
|
435 |
|
436 OpenEtelServerL(EUseExtendedError); |
|
437 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
438 OpenPhoneL(); |
|
439 |
|
440 RMmCustomAPI customApi; |
|
441 OpenCustomApiLC(customApi); |
|
442 |
|
443 TRequestStatus status; |
|
444 customApi.PowerSimOff(status); |
|
445 User::WaitForRequest(status); |
|
446 ASSERT_EQUALS(status.Int(), KErrNotSupported); |
|
447 |
|
448 AssertMockLtsyStatusL(); |
|
449 config.Reset(); |
|
450 CleanupStack::PopAndDestroy(3, &config); // customApi, this, config |
|
451 } |
|
452 |
|
453 /** |
|
454 * @SYMTestCaseID BA-CTSYD-DIS-SIM-NEGATIVE-UN0016 |
|
455 * @SYMComponent telephony_ctsy |
|
456 * @SYMTestCaseDesc Test handing in CTSY dispatch when the SendAPDUReq API is disabled |
|
457 * @SYMTestPriority High |
|
458 * @SYMTestActions Disable API, call API, check correct error returned |
|
459 * @SYMTestExpectedResults Pass |
|
460 * @SYMTestType CT |
|
461 */ |
|
462 void CCTsySimFUNegative::TestSendAPDUReqL() |
|
463 { |
|
464 TConfig config; |
|
465 config.SetSupportedValue(MLtsyDispatchSimSendApduRequest::KLtsyDispatchSimSendApduRequestApiId, EFalse); |
|
466 config.PushL(); |
|
467 |
|
468 OpenEtelServerL(EUseExtendedError); |
|
469 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
470 OpenPhoneL(); |
|
471 |
|
472 RMmCustomAPI customApi; |
|
473 OpenCustomApiLC(customApi); |
|
474 |
|
475 TBuf8<3> info; |
|
476 info.Append(1); |
|
477 info.Append(1); |
|
478 info.Append(1); |
|
479 |
|
480 RBuf8 dataBuf; |
|
481 CleanupClosePushL(dataBuf); |
|
482 _LIT8(KApduDataExp,"APDU DATA EXP "); |
|
483 dataBuf.CreateL(KApduDataExp); |
|
484 |
|
485 RMmCustomAPI::TApdu apdu(info,dataBuf); |
|
486 |
|
487 TRequestStatus status; |
|
488 customApi.SendAPDUReq(status, apdu); |
|
489 User::WaitForRequest(status); |
|
490 ASSERT_EQUALS(status.Int(), KErrNotSupported); |
|
491 |
|
492 AssertMockLtsyStatusL(); |
|
493 config.Reset(); |
|
494 CleanupStack::PopAndDestroy(4, &config); // dataBuf, customApi, this, config |
|
495 } |
|
496 |
|
497 |
|
498 /** |
|
499 * @SYMTestCaseID BA-CTSYD-DIS-SIM-NEGATIVE-UN0018 |
|
500 * @SYMComponent telephony_ctsy |
|
501 * @SYMTestCaseDesc Test handing in CTSY dispatch when the SimWarmReset API is disabled |
|
502 * @SYMTestPriority High |
|
503 * @SYMTestActions Disable API, call API, check correct error returned |
|
504 * @SYMTestExpectedResults Pass |
|
505 * @SYMTestType CT |
|
506 */ |
|
507 void CCTsySimFUNegative::TestSimWarmResetL() |
|
508 { |
|
509 TConfig config; |
|
510 config.SetSupportedValue(MLtsyDispatchSimSimWarmReset::KLtsyDispatchSimSimWarmResetApiId, EFalse); |
|
511 config.PushL(); |
|
512 |
|
513 OpenEtelServerL(EUseExtendedError); |
|
514 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
515 OpenPhoneL(); |
|
516 |
|
517 RMmCustomAPI customApi; |
|
518 OpenCustomApiLC(customApi); |
|
519 |
|
520 TRequestStatus status; |
|
521 customApi.SimWarmReset(status); |
|
522 User::WaitForRequest(status); |
|
523 ASSERT_EQUALS(status.Int(), KErrNotSupported); |
|
524 |
|
525 AssertMockLtsyStatusL(); |
|
526 config.Reset(); |
|
527 CleanupStack::PopAndDestroy(3, &config); // customApi, this, config |
|
528 } |
|
529 |
|
530 |
|
531 /** |
|
532 * @SYMTestCaseID BA-CTSYD-DIS-SIM-NEGATIVE-UN0020 |
|
533 * @SYMComponent telephony_ctsy |
|
534 * @SYMTestCaseDesc Test handing in CTSY dispatch when the ReadSimFile API is disabled |
|
535 * @SYMTestPriority High |
|
536 * @SYMTestActions Disable API, call API, check correct error returned |
|
537 * @SYMTestExpectedResults Pass |
|
538 * @SYMTestType CT |
|
539 */ |
|
540 void CCTsySimFUNegative::TestReadSimFileL() |
|
541 { |
|
542 TConfig config; |
|
543 config.SetSupportedValue(MLtsyDispatchSimReadSimFile::KLtsyDispatchSimReadSimFileApiId, EFalse); |
|
544 config.PushL(); |
|
545 |
|
546 OpenEtelServerL(EUseExtendedError); |
|
547 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
548 OpenPhoneL(); |
|
549 |
|
550 RMmCustomAPI customApi; |
|
551 OpenCustomApiLC(customApi); |
|
552 |
|
553 //example Ef(Imsi) path |
|
554 RMmCustomAPI::TSimFilePath path; |
|
555 path.Append(0x3F); |
|
556 path.Append(0x00); |
|
557 path.Append(0x7F); |
|
558 path.Append(0x00); |
|
559 path.Append(0x6F); |
|
560 path.Append(0x07); |
|
561 path.Append(0x00); |
|
562 path.Append(0x00); |
|
563 |
|
564 const TUint16 offset = 0; |
|
565 const TUint16 size = 15; |
|
566 |
|
567 RMmCustomAPI::TSimFileInfo simFileInfo; |
|
568 simFileInfo.iPath = path; |
|
569 simFileInfo.iOffSet = offset; |
|
570 simFileInfo.iSize = size; |
|
571 RMmCustomAPI::TSimFileInfoPckg simFileInfoPckg(simFileInfo); |
|
572 |
|
573 TBuf8<20> responseBytes; |
|
574 |
|
575 TRequestStatus status; |
|
576 customApi.ReadSimFile(status, simFileInfoPckg, responseBytes); |
|
577 User::WaitForRequest(status); |
|
578 ASSERT_EQUALS(status.Int(), KErrNotSupported); |
|
579 |
|
580 AssertMockLtsyStatusL(); |
|
581 config.Reset(); |
|
582 CleanupStack::PopAndDestroy(3, &config); // customAPI, this, config |
|
583 } |
|
584 |
|
585 |
|
586 /** |
|
587 * @SYMTestCaseID BA-CTSYD-DIS-SIM-NEGATIVE-UN0021 |
|
588 * @SYMComponent telephony_ctsy |
|
589 * @SYMTestCaseDesc Test handing in CTSY dispatch when the ActivateSimLock API is disabled |
|
590 * @SYMTestPriority High |
|
591 * @SYMTestActions Disable API, call API, check correct error returned for both async and sync cases |
|
592 * @SYMTestExpectedResults Pass |
|
593 * @SYMTestType CT |
|
594 */ |
|
595 void CCTsySimFUNegative::TestActivateSimLockL() |
|
596 { |
|
597 TConfig config; |
|
598 config.SetSupportedValue(MLtsyDispatchSimSimLockActivate::KLtsyDispatchSimSimLockActivateApiId, EFalse); |
|
599 config.PushL(); |
|
600 |
|
601 OpenEtelServerL(EUseExtendedError); |
|
602 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
603 OpenPhoneL(); |
|
604 |
|
605 RMmCustomAPI customApi; |
|
606 OpenCustomApiLC(customApi); |
|
607 |
|
608 _LIT(KPassword, "12345"); |
|
609 |
|
610 RMmCustomAPI::TSimLockPassword simLockPassword; |
|
611 RMmCustomAPI::TLockNumber lockNumber; |
|
612 |
|
613 lockNumber = RMmCustomAPI::EOperator; |
|
614 simLockPassword.Copy(KPassword); |
|
615 |
|
616 TRequestStatus status; |
|
617 // async version |
|
618 customApi.ActivateSimLock(status, simLockPassword, lockNumber); |
|
619 User::WaitForRequest(status); |
|
620 ASSERT_EQUALS(status.Int(), KErrNotSupported); |
|
621 |
|
622 // synchronous version |
|
623 TInt ret = customApi.ActivateSimLock(simLockPassword, lockNumber); |
|
624 ASSERT_EQUALS(ret, KErrNotSupported); |
|
625 |
|
626 AssertMockLtsyStatusL(); |
|
627 config.Reset(); |
|
628 CleanupStack::PopAndDestroy(3, &config); // customAPI, this, config |
|
629 } |
|
630 |
|
631 |
|
632 /** |
|
633 * @SYMTestCaseID BA-CTSYD-DIS-SIM-NEGATIVE-UN0022 |
|
634 * @SYMComponent telephony_ctsy |
|
635 * @SYMTestCaseDesc Test handing in CTSY dispatch when the API is disabled |
|
636 * @SYMTestPriority High |
|
637 * @SYMTestActions Disable API, call API, check correct error returned for both async & sync APIs |
|
638 * @SYMTestExpectedResults Pass |
|
639 * @SYMTestType CT |
|
640 */ |
|
641 void CCTsySimFUNegative::TestDeActivateSimLockL() |
|
642 { |
|
643 TConfig config; |
|
644 config.SetSupportedValue(MLtsyDispatchSimSimLockDeActivate::KLtsyDispatchSimSimLockDeActivateApiId, EFalse); |
|
645 config.PushL(); |
|
646 |
|
647 OpenEtelServerL(EUseExtendedError); |
|
648 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
649 OpenPhoneL(); |
|
650 |
|
651 RMmCustomAPI customApi; |
|
652 OpenCustomApiLC(customApi); |
|
653 |
|
654 _LIT(KPassword, "12345"); |
|
655 |
|
656 RMmCustomAPI::TSimLockPassword simLockPassword; |
|
657 RMmCustomAPI::TLockNumber lockNumber; |
|
658 |
|
659 lockNumber = RMmCustomAPI::EOperator; |
|
660 simLockPassword.Copy(KPassword); |
|
661 |
|
662 TRequestStatus status; |
|
663 // async version |
|
664 customApi.DeActivateSimLock(status, simLockPassword, lockNumber); |
|
665 User::WaitForRequest(status); |
|
666 ASSERT_EQUALS(status.Int(), KErrNotSupported); |
|
667 |
|
668 // synchronous version |
|
669 TInt ret = customApi.DeActivateSimLock(simLockPassword, lockNumber); |
|
670 ASSERT_EQUALS(ret, KErrNotSupported); |
|
671 |
|
672 AssertMockLtsyStatusL(); |
|
673 config.Reset(); |
|
674 CleanupStack::PopAndDestroy(3, &config); // customAPI, this, config |
|
675 } |
|
676 |
|
677 |
|
678 /** |
|
679 * @SYMTestCaseID BA-CTSYD-DIS-SIM-NEGATIVE-UN0023 |
|
680 * @SYMComponent telephony_ctsy |
|
681 * @SYMTestCaseDesc Test handing in CTSY dispatch when the GetAnswerToReset (ATR) API is disabled |
|
682 * @SYMTestPriority High |
|
683 * @SYMTestActions Disable API, call API, check correct error returned |
|
684 * @SYMTestExpectedResults Pass |
|
685 * @SYMTestType CT |
|
686 */ |
|
687 void CCTsySimFUNegative::TestGetAnswerToResetL() |
|
688 { |
|
689 TConfig config; |
|
690 config.SetSupportedValue(MLtsyDispatchSimGetAnswerToReset::KLtsyDispatchSimGetAnswerToResetApiId, EFalse); |
|
691 config.PushL(); |
|
692 |
|
693 OpenEtelServerL(EUseExtendedError); |
|
694 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
695 OpenPhoneL(); |
|
696 |
|
697 RMmCustomAPI customApi; |
|
698 OpenCustomApiLC(customApi); |
|
699 |
|
700 _LIT8(KAnswerToResetSend, "ExampleAnswerToResetSend"); |
|
701 TBuf8<100> answerToReset(KAnswerToResetSend); |
|
702 |
|
703 TRequestStatus status; |
|
704 customApi.GetATR(status, answerToReset); |
|
705 User::WaitForRequest(status); |
|
706 ASSERT_EQUALS(status.Int(), KErrNotSupported); |
|
707 |
|
708 AssertMockLtsyStatusL(); |
|
709 config.Reset(); |
|
710 CleanupStack::PopAndDestroy(3, &config); // customAPI, this, config |
|
711 } |
|
712 |
|
713 |
|
714 /** |
|
715 * @SYMTestCaseID BA-CTSYD-DIS-SIM-NEGATIVE-UN0024 |
|
716 * @SYMComponent telephony_ctsy |
|
717 * @SYMTestCaseDesc Test handing in CTSY dispatch when the GetSimCardReaderStatus API is disabled |
|
718 * @SYMTestPriority High |
|
719 * @SYMTestActions Disable API, call API, check correct error returned |
|
720 * @SYMTestExpectedResults Pass |
|
721 * @SYMTestType CT |
|
722 */ |
|
723 void CCTsySimFUNegative::TestGetSimCardReaderStatusL() |
|
724 { |
|
725 TConfig config; |
|
726 config.SetSupportedValue(MLtsyDispatchSimGetSimCardReaderStatus::KLtsyDispatchSimGetSimCardReaderStatusApiId, EFalse); |
|
727 config.PushL(); |
|
728 |
|
729 OpenEtelServerL(EUseExtendedError); |
|
730 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
731 OpenPhoneL(); |
|
732 |
|
733 RMmCustomAPI customApi; |
|
734 OpenCustomApiLC(customApi); |
|
735 |
|
736 RMmCustomAPI::TSimCardReaderStatus simCardReaderStatus; |
|
737 |
|
738 TRequestStatus status; |
|
739 customApi.GetSimCardReaderStatus(status, simCardReaderStatus); |
|
740 User::WaitForRequest(status); |
|
741 ASSERT_EQUALS(status.Int(), KErrNotSupported); |
|
742 |
|
743 AssertMockLtsyStatusL(); |
|
744 config.Reset(); |
|
745 CleanupStack::PopAndDestroy(3, &config); // customAPI, this, config |
|
746 } |
|
747 |
|
748 |
|
749 /** |
|
750 * @SYMTestCaseID BA-CTSYD-DIS-SIM-NEGATIVE-UN0025 |
|
751 * @SYMComponent telephony_ctsy |
|
752 * @SYMTestCaseDesc Test handing in CTSY dispatch when the GetSimAuthenticationEapSimData API is disabled |
|
753 * @SYMTestPriority High |
|
754 * @SYMTestActions Disable API, call API, check correct error returned |
|
755 * @SYMTestExpectedResults Pass |
|
756 * @SYMTestType CT |
|
757 */ |
|
758 void CCTsySimFUNegative::TestGetSimAuthenticationEapSimDataL() |
|
759 { |
|
760 TConfig config; |
|
761 config.SetSupportedValue(MLtsyDispatchSimGetSimAuthenticationEapSimData::KLtsyDispatchSimGetSimAuthenticationEapSimDataApiId, EFalse); |
|
762 config.PushL(); |
|
763 |
|
764 OpenEtelServerL(EUseExtendedError); |
|
765 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
766 OpenPhoneL(); |
|
767 |
|
768 RMmCustomAPI customApi; |
|
769 OpenCustomApiLC(customApi); |
|
770 |
|
771 // generate a random parameter |
|
772 TUint32 randomValue; |
|
773 TBuf8<16> randomParameter; |
|
774 for (TInt i = 0; i< 16; i++) |
|
775 { |
|
776 randomValue = Math::Random(); |
|
777 randomParameter.Append(randomValue); |
|
778 } |
|
779 |
|
780 RMmCustomAPI::TSimAuthenticationEapSim eapSim; |
|
781 eapSim.iRandomParameters.Copy(randomParameter); |
|
782 RMmCustomAPI::TSimDataPckg simDataPckg(eapSim); |
|
783 |
|
784 TRequestStatus status; |
|
785 customApi.GetWlanSimAuthenticationData(status, simDataPckg); |
|
786 User::WaitForRequest(status); |
|
787 ASSERT_EQUALS(status.Int(), KErrNotSupported); |
|
788 |
|
789 AssertMockLtsyStatusL(); |
|
790 config.Reset(); |
|
791 CleanupStack::PopAndDestroy(3, &config); // customAPI, this, config |
|
792 } |
|
793 |
|
794 |
|
795 /** |
|
796 * @SYMTestCaseID BA-CTSYD-DIS-SIM-NEGATIVE-UN0026 |
|
797 * @SYMComponent telephony_ctsy |
|
798 * @SYMTestCaseDesc Test handing in CTSY dispatch when the GetSimAuthenticationEapAkaData API is disabled |
|
799 * @SYMTestPriority High |
|
800 * @SYMTestActions Disable API, call API, check correct error returned |
|
801 * @SYMTestExpectedResults Pass |
|
802 * @SYMTestType CT |
|
803 */ |
|
804 void CCTsySimFUNegative::TestGetSimAuthenticationEapAkaDataL() |
|
805 { |
|
806 TConfig config; |
|
807 config.SetSupportedValue(MLtsyDispatchSimGetSimAuthenticationEapAkaData::KLtsyDispatchSimGetSimAuthenticationEapAkaDataApiId, EFalse); |
|
808 config.PushL(); |
|
809 |
|
810 OpenEtelServerL(EUseExtendedError); |
|
811 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
812 OpenPhoneL(); |
|
813 |
|
814 RMmCustomAPI customApi; |
|
815 OpenCustomApiLC(customApi); |
|
816 |
|
817 TUint32 randomValue; |
|
818 TBuf8<16> randomParameter2; |
|
819 for (TInt i = 0; i< 16; i++) |
|
820 { |
|
821 randomValue = Math::Random(); |
|
822 randomParameter2.Append(randomValue); |
|
823 } |
|
824 |
|
825 _LIT8(KAUTN,"AUTN Value"); |
|
826 |
|
827 RMmCustomAPI::TSimAuthenticationEapAka eapAka; |
|
828 eapAka.iRandomParameters.Copy(randomParameter2); |
|
829 eapAka.iAUTN.Copy(KAUTN); |
|
830 RMmCustomAPI::TAkaDataPckg akaDataPckg(eapAka); |
|
831 |
|
832 TRequestStatus status; |
|
833 customApi.GetWlanSimAuthenticationData(status, akaDataPckg); |
|
834 User::WaitForRequest(status); |
|
835 ASSERT_EQUALS(status.Int(), KErrNotSupported); |
|
836 |
|
837 AssertMockLtsyStatusL(); |
|
838 config.Reset(); |
|
839 CleanupStack::PopAndDestroy(3, &config); // customAPI, this, config |
|
840 } |
|
841 |