145 // wait for completion |
155 // wait for completion |
146 User::WaitForRequest(reqStatus); |
156 User::WaitForRequest(reqStatus); |
147 ASSERT_EQUALS(KErrNone, reqStatus.Int()); |
157 ASSERT_EQUALS(KErrNone, reqStatus.Int()); |
148 AssertMockLtsyStatusL(); |
158 AssertMockLtsyStatusL(); |
149 |
159 |
150 CleanupStack::PopAndDestroy(2, this); // data, this |
160 CleanupStack::PopAndDestroy(3, this); // data, bookStore, this |
151 |
161 |
152 } |
162 } |
153 |
163 |
|
164 /** |
|
165 @SYMTestCaseID BA-CTSY-MBXN-MGMN-0001b |
|
166 @SYMComponent telephony_ctsy |
|
167 @SYMTestCaseDesc Test support in CTSY for RMobilePhone::GetMailboxNumbers when VMBX storage is not exist |
|
168 @SYMTestPriority High |
|
169 @SYMTestActions Invokes RMobilePhone::GetMailboxNumbers |
|
170 @SYMTestExpectedResults Pass |
|
171 @SYMTestType CT |
|
172 */ |
|
173 void CCTsyMailboxNumbersFU::TestGetMailboxNumbers0001bL() |
|
174 { |
|
175 // Since we can not read the mail box number from the SIM if the VMBX storage was not initilized, the |
|
176 // CTSY must make sure that the VMBX storage was initilize before requesting the mail box number from |
|
177 // the LTSY. This test test if the CTSY knows to create a new VMBX and wait for the initilization to complete. |
|
178 OpenEtelServerL(EUseExtendedError); |
|
179 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
180 OpenPhoneL(); |
|
181 |
|
182 RBuf8 data; |
|
183 CleanupClosePushL(data); |
|
184 |
|
185 TRequestStatus reqStatus; |
|
186 |
|
187 TName name(KETelIccVoiceMailBox); |
|
188 TMockLtsyPhoneBookData0 storeInitData(name); |
|
189 storeInitData.SerialiseL(data); |
|
190 iMockLTSY.ExpectL(EMmTsyPhoneBookStoreInitIPC, data); |
|
191 |
|
192 |
|
193 RMobilePhone::TMobilePhoneVoicemailIdsV3 voicemailIds; |
|
194 voicemailIds.iVoice = 1; |
|
195 voicemailIds.iData = 2; |
|
196 voicemailIds.iFax = 3; |
|
197 voicemailIds.iOther = 4; |
|
198 RMobilePhone::TMobilePhoneVoicemailIdsV3Pckg voicemailIdsPckg(voicemailIds); |
|
199 |
|
200 iPhone.GetMailboxNumbers(reqStatus, voicemailIdsPckg); |
|
201 ASSERT_EQUALS(KRequestPending, reqStatus.Int()); |
|
202 User::After(KOneSecond); |
|
203 ASSERT_EQUALS(KRequestPending, reqStatus.Int()); |
|
204 |
|
205 CStorageInfoData storageData; |
|
206 SetStorageInfoData(storageData); |
|
207 |
|
208 // only after the book store is ready, and CTSY can send the EMobilePhoneGetMailboxNumbers. |
|
209 TMockLtsyPhoneBookData1< CStorageInfoData > retStoreInitC(name, storageData); |
|
210 data.Close(); |
|
211 retStoreInitC.SerialiseL(data); |
|
212 iMockLTSY.CompleteL(EMmTsyPhoneBookStoreInitIPC, KErrNone, data, 0); |
|
213 |
|
214 RMobilePhone::TMobilePhoneVoicemailIdsV3 expVoicemailIds; |
|
215 expVoicemailIds.iVoice = 1; |
|
216 expVoicemailIds.iData = 2; |
|
217 expVoicemailIds.iFax = 3; |
|
218 expVoicemailIds.iOther = 4; |
|
219 TMockLtsyData1<RMobilePhone::TMobilePhoneVoicemailIdsV3> |
|
220 voicemailIdsData( expVoicemailIds ); |
|
221 data.Close(); |
|
222 voicemailIdsData.SerialiseL(data); |
|
223 iMockLTSY.ExpectL(EMobilePhoneGetMailboxNumbers, data, KErrNone); |
|
224 |
|
225 ASSERT_EQUALS(KRequestPending, reqStatus.Int()); |
|
226 User::After(KOneSecond); |
|
227 ASSERT_EQUALS(KRequestPending, reqStatus.Int()); |
|
228 |
|
229 RMobilePhone::TMobilePhoneVoicemailIdsV3 completeVoicemailIds; |
|
230 TMockLtsyData1<RMobilePhone::TMobilePhoneVoicemailIdsV3> |
|
231 completeVoicemailIdsData( completeVoicemailIds ); |
|
232 completeVoicemailIds.iVoice = 5; |
|
233 completeVoicemailIds.iData = 6; |
|
234 completeVoicemailIds.iFax = 7; |
|
235 completeVoicemailIds.iOther = 8; |
|
236 data.Close(); |
|
237 completeVoicemailIdsData.SerialiseL(data); |
|
238 iMockLTSY.CompleteL(EMobilePhoneGetMailboxNumbers, KErrNone, data); |
|
239 |
|
240 User::WaitForRequest(reqStatus); |
|
241 ASSERT_EQUALS(KErrNone, reqStatus.Int()); |
|
242 AssertMockLtsyStatusL(); |
|
243 ASSERT_EQUALS(completeVoicemailIds.iVoice, voicemailIds.iVoice); |
|
244 ASSERT_EQUALS(completeVoicemailIds.iData, voicemailIds.iData); |
|
245 ASSERT_EQUALS(completeVoicemailIds.iFax, voicemailIds.iFax); |
|
246 ASSERT_EQUALS(completeVoicemailIds.iOther, voicemailIds.iOther); |
|
247 |
|
248 CleanupStack::PopAndDestroy(2, this); // data, this |
|
249 |
|
250 } |
|
251 |
|
252 /** |
|
253 @SYMTestCaseID BA-CTSY-MBXN-MGMN-0001c |
|
254 @SYMComponent telephony_ctsy |
|
255 @SYMTestCaseDesc support in CTSY for RMobilePhone::GetMailboxNumbers when VMBX storage is exist but not ready |
|
256 @SYMTestPriority High |
|
257 @SYMTestActions Invokes RMobilePhone::GetMailboxNumbers |
|
258 @SYMTestExpectedResults Pass |
|
259 @SYMTestType CT |
|
260 */ |
|
261 void CCTsyMailboxNumbersFU::TestGetMailboxNumbers0001cL() |
|
262 { |
|
263 // Since we can not read the mail box number from the SIM if the VMBX storage was not initilized, the |
|
264 // CTSY must make sure that the VMBX storage was initilize before requesting the mail box number from |
|
265 // the LTSY. This test test if the CTSY knows to wait for an previous initilize request to complete |
|
266 // before requesting to get the mail box number. |
|
267 |
|
268 OpenEtelServerL(EUseExtendedError); |
|
269 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
270 OpenPhoneL(); |
|
271 |
|
272 RBuf8 data; |
|
273 CleanupClosePushL(data); |
|
274 |
|
275 TRequestStatus reqStatus; |
|
276 |
|
277 TName name(KETelIccVoiceMailBox); |
|
278 TMockLtsyPhoneBookData0 storeInitData(name); |
|
279 storeInitData.SerialiseL(data); |
|
280 iMockLTSY.ExpectL(EMmTsyPhoneBookStoreInitIPC, data); |
|
281 |
|
282 RMobilePhoneBookStore bookStore; |
|
283 CleanupClosePushL(bookStore); |
|
284 TInt ret = bookStore.Open(iPhone, name); |
|
285 ASSERT_EQUALS(KErrNone, ret); |
|
286 |
|
287 |
|
288 RMobilePhone::TMobilePhoneVoicemailIdsV3 voicemailIds; |
|
289 voicemailIds.iVoice = 1; |
|
290 voicemailIds.iData = 2; |
|
291 voicemailIds.iFax = 3; |
|
292 voicemailIds.iOther = 4; |
|
293 RMobilePhone::TMobilePhoneVoicemailIdsV3Pckg voicemailIdsPckg(voicemailIds); |
|
294 |
|
295 iPhone.GetMailboxNumbers(reqStatus, voicemailIdsPckg); |
|
296 ASSERT_EQUALS(KRequestPending, reqStatus.Int()); |
|
297 User::After(KOneSecond); |
|
298 ASSERT_EQUALS(KRequestPending, reqStatus.Int()); |
|
299 |
|
300 CStorageInfoData storageData; |
|
301 SetStorageInfoData(storageData); |
|
302 |
|
303 TMockLtsyPhoneBookData1< CStorageInfoData > retStoreInitC(name, storageData); |
|
304 data.Close(); |
|
305 retStoreInitC.SerialiseL(data); |
|
306 iMockLTSY.CompleteL(EMmTsyPhoneBookStoreInitIPC, KErrNone, data, 0); |
|
307 |
|
308 RMobilePhone::TMobilePhoneVoicemailIdsV3 expVoicemailIds; |
|
309 expVoicemailIds.iVoice = 1; |
|
310 expVoicemailIds.iData = 2; |
|
311 expVoicemailIds.iFax = 3; |
|
312 expVoicemailIds.iOther = 4; |
|
313 TMockLtsyData1<RMobilePhone::TMobilePhoneVoicemailIdsV3> |
|
314 voicemailIdsData( expVoicemailIds ); |
|
315 data.Close(); |
|
316 voicemailIdsData.SerialiseL(data); |
|
317 iMockLTSY.ExpectL(EMobilePhoneGetMailboxNumbers, data, KErrNone); |
|
318 |
|
319 ASSERT_EQUALS(KRequestPending, reqStatus.Int()); |
|
320 User::After(KOneSecond); |
|
321 ASSERT_EQUALS(KRequestPending, reqStatus.Int()); |
|
322 |
|
323 RMobilePhone::TMobilePhoneVoicemailIdsV3 completeVoicemailIds; |
|
324 TMockLtsyData1<RMobilePhone::TMobilePhoneVoicemailIdsV3> |
|
325 completeVoicemailIdsData( completeVoicemailIds ); |
|
326 completeVoicemailIds.iVoice = 5; |
|
327 completeVoicemailIds.iData = 6; |
|
328 completeVoicemailIds.iFax = 7; |
|
329 completeVoicemailIds.iOther = 8; |
|
330 data.Close(); |
|
331 completeVoicemailIdsData.SerialiseL(data); |
|
332 iMockLTSY.CompleteL(EMobilePhoneGetMailboxNumbers, KErrNone, data); |
|
333 |
|
334 User::WaitForRequest(reqStatus); |
|
335 ASSERT_EQUALS(KErrNone, reqStatus.Int()); |
|
336 AssertMockLtsyStatusL(); |
|
337 ASSERT_EQUALS(completeVoicemailIds.iVoice, voicemailIds.iVoice); |
|
338 ASSERT_EQUALS(completeVoicemailIds.iData, voicemailIds.iData); |
|
339 ASSERT_EQUALS(completeVoicemailIds.iFax, voicemailIds.iFax); |
|
340 ASSERT_EQUALS(completeVoicemailIds.iOther, voicemailIds.iOther); |
|
341 |
|
342 CleanupStack::PopAndDestroy(3, this); // data, bookStore, this |
|
343 |
|
344 } |
|
345 |
|
346 /** |
|
347 @SYMTestCaseID BA-CTSY-MBXN-MGMN-0001d |
|
348 @SYMComponent telephony_ctsy |
|
349 @SYMTestCaseDesc Test support in CTSY for RMobilePhone::GetMailboxNumbers when VMBX storage is not exist but another phone book store (ADN) exist |
|
350 @SYMTestPriority High |
|
351 @SYMTestActions Invokes RMobilePhone::GetMailboxNumbers |
|
352 @SYMTestExpectedResults Pass |
|
353 @SYMTestType CT |
|
354 */ |
|
355 void CCTsyMailboxNumbersFU::TestGetMailboxNumbers0001dL() |
|
356 { |
|
357 // Since we can not read the mail box number from the SIM if the VMBX storage was not initilized, the |
|
358 // CTSY must make sure that the VMBX storage was initilize before requesting the mail box number from |
|
359 // the LTSY. This test test if the CTSY knows that another phone book store (ADN) initilization would do. |
|
360 |
|
361 OpenEtelServerL(EUseExtendedError); |
|
362 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
363 OpenPhoneL(); |
|
364 |
|
365 TName name(KETelIccAdnPhoneBook); |
|
366 RMobilePhoneBookStore adnBookStore; |
|
367 OpenPhoneBookStoreL(adnBookStore, name, iPhone); |
|
368 CleanupClosePushL(adnBookStore); |
|
369 |
|
370 RBuf8 data; |
|
371 CleanupClosePushL(data); |
|
372 |
|
373 TRequestStatus reqStatus; |
|
374 |
|
375 RMobilePhoneBookStore bookStore; |
|
376 CleanupClosePushL(bookStore); |
|
377 TInt ret = bookStore.Open(iPhone, name); |
|
378 ASSERT_EQUALS(KErrNone, ret); |
|
379 |
|
380 |
|
381 RMobilePhone::TMobilePhoneVoicemailIdsV3 voicemailIds; |
|
382 voicemailIds.iVoice = 1; |
|
383 voicemailIds.iData = 2; |
|
384 voicemailIds.iFax = 3; |
|
385 voicemailIds.iOther = 4; |
|
386 RMobilePhone::TMobilePhoneVoicemailIdsV3Pckg voicemailIdsPckg(voicemailIds); |
|
387 |
|
388 RMobilePhone::TMobilePhoneVoicemailIdsV3 expVoicemailIds; |
|
389 expVoicemailIds.iVoice = 1; |
|
390 expVoicemailIds.iData = 2; |
|
391 expVoicemailIds.iFax = 3; |
|
392 expVoicemailIds.iOther = 4; |
|
393 TMockLtsyData1<RMobilePhone::TMobilePhoneVoicemailIdsV3> |
|
394 voicemailIdsData( expVoicemailIds ); |
|
395 data.Close(); |
|
396 voicemailIdsData.SerialiseL(data); |
|
397 iMockLTSY.ExpectL(EMobilePhoneGetMailboxNumbers, data, KErrNone); |
|
398 |
|
399 iPhone.GetMailboxNumbers(reqStatus, voicemailIdsPckg); |
|
400 ASSERT_EQUALS(KRequestPending, reqStatus.Int()); |
|
401 User::After(KOneSecond); |
|
402 ASSERT_EQUALS(KRequestPending, reqStatus.Int()); |
|
403 |
|
404 RMobilePhone::TMobilePhoneVoicemailIdsV3 completeVoicemailIds; |
|
405 TMockLtsyData1<RMobilePhone::TMobilePhoneVoicemailIdsV3> |
|
406 completeVoicemailIdsData( completeVoicemailIds ); |
|
407 completeVoicemailIds.iVoice = 5; |
|
408 completeVoicemailIds.iData = 6; |
|
409 completeVoicemailIds.iFax = 7; |
|
410 completeVoicemailIds.iOther = 8; |
|
411 data.Close(); |
|
412 completeVoicemailIdsData.SerialiseL(data); |
|
413 iMockLTSY.CompleteL(EMobilePhoneGetMailboxNumbers, KErrNone, data); |
|
414 |
|
415 User::WaitForRequest(reqStatus); |
|
416 ASSERT_EQUALS(KErrNone, reqStatus.Int()); |
|
417 AssertMockLtsyStatusL(); |
|
418 ASSERT_EQUALS(completeVoicemailIds.iVoice, voicemailIds.iVoice); |
|
419 ASSERT_EQUALS(completeVoicemailIds.iData, voicemailIds.iData); |
|
420 ASSERT_EQUALS(completeVoicemailIds.iFax, voicemailIds.iFax); |
|
421 ASSERT_EQUALS(completeVoicemailIds.iOther, voicemailIds.iOther); |
|
422 |
|
423 CleanupStack::PopAndDestroy(4, this); // data, adnBookStore, bookStore, this |
|
424 |
|
425 } |
154 |
426 |
155 /** |
427 /** |
156 @SYMTestCaseID BA-CTSY-MBXN-MGMN-0002 |
428 @SYMTestCaseID BA-CTSY-MBXN-MGMN-0002 |
157 @SYMComponent telephony_ctsy |
429 @SYMComponent telephony_ctsy |
158 @SYMTestCaseDesc Test support in CTSY for cancelling of RMobilePhone::GetMailboxNumbers |
430 @SYMTestCaseDesc Test support in CTSY for cancelling of RMobilePhone::GetMailboxNumbers |