1001 |
1001 |
1002 // Check CMobilePhoneCWList::Enumerate returns number of entries >= 2 |
1002 // Check CMobilePhoneCWList::Enumerate returns number of entries >= 2 |
1003 TInt noOfEntries = cwList->Enumerate(); |
1003 TInt noOfEntries = cwList->Enumerate(); |
1004 ASSERT_TRUE( noOfEntries >= 2, _L("CRetrieveMobilePhoneCWList::Enumerate returned incorrect information")) |
1004 ASSERT_TRUE( noOfEntries >= 2, _L("CRetrieveMobilePhoneCWList::Enumerate returned incorrect information")) |
1005 |
1005 |
|
1006 const RMobilePhone::TMobilePhoneCWInfoEntryV1& cwInfoEntry = cwList->GetEntryL(0); |
|
1007 const RMobilePhone::TMobilePhoneCWInfoEntryV1& cwInfoEntry1 = cwList->GetEntryL(1); |
1006 // Check CMobilePhoneCWList::GetEntryL with aIndex=0 returns a RMobilePhone::TMobilePhoneCWInfoEntryV1 with iServiceGroup=EVoiceService and iStatus=ECallWaitingStatusActive |
1008 // Check CMobilePhoneCWList::GetEntryL with aIndex=0 returns a RMobilePhone::TMobilePhoneCWInfoEntryV1 with iServiceGroup=EVoiceService and iStatus=ECallWaitingStatusActive |
1007 const RMobilePhone::TMobilePhoneCWInfoEntryV1& cwInfoEntry = cwList->GetEntryL(0); |
|
1008 ASSERT_TRUE((cwInfoEntry.iServiceGroup == RMobilePhone::EVoiceService |
|
1009 || cwInfoEntry.iServiceGroup == RMobilePhone::ETelephony) , |
|
1010 _L("CRetrieveMobilePhoneCWList::GetEntryL returned wrong iServiceGroup")) |
|
1011 ASSERT_EQUALS(cwInfoEntry.iStatus, RMobilePhone::ECallWaitingStatusActive, |
|
1012 _L("CRetrieveMobilePhoneCWList::GetEntryL returned wrong iStatus")); |
|
1013 |
|
1014 // Check CMobilePhoneCWList::GetEntryL with aIndex=1 returns a RMobilePhone::TMobilePhoneCWInfoEntryV1 with iServiceGroup=ECircuitDataService and iStatus=ECallWaitingStatusActive |
1009 // Check CMobilePhoneCWList::GetEntryL with aIndex=1 returns a RMobilePhone::TMobilePhoneCWInfoEntryV1 with iServiceGroup=ECircuitDataService and iStatus=ECallWaitingStatusActive |
1015 const RMobilePhone::TMobilePhoneCWInfoEntryV1& cwInfoEntry1 = cwList->GetEntryL(1); |
1010 // or opposite. |
1016 ASSERT_TRUE( ( cwInfoEntry1.iServiceGroup == RMobilePhone::ECircuitDataService |
1011 TBool serviceGroupFlag1(EFalse); |
1017 || cwInfoEntry1.iServiceGroup == RMobilePhone::ESyncData |
1012 TBool serviceGroupFlag2(EFalse); |
1018 || cwInfoEntry1.iServiceGroup == RMobilePhone::EAsyncData), |
1013 serviceGroupFlag1 = ((cwInfoEntry.iServiceGroup == RMobilePhone::EVoiceService |
1019 _L("CRetrieveMobilePhoneCWList::GetEntryL returned wrong iServiceGroup")) |
1014 || cwInfoEntry.iServiceGroup == RMobilePhone::ETelephony) |
1020 ASSERT_EQUALS(cwInfoEntry1.iStatus, RMobilePhone::ECallWaitingStatusActive, |
1015 && ( cwInfoEntry1.iServiceGroup == RMobilePhone::ECircuitDataService |
1021 _L("CRetrieveMobilePhoneCWList::GetEntryL returned wrong iStatus")) |
1016 || cwInfoEntry1.iServiceGroup == RMobilePhone::ESyncData |
1022 |
1017 || cwInfoEntry1.iServiceGroup == RMobilePhone::EAsyncData) ); |
|
1018 serviceGroupFlag2 = ((cwInfoEntry1.iServiceGroup == RMobilePhone::EVoiceService |
|
1019 || cwInfoEntry1.iServiceGroup == RMobilePhone::ETelephony) |
|
1020 && ( cwInfoEntry.iServiceGroup == RMobilePhone::ECircuitDataService |
|
1021 || cwInfoEntry.iServiceGroup == RMobilePhone::ESyncData |
|
1022 || cwInfoEntry.iServiceGroup == RMobilePhone::EAsyncData) ); |
|
1023 |
|
1024 ASSERT_TRUE((serviceGroupFlag1 || serviceGroupFlag2), |
|
1025 _L("CRetrieveMobilePhoneCWList::GetEntryL returned wrong iServiceGroup")); |
|
1026 ASSERT_EQUALS(cwInfoEntry.iStatus, RMobilePhone::ECallWaitingStatusActive, |
|
1027 _L("CRetrieveMobilePhoneCWList::GetEntryL returned wrong iStatus")); |
|
1028 ASSERT_EQUALS(cwInfoEntry1.iStatus, RMobilePhone::ECallWaitingStatusActive, |
|
1029 _L("CRetrieveMobilePhoneCWList::GetEntryL returned wrong iStatus")); |
|
1030 |
1023 // |
1031 // |
1024 // TEST END |
1032 // TEST END |
1025 // |
1033 // |
1026 |
1034 |
1027 StartCleanup(); |
1035 StartCleanup(); |