telephonyserverplugins/common_tsy/test/component/src/cctsyonstorefu.cpp
branchRCL_3
changeset 18 17af172ffa5f
parent 5 7ef16719d8cb
equal deleted inserted replaced
17:1ac40e087278 18:17af172ffa5f
    65 	ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestDelete0005L);
    65 	ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestDelete0005L);
    66     ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0001L);
    66     ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0001L);
    67     ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0001bL);
    67     ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0001bL);
    68     ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0001cL);
    68     ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0001cL);
    69     ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0001dL);
    69     ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0001dL);
       
    70 	ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0001eL);
    70 	ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0002L);
    71 	ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0002L);
    71 	ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0003L);
    72 	ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0003L);
    72 	ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0004L);
    73 	ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0004L);
    73 	ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0005L);
    74 	ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0005L);
    74 	ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestDeleteAll0001L);
    75 	ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestDeleteAll0001L);
  2674     ASSERT_EQUALS(KNameLen, storeInfo.iTextLen);
  2675     ASSERT_EQUALS(KNameLen, storeInfo.iTextLen);
  2675         
  2676         
  2676     CleanupStack::PopAndDestroy(5, this); // this, etc...
  2677     CleanupStack::PopAndDestroy(5, this); // this, etc...
  2677     }
  2678     }
  2678 
  2679 
       
  2680 
       
  2681 /**
       
  2682 @SYMTestCaseID BA-CTSY-PBON-OSGI-0001e
       
  2683 @SYMComponent  telephony_ctsy
       
  2684 @SYMTestCaseDesc Test support in CTSY for ONStore is closed before complete initialisation
       
  2685 @SYMTestPriority High
       
  2686 @SYMTestActions Invokes RMobileONStore::GetInfo
       
  2687 @SYMTestExpectedResults Pass
       
  2688 @SYMTestType CT
       
  2689 */
       
  2690 void CCTsyONStoreFU::TestGetInfo0001eL()
       
  2691     {
       
  2692     // Since we can not get the ON store info from the SIM if the ADN storage was not initilized, the 
       
  2693     // CTSY must make sure that the ADN storage was initilize before requesting to get the ON store info from 
       
  2694     // the LTSY. This test test if the CTSY knows to create a new ADN and wait for the initilization to complete.
       
  2695     OpenEtelServerL(EUseExtendedError);
       
  2696     CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
  2697     OpenPhoneL();
       
  2698 
       
  2699     RBuf8 expData;
       
  2700     CleanupClosePushL(expData);
       
  2701 
       
  2702     RBuf8 completeData;
       
  2703     CleanupClosePushL(completeData);
       
  2704 
       
  2705     RMobileONStore  onStore;
       
  2706     TInt ret = onStore.Open(iPhone);
       
  2707     ASSERT_EQUALS(KErrNone, ret);
       
  2708     CleanupClosePushL(onStore);
       
  2709         
       
  2710         
       
  2711     TRequestStatus requestStatus;
       
  2712     RMobileONStore::TMobileONStoreInfoV1 storeInfo;
       
  2713     RMobileONStore::TMobileONStoreInfoV1Pckg storePckg(storeInfo);
       
  2714     
       
  2715     TName name(KETelIccAdnPhoneBook);
       
  2716     expData.Close();
       
  2717     TMockLtsyPhoneBookData0 storeInitData(name);
       
  2718     storeInitData.SerialiseL(expData);
       
  2719     iMockLTSY.ExpectL(EMmTsyPhoneBookStoreInitIPC, expData);   
       
  2720 
       
  2721     onStore.GetInfo(requestStatus, storePckg);      
       
  2722     ASSERT_EQUALS(KRequestPending, requestStatus.Int());
       
  2723     User::After(KOneSecond);
       
  2724     ASSERT_EQUALS(KRequestPending, requestStatus.Int());
       
  2725 
       
  2726     CStorageInfoData storageData;
       
  2727     SetStorageInfoData(storageData);
       
  2728     
       
  2729     ASSERT_EQUALS(KErrNone, iMockLTSY.PauseCompletion());
       
  2730     
       
  2731     TMockLtsyPhoneBookData1< CStorageInfoData > retStoreInitC(name, storageData);
       
  2732     completeData.Close();
       
  2733     retStoreInitC.SerialiseL(completeData);
       
  2734     onStore.Close();
       
  2735     iMockLTSY.CompleteL(EMmTsyPhoneBookStoreInitIPC, KErrNone, completeData, 0);
       
  2736 
       
  2737     ASSERT_EQUALS(KErrNone, iMockLTSY.ResumeCompletion());
       
  2738 
       
  2739     User::After(KOneSecond);
       
  2740     
       
  2741     CleanupStack::PopAndDestroy(4, this); // this, etc...
       
  2742     }
       
  2743 
       
  2744 
  2679 /**
  2745 /**
  2680 @SYMTestCaseID BA-CTSY-PBON-OSGI-0002
  2746 @SYMTestCaseID BA-CTSY-PBON-OSGI-0002
  2681 @SYMComponent  telephony_ctsy
  2747 @SYMComponent  telephony_ctsy
  2682 @SYMTestCaseDesc Test support in CTSY for cancelling of RMobileONStore::GetInfo
  2748 @SYMTestCaseDesc Test support in CTSY for cancelling of RMobileONStore::GetInfo
  2683 @SYMTestPriority High
  2749 @SYMTestPriority High