TVerdict CCTSYIntegrationTestSubscriberInfo0008::doTestStepL()
/**
 * @SYMTestCaseID BA-CTSY-INT-SUBI-0008
 * @SYMFssID BA/CTSY/SUBI-0008
 * @SYMTestCaseDesc Get SIM service table with a USIM.
 * @SYMTestPriority High
 * @SYMTestActions 
 * @SYMTestExpectedResults Pass - USIM service table returned.
 * @SYMTestType CIT
 * @SYMTestCaseDependencies live/automatic
 *
 * Reason for test: Verify correct bits set in USIM service table.
 *
 * @return - TVerdict code
 */
	{

	//
	// SET UP
	//

	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);

	//
	// SET UP END
	//	
	StartTest();
	
	//
	// TEST START
	//
	RMobilePhone::TMobilePhoneServiceTableV1 serviceTable;
	RMobilePhone::TMobilePhoneServiceTableV1Pckg serviceTablePkg( serviceTable );
	TExtEtelRequestStatus reqGetServiceTableStatus( phone, EMobilePhoneGetServiceTable );
	CleanupStack::PushL(reqGetServiceTableStatus);
	
	phone.GetServiceTable( reqGetServiceTableStatus, RMobilePhone::EUSIMServiceTable, serviceTablePkg );

	TInt err = WaitForRequestWithTimeOut(reqGetServiceTableStatus, ETimeMedium);
	ASSERT_EQUALS(err,KErrNone,_L("RMobilePhone::GetServiceTable timed out"));
	
	// ===  Check for SMS service support (something usually present) ===
	// Check RMobilePhone::GetServiceTable with aTable=EUSIMServiceTable returns 
	// iServices9To16 with bit in set of KUstSMS
	ASSERT_BITS_SET( serviceTable.iServices9To16, 
						RMobilePhone::KUstSMS, 
						KNoUnwantedBits,
						_L("RMobilePhone::GetServiceTable returned incorrect bits in iServices9To16") );
							
	//
	// TEST END
	//

    StartCleanup();
	
	CleanupStack::PopAndDestroy(1, &reqGetServiceTableStatus);
	
	return TestStepResult();
	}
示例#2
0
int main() {
    StartTest("C++",3);
	AssertS("a) Thread gestartet  ",   test_A3_a() );
	AssertS("b) Wörter gesendet   ",   test_A3_b() );
	AssertS("c) Auf Thread warten ",   test_A3_c() );
    StopTest();
    return EXIT_SUCCESS;
}
TVerdict CCTSYIntegrationTestSubscriberInfo0001::doTestStepL()
/**
 * @SYMTestCaseID BA-CTSY-INT-SUBI-0001
 * @SYMFssID BA/CTSY/SUBI-0001
 * @SYMTestCaseDesc Get the customer service profile with no SIM inserted.
 * @SYMTestPriority High
 * @SYMTestActions 
 * @SYMTestExpectedResults Pass - KErrNotFound returned.
 * @SYMTestType CIT
 * @SYMTestCaseDependencies live/manual
 *
 * Reason for test: Verify KErrNotFound is returned.
 *
 * @return - TVerdict code
 */
	{

	//
	// SET UP
	//

	// Remove SIM from phone. 
	
	DisplayUserInteractionPromptL(_L("The SIM should have been removed before starting this test"));
	
	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
	

	//
	// SET UP END
	//
	StartTest();
	
	//
	// TEST START
	//
	
	// Check RMobilePhone::GetCustomerServiceProfile returns KErrNotFound
	RMobilePhone::TMobilePhoneCspFileV1 serviceProfile;
	RMobilePhone::TMobilePhoneCspFileV1Pckg serviceProfilePkg( serviceProfile );
	TExtEtelRequestStatus reqStatus( phone, EMobilePhoneGetCustomerServiceProfile );
	CleanupStack::PushL(reqStatus);
	phone.GetCustomerServiceProfile( reqStatus, serviceProfilePkg );
	
	TInt err = WaitForRequestWithTimeOut(reqStatus, ETimeMedium);
	ASSERT_EQUALS(err,KErrNotFound,_L("RMobilePhone::GetCustomerServiceProfile returned an error"));	

	
	//
	// TEST END
	//

    StartCleanup();
	
	CleanupStack::PopAndDestroy(1,&reqStatus);
	
	return TestStepResult();
	}
TVerdict CCTSYIntegrationTestSubscriberInfo0009::doTestStepL()
/**
 * @SYMTestCaseID BA-CTSY-INT-SUBI-0009
 * @SYMFssID BA/CTSY/SUBI-0009
 * @SYMTestCaseDesc Cancel get SIM service table.
 * @SYMTestPriority High
 * @SYMTestActions 
 * @SYMTestExpectedResults Pass - Request cancelled.
 * @SYMTestType CIT
 * @SYMTestCaseDependencies live/automatic
 *
 * Reason for test: Verify request cancelled.
 *
 * @return - TVerdict code
 */
	{

	//
	// SET UP
	//

	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
	
	//
	// SET UP END
	//
	StartTest();
	
	//
	// TEST START
	//
	
	// Request to get service table with RMobilePhone::GetServiceTable with aTable=ESIMServiceTable 
	RMobilePhone::TMobilePhoneServiceTableV1 serviceTable;
	RMobilePhone::TMobilePhoneServiceTableV1Pckg serviceTablePkg( serviceTable );
	TExtEtelRequestStatus reqGetServiceTableStatus( phone, EMobilePhoneGetServiceTable );
	CleanupStack::PushL( reqGetServiceTableStatus );
	
	phone.GetServiceTable( reqGetServiceTableStatus, RMobilePhone::ESIMServiceTable, serviceTablePkg );

	// Cancel request with RTelSubSessionBase::CancelAsyncRequest(EMobilePhoneGetServiceTable) 
	phone.CancelAsyncRequest(EMobilePhoneGetServiceTable);

	// Check request completes with KErrCancel or KErrNone
	ASSERT_TRUE( KErrNone == reqGetServiceTableStatus.Int() || KErrCancel == reqGetServiceTableStatus.Int(),
						 _L("Cancelled RMobilePhone::GetServiceTable request returned bad status") );
	
	//
	// TEST END
	//

    StartCleanup();
	
	CleanupStack::PopAndDestroy(1,&reqGetServiceTableStatus);
	
	return TestStepResult();
	}
TVerdict CCTSYIntegrationTestSMSPStore0006::doTestStepL()
/**
 * @SYMTestCaseID BA-CTSY-INT-SMSP-0006
 * @SYMFssID BA/CTSY/SMSP-0006
 * @SYMTestCaseDesc Cancel notification of change in SMSP list entries.
 * @SYMTestPriority High
 * @SYMTestActions 
 * @SYMTestExpectedResults Pass - Request is cancelled.
 * @SYMTestType CIT
 * @SYMTestCaseDependencies live/automatic
 *
 * Reason for test: Verify request is cancelled.
 *
 * @return - TVerdict code
 */
	{

	//
	// SET UP
	//
	
	// Get the RMobileSmsMessaging subsession 
	RMobileSmsMessaging& smsMessaging = iEtelSessionMgr.GetSmsMessagingL(KMainServer,KMainPhone,KMainSmsMessaging);

	//
	// SET UP END
	//
	
	StartTest();
	
	//
	// TEST START
	//
		
	// Register for notification of SMSP list change with RMobileSmsMessaging::NotifySmspListChange 
	TExtEtelRequestStatus notifySmspListChangeStatus(smsMessaging, EMobileSmsMessagingNotifySmspListChange);
	CleanupStack::PushL(notifySmspListChangeStatus);
	smsMessaging.NotifySmspListChange(notifySmspListChangeStatus);
	
	// Cancel request with RTelSubSessionBase::CancelAsyncRequest(EMobileSmsMessagingNotifySmspListChange) 
 	smsMessaging.CancelAsyncRequest(EMobileSmsMessagingNotifySmspListChange);
 	
 	// Check notification request completes with KErrCancel
 	TInt expectedStatus = KErrCancel;
 	iSmsMessagingTestHelper.WaitForMobileSmsMessagingNotifySmspListChange(notifySmspListChangeStatus,expectedStatus);
	
	//
	// TEST END
	//

    StartCleanup();
	CleanupStack::PopAndDestroy(&notifySmspListChangeStatus);	

	
	return TestStepResult();
	}
TVerdict CCTSYIntegrationTestSubscriberInfo0006::doTestStepL()
/**
 * @SYMTestCaseID BA-CTSY-INT-SUBI-0006
 * @SYMFssID BA/CTSY/SUBI-0006
 * @SYMTestCaseDesc Cancel notification of change of ICC access caps
 * @SYMTestPriority High
 * @SYMTestActions 
 * @SYMTestExpectedResults Pass - KErrCancel returned.
 * @SYMTestType CIT
 * @SYMTestCaseDependencies live/automatic
 *
 * Reason for test: Verify request is cancelled.
 *
 * @return - TVerdict code
 */
	{

	//
	// SET UP
	//

	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);

	//
	// SET UP END
	//
	
	StartTest();
	
	//
	// TEST START
	//
	
	// Make a request for RMobilePhone::NotifyIccAccessCapsChange 
	TUint32 accessCaps;
	TExtEtelRequestStatus reqAccessCapsStatus(phone, EMobilePhoneNotifyIccAccessCapsChange );
	CleanupStack::PushL(reqAccessCapsStatus);
	phone.NotifyIccAccessCapsChange( reqAccessCapsStatus, accessCaps );
	
	// Cancel the request. 
	phone.CancelAsyncRequest( EMobilePhoneNotifyIccAccessCapsChange );

	// Check request status used for the request is KErrCancel
	ASSERT_EQUALS( reqAccessCapsStatus.Int(), KErrCancel, 
							_L("Cancelled RMobilePhone::NotifyIccAccessCapsChange gave unexpected status"));

	//
	// TEST END
	//

    StartCleanup();
	
	CleanupStack::PopAndDestroy(1,&reqAccessCapsStatus);
	
	return TestStepResult();
	}
TVerdict CCTSYIntegrationTestCallCost0023::doTestStepL()
/**
 * @SYMTestCaseID BA-CTSY-INT-CCOS-0023
 * @SYMFssID BA/CTSY/CCOS-0023
 * @SYMTestCaseDesc Get cost information.
 * @SYMTestPriority High
 * @SYMTestActions RMobilePhone::GetCostInfo
 * @SYMTestExpectedResults Pass - KErrNotSupported returned
 * @SYMTestType CIT
 * @SYMTestCaseDependencies live/automatic
 *
 * Reason for test: Verify KErrNotSupported is returned.
 *
 * @return - TVerdict code
 */
	{

	//
	// SET UP
	//
	//Get cost information.
	//Verify KErrNotSupported is returned.
	RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);

	//
	// SET UP END
	//
	
	StartTest();
	
	//
	// TEST START
	//
	
	
	// Check RMobilePhone::GetCostInfo returns KErrNotSupported

	TExtEtelRequestStatus requestStatus(mobilePhone,EMobilePhoneGetCostInfo);	
	RMobilePhone::TMobilePhoneCostInfoV1  costInfo;
	RMobilePhone::TMobilePhoneCostInfoV1Pckg costInfoPk(costInfo);

	mobilePhone.GetCostInfo(requestStatus, costInfoPk);	
	ASSERT_EQUALS(WaitForRequestWithTimeOut(requestStatus, ETimeShort), 
			KErrNone, _L("RMobilePhone::GetCostInfo did not complete."))
    ASSERT_EQUALS(requestStatus.Int(),KErrNotSupported, 
    		_L("RMobilePhone::GetCostInfo completed with incorrect error"))
	//
	// TEST END
	//

    StartCleanup();
	
	
	return TestStepResult();
	}
示例#8
0
void ItemContainerWidgetsPage::OnButtonTestItemContainer(wxCommandEvent&)
{
    m_container = GetContainer();
    wxASSERT_MSG(m_container, wxT("Widget must have a test widget"));

    wxLogMessage(wxT("wxItemContainer test for %s, %s:"),
                 GetWidget()->GetClassInfo()->GetClassName(),
                 (m_container->IsSorted() ? "Sorted" : "Unsorted"));

    const wxArrayString
        expected_result = m_container->IsSorted() ? MakeArray(m_itemsSorted)
                                                  : m_items;

    StartTest(wxT("Append one item"));
    wxString item = m_items[0];
    m_container->Append(item);
    EndTest(wxArrayString(1, &item));

    StartTest(wxT("Append some items"));
    m_container->Append(m_items);
    EndTest(expected_result);

    StartTest(wxT("Append some items with data objects"));
    wxClientData **objects = new wxClientData *[m_items.GetCount()];
    unsigned i;
    for ( i = 0; i < m_items.GetCount(); ++i )
        objects[i] = CreateClientData(i);
    m_container->Append(m_items, objects);
    EndTest(expected_result);
    delete[] objects;

    StartTest(wxT("Append some items with data"));
    void **data = new void *[m_items.GetCount()];
    for ( i = 0; i < m_items.GetCount(); ++i )
        data[i] = wxUIntToPtr(i);
    m_container->Append(m_items, data);
    EndTest(expected_result);
    delete[] data;

    StartTest(wxT("Append some items with data, one by one"));
    for ( i = 0; i < m_items.GetCount(); ++i )
        m_container->Append(m_items[i], wxUIntToPtr(i));
    EndTest(expected_result);

    StartTest(wxT("Append some items with data objects, one by one"));
    for ( i = 0; i < m_items.GetCount(); ++i )
        m_container->Append(m_items[i], CreateClientData(i));
    EndTest(expected_result);

    if ( !m_container->IsSorted() )
    {
        StartTest(wxT("Insert in reverse order with data, one by one"));
        for ( unsigned i = m_items.GetCount(); i; --i )
            m_container->Insert(m_items[i - 1], 0, wxUIntToPtr(i - 1));
        EndTest(expected_result);
    }
}
TVerdict CCTSYIntegrationTestSubscriberInfo0003::doTestStepL()
/**
 * @SYMTestCaseID BA-CTSY-INT-SUBI-0003
 * @SYMFssID BA/CTSY/SUBI-0003
 * @SYMTestCaseDesc Get the ICC identity
 * @SYMTestPriority High
 * @SYMTestActions 
 * @SYMTestExpectedResults Pass - The ICC identity is returned.
 * @SYMTestType CIT
 * @SYMTestCaseDependencies live/automatic
 *
 * Reason for test: Verify a value is returned.
 *
 * @return - TVerdict code
 */
	{

	//
	// SET UP
	//
	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
	
	//
	// SET UP END
	//

	StartTest();
	
	//
	// TEST START
	//
	
	ASSERT_EQUALS(1,0, _L("NOTE: CTSY doesn't actually support this API - test case can be used if support is added"));
	TEST_CHECK_POINT_L(_L("Test leaving for now,  remove this line when this test is valid once more"));
	
	// Check RMobilePhone::GetIccIdentity returns aIdentity with length > 0
	RMobilePhone::TIccIdentity iccIdentity;
	TExtEtelRequestStatus reqStatus( phone, EMobilePhoneGetIccIdentity );
	CleanupStack::PushL( reqStatus );
	phone.GetIccIdentity( reqStatus, iccIdentity );
	
	TInt err = WaitForRequestWithTimeOut(reqStatus, ETimeMedium);
	ASSERT_EQUALS(err,KErrNone,_L("RMobilePhone::GetIccIdentity returned an error"))	
	ASSERT_TRUE( iccIdentity.Length() > 0, _L("RMobilePhone::GetIccIdentity returned identity with length 0"))
	
	//
	// TEST END
	//

    StartCleanup();
	CleanupStack::PopAndDestroy(1,&reqStatus);
	
	return TestStepResult();
	}
JNIEXPORT jint JNICALL Java_com_xilinx_gui_DriverInfoGenDV_startTest(JNIEnv *env, jobject obj, jint engine, jint testmode, jint maxsize){  
        int tmode = ENABLE_LOOPBACK;
        if (testmode == 0) // loopback
           tmode = ENABLE_LOOPBACK;
        else if (testmode == 1) // checker
           tmode = ENABLE_PKTCHK;
        else if (testmode == 2) // generator
           tmode = ENABLE_PKTGEN; 
        else if (testmode == 3)
           tmode =  ENABLE_PKTCHK|ENABLE_PKTGEN;
	return StartTest(statsfd, engine, tmode, maxsize);
}
TVerdict CCTSYIntegrationTestSubscriberInfo0002::doTestStepL()
/**
 * @SYMTestCaseID BA-CTSY-INT-SUBI-0002
 * @SYMFssID BA/CTSY/SUBI-0002
 * @SYMTestCaseDesc Get the subscriber ID (IMSI)
 * @SYMTestPriority High
 * @SYMTestActions 
 * @SYMTestExpectedResults Pass - A subscriber ID is returned.
 * @SYMTestType CIT
 * @SYMTestCaseDependencies live/automatic
 *
 * Reason for test: Verify a value is returned.
 *
 * @return - TVerdict code
 */
	{

	//
	// SET UP
	//
	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);

	//
	// SET UP END
	//

	StartTest();

	//
	// TEST START
	//

	// Check RMobilePhone::GetSubscriberId returns a valid subscriber Id in aId
	TExtEtelRequestStatus subscriberIdStatus(phone, EMobilePhoneGetSubscriberId);
	CleanupStack::PushL(subscriberIdStatus);
	
	RMobilePhone::TMobilePhoneSubscriberId subscriberId;
	phone.GetSubscriberId(subscriberIdStatus, subscriberId);
	ASSERT_EQUALS(WaitForRequestWithTimeOut(subscriberIdStatus, ETimeLong),
			KErrNone, _L("RMobilePhone::GetSubscriberId timed-out."));
	ASSERT_EQUALS(subscriberIdStatus.Int(), KErrNone, _L("RMobilePhone::GetSubscriberId returned with an error"));
	ASSERT_TRUE(subscriberId.Length() > 0, _L("RMobilePhone::GetSubscriberId returned invalid IMSI in aId"));
	
    //
    // Test end
    //

    StartCleanup();

	CleanupStack::PopAndDestroy(1,&subscriberIdStatus);  

	return TestStepResult();
	}
示例#12
0
int main(uint32_t argc, char * argv[])
{
	if (argc < 5) {
		Usage();
		return 0;
	}

	StartTest(argv[1], StrToIntA(argv[2]), StrToIntA(argv[3]), StrToIntA(argv[4]), StrToIntA(argv[5]));
	getchar();
	StopTest();
    return 0;
}
TVerdict CCTSYIntegrationTestCallCost0012::doTestStepL()
/**
 * @SYMTestCaseID BA-CTSY-INT-CCOS-0012
 * @SYMFssID BA/CTSY/CCOS-0012
 * @SYMTestCaseDesc iTest.Printf(_L("10:\tCost Meter, cancel set max request when security event is verified\n"));
 * @SYMTestPriority High
 * @SYMTestActions 
 * @SYMTestExpectedResults Pass
 * @SYMTestType CIT
 * @SYMTestCaseDependencies live/manual
 *
 
 *
 * @return - TVerdict code
 */
	{

	//
	// SET UP
	//

	

	//
	// SET UP END
	//
	
	StartTest();
	
	//
	// TEST START
	//
	
	
	// See TRP test 

	
	//
	// TEST END
	//

    StartCleanup();
	
	// Put any required test clean up here, then remove this comment
	
	return TestStepResult();
	}
TVerdict CCTSYIntegrationTestCallCost0018::doTestStepL()
/**
 * @SYMTestCaseID BA-CTSY-INT-CCOS-0018
 * @SYMFssID BA/CTSY/CCOS-0018
 * @SYMTestCaseDesc iTest.Printf(_L("18:\tCost Info, emergency call when max cost reached\n"));
 * @SYMTestPriority High
 * @SYMTestActions 
 * @SYMTestExpectedResults Pass
 * @SYMTestType CIT
 * @SYMTestCaseDependencies live/manual
 *
 
 *
 * @return - TVerdict code
 */
	{

	//
	// SET UP
	//

	

	//
	// SET UP END
	//
	
	StartTest();
	
	//
	// TEST START
	//
	
	
	// See TRP test 

	
	//
	// TEST END
	//

    StartCleanup();
	
	// Put any required test clean up here, then remove this comment
	
	return TestStepResult();
	}
TVerdict CCTSYIntegrationTestCallCost0022::doTestStepL()
/**
 * @SYMTestCaseID BA-CTSY-INT-CCOS-0022
 * @SYMFssID BA/CTSY/CCOS-0022
 * @SYMTestCaseDesc Get call cost capabilities.
 * @SYMTestPriority High
 * @SYMTestActions 
 * @SYMTestExpectedResults Pass - KErrNotSupported returned
 * @SYMTestType CIT
 * @SYMTestCaseDependencies live/automatic
 *
 * Reason for test: Verify KErrNotSupported is returned.
 *
 * @return - TVerdict code
 */
	{

	//
	// SET UP
	//
	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);

	//
	// SET UP END
	//
	
	StartTest();
	
	//
	// TEST START
	//
	
	
	// Check RMobilePhone::GetCostCaps returns KErrNotSupported
	TUint32 costCaps=5;
	TInt err=phone.GetCostCaps(costCaps);
	//We only check the return code as the caps could be slightly different for each TSY.
	ASSERT_EQUALS(err,KErrNotSupported, _L("RMobilePhone::GetCostCaps completed with error."))
		
	//
	// TEST END
	//

    StartCleanup();
	
	return TestStepResult();
	}
示例#16
0
void CWizSoundSysPage::OnBnClickedButtonTest()
{
    if(m_nInputDevice == UNDEFINED)
    {
        AfxMessageBox(_T("No input device selected"));
        return;
    }
    if(m_nOutputDevice == UNDEFINED)
    {
        AfxMessageBox(_T("No output device selected"));
        return;
    }

    CString szTest;
    if(!m_bTesting)
    {
        m_bTesting = StartTest();
        if(m_bTesting)
        {
            szTest.LoadString(IDS_STOP);
            m_wndTestBtn.SetWindowText(szTest);
            TRANSLATE(m_wndTestBtn, IDS_STOP, _T("Stop"));
            m_DxButton.EnableWindow(FALSE);
            m_WinButton.EnableWindow(FALSE);
            m_OutputDriversCombo.EnableWindow(FALSE);
            m_InputDriversCombo.EnableWindow(FALSE);
        }
    }
    else
    {
        StopTest();
        szTest.LoadString(IDS_TESTSELECTED);
        m_wndTestBtn.SetWindowText(szTest);
        TRANSLATE(m_wndTestBtn, IDS_TESTSELECTED, _T("Test selected"));
        m_DxButton.EnableWindow(TRUE);
        m_WinButton.EnableWindow(TRUE);
        m_OutputDriversCombo.EnableWindow(TRUE);
        m_InputDriversCombo.EnableWindow(TRUE);
        m_bTesting = FALSE;
    }
}
示例#17
0
int main()
{
  StartTest("LexTest");

  ParseResult result;
  Parser parser(g_testProgram, result);
  Token token;

  for (TokenType expectedType : g_expectedTypes)
  {
    if ((token = parser.PeekToken(false)).type != expectedType)
    {
      if (token.type == TOKEN_NAME)
        std::cout << "Failed token was an identifier: " << token.text << std::endl;

      std::cout << "Expected: " << Util::TokenName(expectedType) << ", not: " << Util::TokenName(token.type) << std::endl;
      EndTest(false);
    }

    parser.NextToken(false);
  }

  EndTest(true);
}
TVerdict CCTSYIntegrationTestSubscriberInfo0005::doTestStepL()
/**
 * @SYMTestCaseID BA-CTSY-INT-SUBI-0005
 * @SYMFssID BA/CTSY/SUBI-0005
 * @SYMTestCaseDesc Get ICC access caps with a 3G SIM
 * @SYMTestPriority High
 * @SYMTestActions RMobilePhone::GetIccAccessCaps
 * @SYMTestExpectedResults Pass - Correct ICC caps returned.
 * @SYMTestType CIT
 * @SYMTestCaseDependencies live/manual
 *
 * Reason for test: Verify correct caps are returned.
 *
 * @return - TVerdict code
 */
	{
	// Insert a 3G Sim. 
	// Boot the phone. 
	DoPauseL( _L("Please ensure a 3G SIM has been inserted before starting this test"), ETimeVeryLong );

	//
	// SET UP
	//
	
	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);

	// In the CTSY, the security event triggers a call to 
	// get the ICC type from the SIM
	TExtEtelRequestStatus notifySecurityEventStatus(phone, EMobilePhoneNotifySecurityEvent);
	CleanupStack::PushL(notifySecurityEventStatus);
	RMobilePhone::TMobilePhoneSecurityEvent event;
	phone.NotifySecurityEvent(notifySecurityEventStatus, event); 
	User::After(KOneSecond*5);
	
	//
	// SET UP END
	//	
	
	StartTest();
	
	//
	// TEST START
	//
	

	// ===  Check for change in ICC access caps ===

	// Check RMobilePhone::GetIccAccessCaps returns caps in set of KCapsUSimAccessSupported | KCapsSimAccessSupported
	// Check RMobilePhone::GetIccAccessCaps returns caps NOT in set of KCapsRUimAccessSupported
	TUint32 iccAccessCaps;
	TInt err = phone.GetIccAccessCaps( iccAccessCaps );
	ASSERT_EQUALS(err,KErrNone,_L("RMobilePhone::GetIccAccessCaps returned an error"));
	ASSERT_BITS_SET(iccAccessCaps, 
							RMobilePhone::KCapsSimAccessSupported | RMobilePhone::KCapsUSimAccessSupported,
							 RMobilePhone::KCapsRUimAccessSupported,
							_L("RMobilePhone::GetIccAccessCaps returned unexpected bits") );
	
	//
	// TEST END
	//

    StartCleanup();
	
    CleanupStack::PopAndDestroy(&notifySecurityEventStatus);
	return TestStepResult();
	}
TVerdict CCTSYIntegrationTestSubscriberInfo0004::doTestStepL()
/**
 * @SYMTestCaseID BA-CTSY-INT-SUBI-0004
 * @SYMFssID BA/CTSY/SUBI-0004
 * @SYMTestCaseDesc Get ICC access caps with a 2G SIM
 * @SYMTestPriority High
 * @SYMTestActions RMobilePhone::GetIccAccessCaps
 * @SYMTestExpectedResults Pass - Correct ICC caps returned.
 * @SYMTestType CIT
 * @SYMTestCaseDependencies live/manual
 *
 * Reason for test: Verify SIM access caps present but not USIM access caps
 *
 * @return - TVerdict code
 */
	{
	//
	// SET UP
	//

	// Insert a 2G Sim. 
	// Boot the phone. 
	DisplayUserInteractionPromptL( _L("Please ensure a 2G SIM has been inserted before starting this test"), ETimeVeryLong );

	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
		
	// Post a notification RMobilePhone::NotifySecurityEvent
	// Triggers CTSY to call down to LTSY to get the ICC type
	// which allows this test to be run.
	RMobilePhone::TMobilePhoneSecurityEvent event;
	TExtEtelRequestStatus notifySecurityEventStatus(phone, EMobilePhoneNotifySecurityEvent);
	CleanupStack::PushL(notifySecurityEventStatus);
	phone.NotifySecurityEvent(notifySecurityEventStatus, event); 
	
	User::After(KOneSecond*5);
	
	//
	// SET UP END
	//

	StartTest();
	
	//
	// TEST START
	//

	// ===  Check ICC access caps ===
	
	// Check RMobilePhone::GetIccAccessCaps returns caps in set of KCapsSimAccessSupported
	// Check RMobilePhone::GetIccAccessCaps returns caps NOT in set of
	// KCapsUSimAccessSupported | KCapsRUimAccessSupported 
	
	TUint32 iccAccessCaps;
	TInt err = phone.GetIccAccessCaps( iccAccessCaps );

	ASSERT_EQUALS(err,KErrNone,_L("RMobilePhone::GetIccAccessCaps failed"))	
	ASSERT_BITS_SET(iccAccessCaps, 
							RMobilePhone::KCapsSimAccessSupported,
							RMobilePhone::KCapsUSimAccessSupported | RMobilePhone::KCapsRUimAccessSupported,
							_L("RMobilePhone::GetIccAccessCaps returned unexpected bits") )
	


							
	//
	// TEST END
	//

    StartCleanup();
    CleanupStack::PopAndDestroy(&notifySecurityEventStatus);	
	return TestStepResult();
	}
示例#20
0
static void analysisTestData(void)
{
	//找最大值
	S_AdjustLedPageBuffer->maxPoint[0] = S_AdjustLedPageBuffer->itemData.testdata.testline.TestPoint[0];

	for(S_AdjustLedPageBuffer->i=0; S_AdjustLedPageBuffer->i<MaxPointLen; S_AdjustLedPageBuffer->i++)
	{
		if(S_AdjustLedPageBuffer->maxPoint[0] < S_AdjustLedPageBuffer->itemData.testdata.testline.TestPoint[S_AdjustLedPageBuffer->i])
		{
			S_AdjustLedPageBuffer->maxPoint[0] = S_AdjustLedPageBuffer->itemData.testdata.testline.TestPoint[S_AdjustLedPageBuffer->i];
			S_AdjustLedPageBuffer->maxPoint[1] = S_AdjustLedPageBuffer->i;
		}
	}
	
	DspPageText();
	
	if(abs(S_AdjustLedPageBuffer->targetValue - S_AdjustLedPageBuffer->maxPoint[0]) < S_AdjustLedPageBuffer->targetRange)
	{
		dspTestStatus("Success\0");
		S_AdjustLedPageBuffer->isTestting = FALSE;
		MotorMoveTo(1, 2, MaxLocation, FALSE);
		return;
	}
	else if(S_AdjustLedPageBuffer->targetValue > S_AdjustLedPageBuffer->maxPoint[0])
	{
		//继续调节
		if(S_AdjustLedPageBuffer->itemData.ledLight < 300)
		{
			S_AdjustLedPageBuffer->itemData.ledLight += 10;
			S_AdjustLedPageBuffer->testCnt++;
			
			if(S_AdjustLedPageBuffer->testCnt <= 11)
			{
				DspNum(0x2605, S_AdjustLedPageBuffer->testCnt, 2);
				DspNum(0x2604, S_AdjustLedPageBuffer->itemData.ledLight, 2);
					
				StartTest(&(S_AdjustLedPageBuffer->itemData));
				
				return;
			}
		}
	}
	else
	{
		//继续调节
		if(S_AdjustLedPageBuffer->itemData.ledLight > 100)
		{
			S_AdjustLedPageBuffer->itemData.ledLight -= 10;
			S_AdjustLedPageBuffer->testCnt++;
			
			if(S_AdjustLedPageBuffer->testCnt <= 10)
			{
				DspNum(0x2605, S_AdjustLedPageBuffer->testCnt, 2);
				DspNum(0x2604, S_AdjustLedPageBuffer->itemData.ledLight, 2);
					
				StartTest(&(S_AdjustLedPageBuffer->itemData));
				
				return;
			}
		}
	}
	
	sprintf(S_AdjustLedPageBuffer->buf, "Fail - %d\0", S_AdjustLedPageBuffer->cardpretestresult);
	DisText(0x2620, S_AdjustLedPageBuffer->buf, strlen(S_AdjustLedPageBuffer->buf)+1);
	S_AdjustLedPageBuffer->isTestting = FALSE;
	
	MotorMoveTo(1, 2, MaxLocation, FALSE);
}
TVerdict CCTSYIntegrationTestSMSPStore0002::doTestStepL()
/**
 * @SYMTestCaseID BA-CTSY-INT-SMSP-0002
 * @SYMFssID BA/CTSY/SMSP-0002
 * @SYMTestCaseDesc Store an SMSP list with multiple entries.
 * @SYMTestPriority High
 * @SYMTestActions This requires an O2 SIM or anyother, which can store multiple entries in SMSP List RMobileSmsMessaging::StoreSmspListL, CRetrieveMobilePhoneSmspList::RetrieveListL
 * @SYMTestExpectedResults Pass - SMSP list stored.
 * @SYMTestType CIT
 * @SYMTestCaseDependencies live/manual
 *
 * Reason for test: Verify list can be stored and retrieved list contains correct entries.
 *
 * @return - TVerdict code
 */
	{

	//
	// SET UP
	//
		
	// Get the RMobileSmsMessaging subsession
	RMobileSmsMessaging& smsMessaging = iEtelSessionMgr.GetSmsMessagingL(KMainServer,KMainPhone,KMainSmsMessaging);
	
	// Ensure RMobileSmsMessaging::GetCaps returns aCaps.iSmsControl caps in set of KCapsSetSmspList | KCapsGetSmspList 
	RMobileSmsMessaging::TMobileSmsCapsV1  smsCaps;
	RMobileSmsMessaging::TMobileSmsCapsV1Pckg smsCapsPckg(smsCaps);
	CHECK_EQUALS_L(smsMessaging.GetCaps(smsCapsPckg),KErrNone, _L("RMobileSmsMessaging::GetCaps returned returned with an error"));
	TUint32 expectedCaps= RMobileSmsMessaging::KCapsSetSmspList | RMobileSmsMessaging::KCapsGetSmspList;
	CHECK_BITS_SET_L(smsCaps.iSmsControl, expectedCaps, KNoUnwantedBits, _L("RMobileSmsMessaging::GetCaps returned with unexpected caps"));

	// Take the backup of SMSP list. 
	TInt listCountAtStart;
	TBackupList backup(*this,smsMessaging);
	CHECK_TRUE_L(backup.BackupL(listCountAtStart), _L("TBackupList::Backup could not backup"));
	CleanupStack::PushL (backup);
	
	//
	// SET UP END
	//
		
	StartTest();
	
	//
	// TEST START
	//
		
	TBuf<130> prompt(_L("You need to insert an O2 SIM before running that test, because O2 SIM can store multiple(3) entries in the list"));
	DisplayUserInteractionPromptL(prompt); // 30 seconds

	// ===  Store SMSP list ===

	// Create a CMobilePhoneSmspList with CMobilePhoneSmspList::NewL 
	CMobilePhoneSmspList* smspList = CMobilePhoneSmspList::NewL();
	CleanupStack::PushL(smspList);
	
	// Create a RMobileSmsMessaging::TMobileSmspEntryV1 entry with the following parameters: 
	RMobileSmsMessaging::TMobileSmspEntryV1 smspEntry;
	     
	     smspEntry.iText = _L("ABCD"); 

	     smspEntry.iValidParams = RMobileSmsMessaging::KDestinationIncluded 

	         | RMobileSmsMessaging::KSCAIncluded 

	         | RMobileSmsMessaging::KProtocolIdIncluded 

	         | RMobileSmsMessaging::KDcsIncluded 

	         | RMobileSmsMessaging::KValidityPeriodIncluded; 

	     smspEntry.iDestination.iTelNumber = _L("+1234567890"); 

	     smspEntry.iDestination.iNumberPlan = RMobilePhone::EIsdnNumberPlan; 

	     smspEntry.iDestination.iTypeOfNumber = RMobilePhone::EInternationalNumber; 

	     smspEntry.iValidityPeriod = 0; 

	     smspEntry.iServiceCentre.iTelNumber = _L("+123"); 

	     smspEntry.iServiceCentre.iNumberPlan = RMobilePhone::EIsdnNumberPlan; 

	     smspEntry.iServiceCentre.iTypeOfNumber = RMobilePhone::EInternationalNumber; 

	     smspEntry.iProtocolId = 2; 

	     smspEntry.iDcs = 4; 

	     smspEntry.iIndex = 1; 
	
	// Add the entry to the CMobilePhoneSmspList list with CMobilePhoneSmspList::AddEntryL 
	smspList->AddEntryL(smspEntry);

	// Create another RMobileSmsMessaging::TMobileSmspEntryV1 entry with the following parameters: 
	RMobileSmsMessaging::TMobileSmspEntryV1 smspEntry2;
		
		smspEntry2.iText = _L("EFGH");
		
		smspEntry2.iValidParams = RMobileSmsMessaging::KDestinationIncluded 

	         | RMobileSmsMessaging::KSCAIncluded 

	         | RMobileSmsMessaging::KProtocolIdIncluded 

	         | RMobileSmsMessaging::KDcsIncluded 

	         | RMobileSmsMessaging::KValidityPeriodIncluded; 
	    
	    smspEntry2.iDestination.iTelNumber = _L("+987654"); 

	    smspEntry2.iDestination.iNumberPlan = RMobilePhone::EIsdnNumberPlan; 

	    smspEntry2.iDestination.iTypeOfNumber = RMobilePhone::EInternationalNumber; 

	    smspEntry2.iValidityPeriod = 0; 

	  	smspEntry2.iServiceCentre.iTypeOfNumber=RMobilePhone::EInternationalNumber; 

	  	smspEntry2.iServiceCentre.iNumberPlan=RMobilePhone:: EIsdnNumberPlan; 

	  	smspEntry2.iServiceCentre.iTelNumber=_L("+456"); 
	  	
	  	smspEntry2.iProtocolId = 2; 

	    smspEntry2.iDcs = 4; 

	    smspEntry2.iIndex = 2; 

	// Add the entry to the CMobilePhoneSmspList list with CMobilePhoneSmspList::AddEntryL 
	smspList->AddEntryL(smspEntry2);
		
	// Create another RMobileSmsMessaging::TMobileSmspEntryV1 entry with the following parameters: 
	RMobileSmsMessaging::TMobileSmspEntryV1 smspEntry3;
	  	
	  	smspEntry3.iText = _L("IJKL"); 

        smspEntry3.iValidParams = RMobileSmsMessaging::KDestinationIncluded 

	         | RMobileSmsMessaging::KSCAIncluded 

	         | RMobileSmsMessaging::KProtocolIdIncluded 

	         | RMobileSmsMessaging::KDcsIncluded 

	         | RMobileSmsMessaging::KValidityPeriodIncluded; 

        smspEntry3.iDestination.iTelNumber = _L("+12456"); 

	    smspEntry3.iDestination.iNumberPlan = RMobilePhone::EIsdnNumberPlan; 

	    smspEntry3.iDestination.iTypeOfNumber = RMobilePhone::EInternationalNumber; 

	    smspEntry3.iValidityPeriod = 0; 

	    smspEntry3.iServiceCentre.iTelNumber = _L("+789"); 

	    smspEntry3.iServiceCentre.iNumberPlan = RMobilePhone::EIsdnNumberPlan; 

	    smspEntry3.iServiceCentre.iTypeOfNumber = RMobilePhone::EInternationalNumber; 

	    smspEntry3.iProtocolId = 2; 

	    smspEntry3.iDcs = 4; 

	   	smspEntry3.iIndex = 3; 
	     
	// Add the entry to the CMobilePhoneSmspList list with CMobilePhoneSmspList::AddEntryL 
	smspList->AddEntryL(smspEntry3);

	// Post notification for RMobileSmsMessaging::NotifySmspListChange
	TExtEtelRequestStatus notifySmspListChangeStatus(smsMessaging, EMobileSmsMessagingNotifySmspListChange);
	CleanupStack::PushL(notifySmspListChangeStatus);
	smsMessaging.NotifySmspListChange(notifySmspListChangeStatus);
	
	// Store the empty SMSP list with RMobileSmsMessaging::StoreSmspListL 
	TExtEtelRequestStatus storeSmspListStatus(smsMessaging, EMobileSmsMessagingStoreSmspList);
	CleanupStack::PushL(storeSmspListStatus);
	smsMessaging.StoreSmspListL(storeSmspListStatus,smspList);
	ASSERT_EQUALS(WaitForRequestWithTimeOut(storeSmspListStatus, ETimeMedium),KErrNone, _L("RMobileSmsMessaging::StoreSmspListL timed out"));
	ASSERT_EQUALS(storeSmspListStatus.Int(), KErrNone, _L("RMobileSmsMessaging::StoreSmspListL returned with an error"));		
	
	// Check RMobileSmsMessaging::NotifySmspListChange completes with KErrNone		
	TInt expectedStatus = KErrNone;
	iSmsMessagingTestHelper.WaitForMobileSmsMessagingNotifySmspListChange(notifySmspListChangeStatus,expectedStatus);
	
	// ===  Retrieve list and check it is the same as the stored list ===

	// Use the helper class for CRetrieveMobilePhoneSmspList to retrieve the SMSP list. 
	TInt err=0;
	CRetrieveMobilePhoneSmspListExec* smspListExec = CRetrieveMobilePhoneSmspListHelper::NewL(smsMessaging);	
	CleanupStack::PushL(smspListExec);
	CMobilePhoneSmspList* mobileSmspList = smspListExec->DoGetList(err);
	ASSERT_EQUALS(err, KErrNone, _L("CRetrieveMobilePhoneSmspList::Start returned with an error"));

	// Check CRetrieveMobilePhoneSmspList::Enumerate returns 3 using the helper class
 	TInt listEnteries=mobileSmspList->Enumerate();
	ASSERT_EQUALS(listEnteries, 3, _L("CRetrieveMobilePhoneSmspList::Enumerate did not return the correct number of enteries"));
	
	// Check the entry in the CMobilePhoneSmspList is the same the entry stored
   	RMobileSmsMessaging::TMobileSmspEntryV1 item;
   	RMobileSmsMessaging::TMobileSmspEntryV1 tempSmspEntry;
	for(TInt i=0;i<listEnteries;i++)
		{
		item=mobileSmspList->GetEntryL(i);
		if(i==0)
		tempSmspEntry=smspEntry;
		else if(i==1)
		tempSmspEntry=smspEntry2;
		else
		tempSmspEntry=smspEntry3;
		ASSERT_TRUE(CompareEntries(tempSmspEntry,item),_L("Comparison of stroed enteries failed"));
		}
	
	//
	// TEST END
	//

    StartCleanup();
    
    // Pop:
    // backup
	// smspListExec;
 	// storeSmspListStatus
	// notifySmspListChangeStatus);	
	// smspList
    CleanupStack::PopAndDestroy(5, &backup);
    	
    return TestStepResult();
	}
TVerdict CCTSYIntegrationTestSMSPStore0001::doTestStepL()
/**
 * @SYMTestCaseID BA-CTSY-INT-SMSP-0001
 * @SYMFssID BA/CTSY/SMSP-0001
 * @SYMTestCaseDesc Store and retrieve a SMSP list.
 * @SYMTestPriority High
 * @SYMTestActions RMobileSmsMessaging::StoreSmspListL, CRetrieveMobilePhoneSmspList::Start, CMobilePhoneSmspList::NewL, CRetrieveMobilePhoneSmspList::NewL, CMobilePhoneSmspList::AddEntryL, RMobileSmsMessaging::NotifySmspListChange
 * @SYMTestExpectedResults Pass - SMSP list stored and retrieved correctly.
 * @SYMTestType CIT
 * @SYMTestCaseDependencies live/automatic
 *
 * Reason for test: Verify list can be stored and retrieved list contains correct entries.
 *
 * @return - TVerdict code
 */
	{

	//
	// SET UP
	//
	
	// Get the RMobileSmsMessaging subsession
	RMobileSmsMessaging& smsMessaging = iEtelSessionMgr.GetSmsMessagingL(KMainServer,KMainPhone,KMainSmsMessaging);
	
	// Ensure RMobileSmsMessaging::GetCaps returns aCaps.iSmsControl caps in set of KCapsSetSmspList | KCapsGetSmspList 
	RMobileSmsMessaging::TMobileSmsCapsV1  smsCaps;
	RMobileSmsMessaging::TMobileSmsCapsV1Pckg smsCapsPckg(smsCaps);
	CHECK_EQUALS_L(smsMessaging.GetCaps(smsCapsPckg),KErrNone, _L("RMobileSmsMessaging::GetCaps returned returned with an error"));
	TUint32 expectedCaps= RMobileSmsMessaging::KCapsSetSmspList | RMobileSmsMessaging::KCapsGetSmspList;
	CHECK_BITS_SET_L(smsCaps.iSmsControl, expectedCaps, KNoUnwantedBits, _L("RMobileSmsMessaging::GetCaps returned with unexpected caps"));
	
	// Take the backup of the SMSP list. 
	TInt listCountAtStart;
	TBackupList backup(*this,smsMessaging);
	CHECK_TRUE_L(backup.BackupL(listCountAtStart), _L("TBackupList::Backup could not backup"));
	CleanupStack::PushL (backup);
	
	//
	// SET UP END
	//
	
	StartTest();
	
	//
	// TEST START
	//
	
	// ===  Store SMSP list ===

	// Create a CMobilePhoneSmspList with CMobilePhoneSmspList::NewL 
   	CMobilePhoneSmspList* smspList = CMobilePhoneSmspList::NewL();
	CleanupStack::PushL(smspList); 
	
	// Create a RMobileSmsMessaging::TMobileSmspEntryV1 entry with the following parameters: 
	RMobileSmsMessaging::TMobileSmspEntryV1 smspEntry;

	     smspEntry.iText = _L("VODAFONE"); 
	 	 
	     smspEntry.iValidParams = RMobileSmsMessaging::KSCAIncluded 

	         | RMobileSmsMessaging::KProtocolIdIncluded 

	         | RMobileSmsMessaging::KDcsIncluded 

	         | RMobileSmsMessaging::KValidityPeriodIncluded; 


	     smspEntry.iDestination.iTelNumber = _L(""); 
		
	     smspEntry.iDestination.iNumberPlan = RMobilePhone::EUnknownNumberingPlan; 
		
	     smspEntry.iDestination.iTypeOfNumber = RMobilePhone::EUnknownNumber; 
		
	     smspEntry.iValidityPeriod = 183; 
	
	     smspEntry.iServiceCentre.iTelNumber = _L("+441632960000"); 
	
	     smspEntry.iServiceCentre.iNumberPlan = RMobilePhone::EIsdnNumberPlan; 
	
	     smspEntry.iServiceCentre.iTypeOfNumber = RMobilePhone::EInternationalNumber; 

	     smspEntry.iProtocolId = 0; 

	     smspEntry.iDcs = 0; 

	     smspEntry.iIndex = 1; 

	// Add the entry to the CMobilePhoneSmspList list with CMobilePhoneSmspList::AddEntryL 
	smspList->AddEntryL(smspEntry);
	
	// Post notification for RMobileSmsMessaging::NotifySmspListChange
	TExtEtelRequestStatus notifySmspListChangeStatus(smsMessaging, EMobileSmsMessagingNotifySmspListChange);
	CleanupStack::PushL(notifySmspListChangeStatus);
	smsMessaging.NotifySmspListChange(notifySmspListChangeStatus);

	// This is deliberate action to open a session because the API in Etelmm allocates memory
	// The Session Manager should be used in all other places.
	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
	RMobileSmsMessaging smsMessagingStore;
	User::LeaveIfError(smsMessagingStore.Open(phone));
	
	// Store the empty SMSP list with RMobileSmsMessaging::StoreSmspListL 
	TExtEtelRequestStatus storeSmspListStatus(smsMessaging, EMobileSmsMessagingStoreSmspList);
	CleanupStack::PushL(storeSmspListStatus);
	smsMessagingStore.StoreSmspListL(storeSmspListStatus,smspList);
	ASSERT_EQUALS(WaitForRequestWithTimeOut(storeSmspListStatus, ETimeMedium),KErrNone, _L("RMobileSmsMessaging::StoreSmspListL timed out"));
	ASSERT_EQUALS(storeSmspListStatus.Int(), KErrNone, _L("RMobileSmsMessaging::StoreSmspListL returned with an error"));		
	smsMessagingStore.Close();
	
	// Check RMobileSmsMessaging::NotifySmspListChange completes with KErrNone		
	TInt expectedStatus = KErrNone;
	iSmsMessagingTestHelper.WaitForMobileSmsMessagingNotifySmspListChange(notifySmspListChangeStatus,expectedStatus);
		
	// ===  Retrieve list and check it is the same as the stored list ===

	// Use the helper class for CRetrieveMobilePhoneSmspList to retrieve the SMSP list. 
	TInt err=0;
	CRetrieveMobilePhoneSmspListExec* smspListExec = CRetrieveMobilePhoneSmspListHelper::NewL(smsMessaging);	
	CleanupStack::PushL(smspListExec);
	CMobilePhoneSmspList* mobileSmspList = smspListExec->DoGetList(err);
	ASSERT_EQUALS(err, KErrNone, _L("CRetrieveMobilePhoneSmspList::Start returned with an error"));

 	//	Check CRetrieveMobilePhoneSmspList::Enumerate returns 1 using the helper class function
	TInt listEntries=mobileSmspList->Enumerate();
	if(listCountAtStart==0)
		{
		ASSERT_EQUALS(listEntries, 1, _L("CRetrieveMobilePhoneSmspList::Enumerate did not return one entry as expected"));
		}
   	else
   		{
   		ASSERT_EQUALS(listCountAtStart,listEntries, _L("CRetrieveMobilePhoneSmspList::Enumerate did not return number of entries as expected"));
   		}
  
   	// 	Check the entry in the CMobilePhoneSmspList is the same the entry stored
   	RMobileSmsMessaging::TMobileSmspEntryV1 item;
   	item=mobileSmspList->GetEntryL(0); // zero is the first index in retrieval list
   	ASSERT_TRUE(CompareEntries(item,smspEntry),_L("Comparison of stroed enteries failed"));
	  	 
   	//
	// TEST END
	//
		   	
    StartCleanup();
   
    // Pop :
    // backup
    // smspList
    // notifySmspListChangeStatus
	// storeSmspListStatus
	// smspListExec;
    CleanupStack::PopAndDestroy(5, &backup);
      
    return TestStepResult();
	
	}
TVerdict CCTSYIntegrationTestSMSPStore0007::doTestStepL()
/**
 * @SYMTestCaseID BA-CTSY-INT-SMSP-0007
 * @SYMFssID BA/CTSY/SMSP-0007
 * @SYMTestCaseDesc Store an SMSP list that is too long.
 * @SYMTestPriority High
 * @SYMTestActions RMobileSmsMessaging::StoreSmspListL, CRetrieveMobilePhoneSmspList::Start, CMobilePhoneSmspList::NewL, CMobilePhoneSmspList::AddEntryL
 * @SYMTestExpectedResults Pass - KErrArgument returned.
 * @SYMTestType CIT
 * @SYMTestCaseDependencies live/automatic
 *
 * Reason for test: Verify error is returned on storing.
 *
 * @return - TVerdict code
 */
	{

	//
	// SET UP
	//

	// Get the RMobileSmsMessaging subsession 
	RMobileSmsMessaging& smsMessaging = iEtelSessionMgr.GetSmsMessagingL(KMainServer,KMainPhone,KMainSmsMessaging);

	// Ensure RMobileSmsMessaging::GetCaps returns aCaps.iSmsControl caps in set of KCapsSetSmspList | KCapsGetSmspList 
	RMobileSmsMessaging::TMobileSmsCapsV1  smsCaps;
	RMobileSmsMessaging::TMobileSmsCapsV1Pckg smsCapsPckg(smsCaps);
	CHECK_EQUALS_L(smsMessaging.GetCaps(smsCapsPckg),KErrNone, _L("RMobileSmsMessaging::GetCaps returned returned with an error"));
	TUint32 expectedCaps= RMobileSmsMessaging::KCapsSetSmspList | RMobileSmsMessaging::KCapsGetSmspList;
	CHECK_BITS_SET_L(smsCaps.iSmsControl, expectedCaps, KNoUnwantedBits, _L("RMobileSmsMessaging::GetCaps returned with unexpected caps"));

	// Take the backup of the SMSP list. 
	TInt listCountAtStart;
	TBackupList backup(*this,smsMessaging);
	CHECK_TRUE_L(backup.BackupL(listCountAtStart), _L("TBackupList::Backup Could not backup"));
	CleanupStack::PushL (backup);
	
	//
	// SET UP END
	//
	
	StartTest();
	
	//
	// TEST START
	//
	
	// ===  Store SMSP list ===

	// Create a CMobilePhoneSmspList with CMobilePhoneSmspList::NewL 
	CMobilePhoneSmspList* smspList = CMobilePhoneSmspList::NewL();
	CleanupStack::PushL(smspList);
	
	// Create a RMobileSmsMessaging::TMobileSmspEntryV1 entry with the following parameters: 
	RMobileSmsMessaging::TMobileSmspEntryV1 smspEntry;
	     
	     smspEntry.iText = _L("ABCD"); 

	     smspEntry.iValidParams = RMobileSmsMessaging::KDestinationIncluded 

	         | RMobileSmsMessaging::KSCAIncluded 

	         | RMobileSmsMessaging::KProtocolIdIncluded 

	         | RMobileSmsMessaging::KDcsIncluded 

	         | RMobileSmsMessaging::KValidityPeriodIncluded; 

	     smspEntry.iDestination.iTelNumber = _L("+1234567890"); 

	     smspEntry.iDestination.iNumberPlan = RMobilePhone::EIsdnNumberPlan; 

	     smspEntry.iDestination.iTypeOfNumber = RMobilePhone::EInternationalNumber; 

	     smspEntry.iValidityPeriod = 0; 

	     smspEntry.iServiceCentre.iTelNumber = _L("+123"); 

	     smspEntry.iServiceCentre.iNumberPlan = RMobilePhone::EIsdnNumberPlan; 

	     smspEntry.iServiceCentre.iTypeOfNumber = RMobilePhone::EInternationalNumber; 

	     smspEntry.iProtocolId = 2; 

	     smspEntry.iDcs = 4; 

	     smspEntry.iIndex = 1; 
	
	// Add the entry to the CMobilePhoneSmspList list with CMobilePhoneSmspList::AddEntryL 
	smspList->AddEntryL(smspEntry);

	// Create another RMobileSmsMessaging::TMobileSmspEntryV1 entry with the following parameters: 
	RMobileSmsMessaging::TMobileSmspEntryV1 smspEntry2;
		
		smspEntry2.iText = _L("EFGH");
		
		smspEntry2.iValidParams = RMobileSmsMessaging::KDestinationIncluded 

	         | RMobileSmsMessaging::KSCAIncluded 

	         | RMobileSmsMessaging::KProtocolIdIncluded 

	         | RMobileSmsMessaging::KDcsIncluded 

	         | RMobileSmsMessaging::KValidityPeriodIncluded; 
	    
	    smspEntry2.iDestination.iTelNumber = _L("+987654"); 

	    smspEntry2.iDestination.iNumberPlan = RMobilePhone::EIsdnNumberPlan; 

	    smspEntry2.iDestination.iTypeOfNumber = RMobilePhone::EInternationalNumber; 

	    smspEntry2.iValidityPeriod = 0; 

	  	smspEntry2.iServiceCentre.iTypeOfNumber=RMobilePhone::EInternationalNumber; 

	  	smspEntry2.iServiceCentre.iNumberPlan=RMobilePhone:: EIsdnNumberPlan; 

	  	smspEntry2.iServiceCentre.iTelNumber=_L("+456"); 
	  	
	  	smspEntry2.iProtocolId = 2; 

	    smspEntry2.iDcs = 4; 

	    smspEntry2.iIndex = 2; 

	// Add the entry to the CMobilePhoneSmspList list with CMobilePhoneSmspList::AddEntryL 
	smspList->AddEntryL(smspEntry2);
		
	// Create another RMobileSmsMessaging::TMobileSmspEntryV1 entry with the following parameters: 
	RMobileSmsMessaging::TMobileSmspEntryV1 smspEntry3;
	  	
	  	smspEntry3.iText = _L("IJKL"); 

        smspEntry3.iValidParams = RMobileSmsMessaging::KDestinationIncluded 

	         | RMobileSmsMessaging::KSCAIncluded 

	         | RMobileSmsMessaging::KProtocolIdIncluded 

	         | RMobileSmsMessaging::KDcsIncluded 

	         | RMobileSmsMessaging::KValidityPeriodIncluded; 

        smspEntry3.iDestination.iTelNumber = _L("+12456"); 

	    smspEntry3.iDestination.iNumberPlan = RMobilePhone::EIsdnNumberPlan; 

	    smspEntry3.iDestination.iTypeOfNumber = RMobilePhone::EInternationalNumber; 

	    smspEntry3.iValidityPeriod = 0; 

	    smspEntry3.iServiceCentre.iTelNumber = _L("+789"); 

	    smspEntry3.iServiceCentre.iNumberPlan = RMobilePhone::EIsdnNumberPlan; 

	    smspEntry3.iServiceCentre.iTypeOfNumber = RMobilePhone::EInternationalNumber; 

	    smspEntry3.iProtocolId = 2; 

	    smspEntry3.iDcs = 4; 

	   	smspEntry3.iIndex = 3; 
	     
	// Add the entry to the CMobilePhoneSmspList list with CMobilePhoneSmspList::AddEntryL 
	smspList->AddEntryL(smspEntry3);
	
	// Create another RMobileSmsMessaging::TMobileSmspEntryV1 entry with the following parameters: 
	RMobileSmsMessaging::TMobileSmspEntryV1 smspEntry4;
	  	
	  	smspEntry4.iText = _L("MNOP"); 

        smspEntry4.iValidParams = RMobileSmsMessaging::KDestinationIncluded 

	         | RMobileSmsMessaging::KSCAIncluded 

	         | RMobileSmsMessaging::KProtocolIdIncluded 

	         | RMobileSmsMessaging::KDcsIncluded 

	         | RMobileSmsMessaging::KValidityPeriodIncluded; 

        smspEntry4.iDestination.iTelNumber = _L("+12456"); 

	    smspEntry4.iDestination.iNumberPlan = RMobilePhone::EIsdnNumberPlan; 

	    smspEntry4.iDestination.iTypeOfNumber = RMobilePhone::EInternationalNumber; 

	    smspEntry4.iValidityPeriod = 0; 

	    smspEntry4.iServiceCentre.iTelNumber = _L("+789"); 

	    smspEntry4.iServiceCentre.iNumberPlan = RMobilePhone::EIsdnNumberPlan; 

	    smspEntry4.iServiceCentre.iTypeOfNumber = RMobilePhone::EInternationalNumber; 

	    smspEntry4.iProtocolId = 2; 

	    smspEntry4.iDcs = 4; 

	   	smspEntry4.iIndex = 4; 
	     
	// Add the entry to the CMobilePhoneSmspList list with CMobilePhoneSmspList::AddEntryL 
	smspList->AddEntryL(smspEntry4);

	// Store the empty SMSP list with RMobileSmsMessaging::StoreSmspListL 
	TExtEtelRequestStatus storeSmspListStatus(smsMessaging, EMobileSmsMessagingStoreSmspList);
	CleanupStack::PushL(storeSmspListStatus);
	smsMessaging.StoreSmspListL(storeSmspListStatus,smspList);
	ASSERT_EQUALS(WaitForRequestWithTimeOut(storeSmspListStatus, ETimeMedium),KErrNone, _L("RMobileSmsMessaging::StoreSmspListL timed out"));
	
	// Check KErrArgument is returned
	ASSERT_EQUALS(storeSmspListStatus.Int(), KErrArgument, _L("RMobileSmsMessaging::StoreSmspListL did not return with an error"));		
	
	//
	// TEST END
	//

    StartCleanup();
    
	// Pop:
	// backup
    // storeSmspListStatus
    // smspList
	CleanupStack::PopAndDestroy(3,&backup);
		
	return TestStepResult();
	}
void
DcfManagerTest::DoRun (void)
{
  //  0      3       4    5      8       9  10   12
  //  | sifs | aifsn | tx | sifs | aifsn |   | tx |
  //
  StartTest (1, 3, 10);
  AddDcfState (1);
  AddAccessRequest (1, 1, 4, 0);
  AddAccessRequest (10, 2, 10, 0);
  EndTest ();
  // Check that receiving inside SIFS shall be cancelled properly:
  //  0      3       4    5      8     9     12       13 14
  //  | sifs | aifsn | tx | sifs | ack | sifs | aifsn |  |tx |
  //
  StartTest (1, 3, 10);
  AddDcfState (1);
  AddAccessRequest (1, 1, 4, 0);
  AddRxInsideSifsEvt (6, 10);
  AddTxEvt (8, 1);
  AddAccessRequest (14, 2, 14, 0);
  EndTest ();


  // The test below mainly intends to test the case where the medium
  // becomes busy in the middle of a backoff slot: the backoff counter
  // must not be decremented for this backoff slot. This is the case
  // below for the backoff slot starting at time 78us.
  //
  //  20          60     66      70        74        78  80    100     106      110      114      118   120
  //   |    rx     | sifs | aifsn | bslot0  | bslot1  |   | rx   | sifs  |  aifsn | bslot2 | bslot3 | tx  |
  //        |
  //       30 request access. backoff slots: 4
  StartTest (4, 6, 10);
  AddDcfState (1);
  AddRxOkEvt (20, 40);
  AddRxOkEvt (80, 20);
  AddAccessRequest (30, 2, 118, 0);
  ExpectCollision (30, 4, 0); // backoff: 4 slots
  EndTest ();

  // Test the case where the backoff slots is zero.
  //
  //  20          60     66      70   72
  //   |    rx     | sifs | aifsn | tx |
  //        |
  //       30 request access. backoff slots: 0
  StartTest (4, 6, 10);
  AddDcfState (1);
  AddRxOkEvt (20, 40);
  AddAccessRequest (30, 2, 70, 0);
  ExpectCollision (30, 0, 0); // backoff: 0 slots
  EndTest ();
  // Test shows when two frames are received without interval between
  // them:
  //  20          60         100   106     110  112
  //   |    rx     |    rx     |sifs | aifsn | tx |
  //        |
  //       30 request access. backoff slots: 0

  StartTest (4, 6, 10);
  AddDcfState (1);
  AddRxOkEvt (20, 40);
  AddRxOkEvt (60, 40);
  AddAccessRequest (30, 2, 110, 0);
  ExpectCollision (30, 0, 0); // backoff: 0 slots
  EndTest ();


  // The test below is subject to some discussion because I am
  // not sure I understand the intent of the spec here.
  // i.e., what happens if you make a request to get access
  // to the medium during the difs idle time after a busy period ?
  // do you need to start a backoff ? Or do you need to wait until
  // the end of difs and access the medium ?
  // Here, we wait until the end of difs and access the medium.
  //
  //  20    60     66      70   72
  //   | rx  | sifs | aifsn | tx |
  //           |
  //          62 request access.
  //
  StartTest (4, 6, 10);
  AddDcfState (1);
  AddRxOkEvt (20, 40);
  AddAccessRequest (62, 2, 70, 0);
  EndTest ();


  // Test an EIFS
  //
  //  20          60     66           76             86       90       94       98       102   106
  //   |    rx     | sifs | acktxttime | sifs + aifsn | bslot0 | bslot1 | bslot2 | bslot3 | tx |
  //        |      | <------eifs------>|
  //       30 request access. backoff slots: 4
  StartTest (4, 6, 10);
  AddDcfState (1);
  AddRxErrorEvt (20, 40);
  AddAccessRequest (30, 2, 102, 0);
  ExpectCollision (30, 4, 0); // backoff: 4 slots
  EndTest ();

  // Test an EIFS which is interupted by a successfull transmission.
  //
  //  20          60      66  69     75     81      85       89       93       97      101  103
  //   |    rx     | sifs  |   |  rx  | sifs | aifsn | bslot0 | bslot1 | bslot2 | bslot3 | tx |
  //        |      | <--eifs-->|
  //       30 request access. backoff slots: 4
  StartTest (4, 6, 10);
  AddDcfState (1);
  AddRxErrorEvt (20, 40);
  AddAccessRequest (30, 2, 101, 0);
  ExpectCollision (30, 4, 0); // backoff: 4 slots
  AddRxOkEvt (69, 6);
  EndTest ();


  // Test two DCFs which suffer an internal collision. the first DCF has a higher
  // priority than the second DCF.
  //
  //      20          60      66      70       74       78    88
  // DCF0  |    rx     | sifs  | aifsn | bslot0 | bslot1 | tx  |
  // DCF1  |    rx     | sifs  | aifsn | aifsn  | aifsn  |     | sifs | aifsn | aifsn | aifsn | bslot |  tx  |
  //                                                                 94      98     102     106     110    112
  StartTest (4, 6, 10);
  AddDcfState (1); // high priority DCF
  AddDcfState (3); // low priority DCF
  AddRxOkEvt (20, 40);
  AddAccessRequest (30, 10, 78, 0);
  ExpectCollision (30, 2, 0); // backoff: 2 slot

  AddAccessRequest (40, 2, 110, 1);
  ExpectCollision (40, 0, 1); // backoff: 0 slot
  ExpectInternalCollision (78, 1, 1); // backoff: 1 slot
  EndTest ();

  // Test of AckTimeout handling: First queue requests access and ack procedure fails,
  // inside the ack timeout second queue with higher priority requests access.
  //
  //            20           40      50     60  66      76
  // DCF0 - low  |     tx     | ack timeout |sifs|       |
  // DCF1 - high |                    |     |sifs|  tx   |
  //                                  ^ request access
  StartTest (4, 6, 10);
  AddDcfState (2); // high priority DCF
  AddDcfState (0); // low priority DCF
  AddAccessRequestWithAckTimeout (20, 20, 20, 0);
  AddAccessRequest (50, 10, 66, 1);
  EndTest ();

  // Test of AckTimeout handling:
  //
  // First queue requests access and ack is 2 us delayed (got ack interval at the picture),
  // inside this interval second queue with higher priority requests access.
  //
  //            20           40  41   42    48      58
  // DCF0 - low  |     tx     |got ack |sifs|       |
  // DCF1 - high |                |    |sifs|  tx   |
  //                              ^ request access
  StartTest (4, 6, 10);
  AddDcfState (2); // high priority DCF
  AddDcfState (0); // low priority DCF
  AddAccessRequestWithSuccessfullAck (20, 20, 20, 2, 0);
  AddAccessRequest (41, 10, 48, 1);
  EndTest ();

  //Repeat the same but with one queue:
  //            20           40  41   42    48      58
  // DCF0 - low  |     tx     |got ack |sifs|       |
  //                              ^ request access
  StartTest (4, 6, 10);
  AddDcfState (2);
  AddAccessRequestWithSuccessfullAck (20, 20, 20, 2, 0);
  AddAccessRequest (41, 10, 56, 0);
  EndTest ();

  //Repeat the same when ack was delayed:
  //and request the next access before previous tx end:
  //            20       39  40       42              64      74
  // DCF0 - low  |     tx     |got ack |sifs + 4 * slot|       |
  //                      ^ request access
  StartTest (4, 6, 10);
  AddDcfState (2);
  AddAccessRequestWithSuccessfullAck (20, 20, 20, 2, 0);
  AddAccessRequest (39, 10, 64, 0);
  ExpectCollision (39, 2, 0); // backoff: 2 slot
  EndTest ();

  //
  // test simple NAV count. This scenario modelizes a simple DATA+ACK handshake
  // where the data rate used for the ACK is higher than expected by the DATA source
  // so, the data exchange completes before the end of nav.
  //
  StartTest (4, 6, 10);
  AddDcfState (1);
  AddRxOkEvt (20, 40);
  AddNavStart (60, 15);
  AddRxOkEvt (66, 5);
  AddNavStart (71, 0);
  AddAccessRequest (30, 10, 93, 0);
  ExpectCollision (30, 2, 0); // backoff: 2 slot
  EndTest ();

  //
  // test more complex NAV handling by a CF-poll. This scenario modelizes a
  // simple DATA+ACK handshake interrupted by a CF-poll which resets the
  // NAV counter.
  //
  StartTest (4, 6, 10);
  AddDcfState (1);
  AddRxOkEvt (20, 40);
  AddNavStart (60, 15);
  AddRxOkEvt (66, 5);
  AddNavReset (71, 2);
  AddAccessRequest (30, 10, 91, 0);
  ExpectCollision (30, 2, 0); // backoff: 2 slot
  EndTest ();


  StartTest (4, 6, 10);
  AddDcfState (2);
  AddRxOkEvt (20, 40);
  AddAccessRequest (80, 10, 80, 0);
  EndTest ();


  StartTest (4, 6, 10);
  AddDcfState (2);
  AddRxOkEvt (20, 40);
  AddRxOkEvt (78, 8);
  AddAccessRequest (30, 50, 108, 0);
  ExpectCollision (30, 3, 0); // backoff: 3 slots
  EndTest ();


  // Channel switching tests

  //  0          20     23      24   25
  //  | switching | sifs | aifsn | tx |
  //                |
  //               21 access request.
  StartTest (1, 3, 10);
  AddDcfState (1);
  AddSwitchingEvt (0,20);
  AddAccessRequest (21, 1, 24, 0);
  EndTest ();

  //  20          40       50     53      54   55
  //   | switching |  busy  | sifs | aifsn | tx |
  //         |          |
  //        30 busy.   45 access request.
  //
  StartTest (1, 3, 10);
  AddDcfState (1);
  AddSwitchingEvt (20,20);
  AddCcaBusyEvt (30,20);
  AddAccessRequest (45, 1, 54, 0);
  EndTest ();

  //  20     30          50     53      54   55
  //   |  rx  | switching | sifs | aifsn | tx |
  //                        |
  //                       51 access request.
  //
  StartTest (1, 3, 10);
  AddDcfState (1);
  AddRxStartEvt (20,40);
  AddSwitchingEvt (30,20);
  AddAccessRequest (51, 1, 54, 0);
  EndTest ();

  //  20     30          50     53      54   55
  //   | busy | switching | sifs | aifsn | tx |
  //                        |
  //                       51 access request.
  //
  StartTest (1, 3, 10);
  AddDcfState (1);
  AddCcaBusyEvt (20,40);
  AddSwitchingEvt (30,20);
  AddAccessRequest (51, 1, 54, 0);
  EndTest ();

  //  20      30          50     53      54   55
  //   |  nav  | switching | sifs | aifsn | tx |
  //                        |
  //                       51 access request.
  //
  StartTest (1, 3, 10);
  AddDcfState (1);
  AddNavStart (20,40);
  AddSwitchingEvt (30,20);
  AddAccessRequest (51, 1, 54, 0);
  EndTest ();

  //  20      40             50          55     58      59   60
  //   |  tx   | ack timeout  | switching | sifs | aifsn | tx |
  //                  |                     |
  //                 45 access request.    56 access request.
  //
  StartTest (1, 3, 10);
  AddDcfState (1);
  AddAccessRequestWithAckTimeout (20, 20, 20, 0);
  AddAccessRequest (45, 1, 50, 0);
  AddSwitchingEvt (50,5);
  AddAccessRequest (56, 1, 59, 0);
  EndTest ();

  //  20         60     66      70       74       78  80         100    106     110  112
  //   |    rx    | sifs | aifsn | bslot0 | bslot1 |   | switching | sifs | aifsn | tx |
  //        |                                                        |
  //       30 access request.                                      101 access request.
  //
  StartTest (4, 6, 10);
  AddDcfState (1);
  AddRxOkEvt (20,40);
  AddAccessRequest (30, 2, 80, 0);
  ExpectCollision (30, 4, 0); // backoff: 4 slots
  AddSwitchingEvt (80,20);
  AddAccessRequest (101, 2, 110, 0);
  EndTest ();
}
TVerdict CCTSYIntegrationTestSMSPStore0003::doTestStepL()
/**
 * @SYMTestCaseID BA-CTSY-INT-SMSP-0003
 * @SYMFssID BA/CTSY/SMSP-0003
 * @SYMTestCaseDesc Store an empty SMSP list.
 * @SYMTestPriority High
 * @SYMTestActions CMobilePhoneSmspList::NewL, CRetrieveMobilePhoneSmspList::NewL, RMobileSmsMessaging::StoreSmspListL, CRetrieveMobilePhoneSmspList::Start
 * @SYMTestExpectedResults Pass - Empty SMSP list is not stored and retrieved list is not empty.
 * @SYMTestType CIT
 * @SYMTestCaseDependencies live/automatic
 *
 * Reason for test: Verify error is returned.
 *
 * @return - TVerdict code
 */
	{

	//
	// SET UP
	//
	
	// Get the RMobileSmsMessaging subsession
	RMobileSmsMessaging& smsMessaging = iEtelSessionMgr.GetSmsMessagingL(KMainServer,KMainPhone,KMainSmsMessaging);

	// Ensure RMobileSmsMessaging::GetCaps returns aCaps.iSmsControl caps in set of KCapsSetSmspList | KCapsGetSmspList 
	RMobileSmsMessaging::TMobileSmsCapsV1  smsCaps;
	RMobileSmsMessaging::TMobileSmsCapsV1Pckg smsCapsPckg(smsCaps);
	CHECK_EQUALS_L(smsMessaging.GetCaps(smsCapsPckg),KErrNone, _L("RMobileSmsMessaging::GetCaps returned returned with an error"));
	TUint32 expectedCaps= RMobileSmsMessaging::KCapsSetSmspList | RMobileSmsMessaging::KCapsGetSmspList;
	CHECK_BITS_SET_L(smsCaps.iSmsControl, expectedCaps, KNoUnwantedBits, _L("RMobileSmsMessaging::GetCaps returned with unexpected caps"));
		
	//
	// SET UP END
	//

	StartTest();
	
	//
	// TEST START
	//
	
	// ===  Store empty list ===
	
	// Create a CMobilePhoneSmspList with CMobilePhoneSmspList::NewL 
	CMobilePhoneSmspList* smspList = CMobilePhoneSmspList::NewL();
	CleanupStack::PushL(smspList);
		
	// Post notification for RMobileSmsMessaging::NotifySmspListChange
	TExtEtelRequestStatus notifySmspListChangeStatus(smsMessaging, EMobileSmsMessagingNotifySmspListChange);
	CleanupStack::PushL(notifySmspListChangeStatus);
	smsMessaging.NotifySmspListChange(notifySmspListChangeStatus);

	// This is deliberate action to open a session because the API in Etelmm allocates memory
	// The Session Manager should be used in all other places.
	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
	RMobileSmsMessaging smsMessagingStore;
 	smsMessagingStore.Open(phone);
 		
	// Store the empty SMSP list with RMobileSmsMessaging::StoreSmspListL cause Error 
	TExtEtelRequestStatus storeSmspListStatus(smsMessaging, EMobileSmsMessagingStoreSmspList);
	CleanupStack::PushL(storeSmspListStatus);
	smsMessaging.StoreSmspListL(storeSmspListStatus,smspList);
	ASSERT_EQUALS(WaitForRequestWithTimeOut(storeSmspListStatus, ETimeMedium),KErrNone, _L("RMobileSmsMessaging::StoreSmspListL timed out"));
	ASSERT_TRUE(storeSmspListStatus.Int()!= KErrNone, _L("RMobileSmsMessaging::StoreSmspListL did not return an error"))		
	ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 10012);
	smsMessagingStore.Close();
	
	// Check RMobileSmsMessaging::NotifySmspListChange completes with KErrNone
	TInt expectedStatus = KErrNone;
	iSmsMessagingTestHelper.WaitForMobileSmsMessagingNotifySmspListChange(notifySmspListChangeStatus,expectedStatus);
	
	// ===  Retrieve list and check it is the same as the stored list ===

	// Use the helper class for CRetrieveMobilePhoneSmspList to retrieve the SMSP list. 
	TInt err=0;
	CRetrieveMobilePhoneSmspListExec* smspListExec = CRetrieveMobilePhoneSmspListHelper::NewL(smsMessaging);	
	CleanupStack::PushL(smspListExec);
	CMobilePhoneSmspList* mobileSmspList = smspListExec->DoGetList(err);
	ASSERT_EQUALS(err, KErrNone, _L("CRetrieveMobilePhoneSmspList::Start returned with an error"));

	// Check CMobilePhoneSmspList::Enumerate on the list returned returns value bigger than 0
	TInt listEnteries=mobileSmspList->Enumerate();
	ASSERT_TRUE(listEnteries> 0, _L("CRetrieveMobilePhoneSmspList::Enumerate returned an empty list"))
	
	//
	// TEST END
	//

    StartCleanup();
	
	// Pop 
	// smspListExec;
 	// storeSmspListStatus
	// notifySmspListChangeStatus);	
	// smspList

    CleanupStack::PopAndDestroy(4, smspList);
   	return TestStepResult();
	}
TVerdict CCTSYIntegrationTestCallCost0001::doTestStepL()
/**
 * @SYMTestCaseID BA-CTSY-INT-CCOS-0001
 * @SYMFssID BA/CTSY/CCOS-0001
 * @SYMTestCaseDesc Ensure that AoCC (advice of charge) information is correctly updated during an MO call.
 * @SYMTestPriority High
 * @SYMTestActions RCall::Dial, RCall:HangUp, RMobilePhone::ClearCostMeter
 * @SYMTestExpectedResults Pass - Call cost information can be retrieved and meter can be cleared.
 * @SYMTestType CIT
 * @SYMTestCaseDependencies live/manual
 *
 *
 * @return - TVerdict code
 */
	{

	//
	// SET UP
	//

	
	// Ensure phone has KCapsClearCost, KCapsCostCharging caps. AoCC configured. 

	// Get voice line 1. Get call 1. 

	// Clear the cost meter. 


	//
	// SET UP END
	//
	
	StartTest();
	
	//
	// TEST START
	//
	
	
	// Dial a number that is chargable. 

	// Get the cost information during the call. 

	// Hang up the call. 

	// Get the cost information. 

	// Clear the cost meter. 

	// Dial a number that is free of charge. 

	// Get the cost information during the call. 

	// Hang up the call. 

	// Get the cost information. 

	// Repeat the whole test with data and fax calls. 

	
	//
	// TEST END
	//

    StartCleanup();
	
	// Put any required test clean up here, then remove this comment
	
	return TestStepResult();
	}
//
// Perform the Test
//
LOCAL_C void PerformTestL()
/**
 *
 * The PerformTestL method is the main user interface routine for the GSM TSY Regression
 * Test Harness.  It loads the appropriate serial drivers and unloads them at completion.
 * This method presents the user with the list of tests to run and then
 * responds to the user's input.  If the user does not select any specific test, it runs all
 * tests as the default.
 *
 * @leave	This method leaves if it can not connect to the communications server or load
 *			the CSY.  Additionally, this method leaves if the test script can not be created.
 *			If the test fails with an error, User::Leave will be invoked.
 */
	{
	RCommServ commServer;
	TESTL(commServer.Connect()==KErrNone);
	TInt res=commServer.LoadCommModule(_L("ECUART.CSY"));
	INFO_PRINTF1(TRefByValue<const TDesC>(_L("LoadCommModuleError = %d\n")), res);
	TESTL(res==KErrNone || res==KErrAlreadyExists);

//  This block of prints is for all tests to be listed in one column
//  Note: by displaying menu selectons in a single column, all selections will not be visible
	INFO_PRINTF1(_L("Which test?  Leave to run all tests\n"));
	INFO_PRINTF1(_L("a) Receive SMS Test\n"));
	INFO_PRINTF1(_L("b) SMS Notification Test\n"));
	INFO_PRINTF1(_L("c) SMS PDU Capability Test\n"));
	INFO_PRINTF1(_L("d) Default SCA Test\n"));
	INFO_PRINTF1(_L("e) SMS Transmission Test\n"));
	INFO_PRINTF1(_L("f) Data Call Test\n"));
	INFO_PRINTF1(_L("g) Errored Data Call Test\n"));
	INFO_PRINTF1(_L("h) Odd Initialisation Tests\n"));
	INFO_PRINTF1(_L("i) SMS Storage Tests\n"));
	INFO_PRINTF1(_L("j) Failure Initialisation Tests\n"));
	INFO_PRINTF1(_L("k) Incoming Call Tests\n"));
	INFO_PRINTF1(_L("l) SMS Cancel Scenarios\n"));
	INFO_PRINTF1(_L("m) Shutdown Scenarios\n"));
	INFO_PRINTF1(_L("n) SMS Storage Delete Test\n"));
	INFO_PRINTF1(_L("o) Simultaneous Fax Reception and Signal Strength Retrieval Scenario\n"));
	INFO_PRINTF1(_L("p) Data Call Cancel Scenarios\n"));
	INFO_PRINTF1(_L("q) Fax Call Premature Close Scenario\n"));
	INFO_PRINTF1(_L("r) Two Fax Reception Scenario\n"));
	INFO_PRINTF1(_L("s) Voice Call Scenarios\n"));
	INFO_PRINTF1(_L("t) Data Call Set-up, Data Transfer and Remote Termination Test\n"));
	INFO_PRINTF1(_L("u) Data Call Dial-up Networking Call-back Test\n"));
	INFO_PRINTF1(_L("v) Data Call Answer and Remote Hang-up Closely Followed by a Dial Test\n"));
	INFO_PRINTF1(_L("w) Phonebook tests\n"));
	INFO_PRINTF1(_L("x) Network and Registration tests\n"));
	INFO_PRINTF1(_L("y) Phone and Line tests\n"));
	INFO_PRINTF1(_L("z) Voice and Data calls tests\n"));
	INFO_PRINTF1(_L("1) No CNMI info and Modem Detection tests\n"));
	INFO_PRINTF1(_L("2) No CMGF info tests\n"));
	INFO_PRINTF1(_L("3) AT+CBST  tests\n"));
	INFO_PRINTF1(_L("4) CBST & CNMI string parsing test\n")) ;
	INFO_PRINTF1(_L("5) CGQREQ responses during initialise\n"));
	INFO_PRINTF1(_L("6) Unsolicited messages injected during initialisation\n"));
	INFO_PRINTF1(_L("9) Voice Call OOM tests (NOT RUN AS PART OF 'ALL TESTS')\n"));

	TBool keyPressed=ETrue;
	TKeyCode key=ShortWaitForKey(10, keyPressed);

	TBool allTests=!keyPressed;
	if(keyPressed)
		{
		if((key>='A')&&(key<='Z'))	// A simple fold
			key=(TKeyCode)(key-'A'+'a');
		}

//
// Run the tests...
//


// Test Rx SMS messages
	if((key=='a')||(allTests))
		{
		SIMPLETESTMACRO("Simple SMS Receive",CTestDriveRxMess,ERxMessScript);
		SIMPLETESTMACRO("CMT SMS Receive",CTestDriveRxMessCmt,ERxMessCmtAndCmtiScript);
		SIMPLETESTMACRO("CMTI SMS Receive emulating an Ericsson T28",CTestDriveRxMess,ERxMessEricssonT28Script);
		}

// Test Notification of SMS messages
	if((key=='b')||(allTests))
		{
		SIMPLETESTMACRO("SMS CMTI Notification and Receive",CTestDriveNotMess,ERxMessScript);
		SIMPLETESTMACRO("SMS CMT Notification and Receive",CTestDriveNotMessCmt,ERxMessCmtScript);
		}

// Test behaviour when a modem claims not to support SMS PDU mode
	if((key=='c')||(allTests))
		{
		SIMPLETESTMACRO("No SMS PDU capability",CTestDriveNoPduRxMess,ENoPduRxMessScript);
		}


// Test retrieval and setting of default service centre

	if ((key=='d')||(allTests))
		{
		SIMPLETESTMACRO("Simple SCA retrieval & setting",CTestDriveSca,EScaSimpleScript);
		SIMPLETESTMACRO("8210-style SCA retrieval & setting",CTestDriveSca,ESca8210StyleScript);
		}


// Test a simple SMS Tx
	if((key=='e')||(allTests))
		{
		SIMPLETESTMACRO("A simple SMS Tx",CTestDriveTxMess,ETxMessScript);
		SIMPLETESTMACRO("New Standard SMS Tx",CTestDriveTxNewStdMess,ETxMessNewStdScript);
		SIMPLETESTMACRO("New Standard SMS Tx Test emulating an Ericsson T28",CTestDriveTxNewStdMess,ETxMessT28NewStdScript);

	// Test no prefix on pdu, don't set default sca, new ETSI format
		_LIT8(KTxA,"Tx: no PDU prefix, no default SCA set, new standard");
		StartTest(KTxA);
		CTestDriveTxWithScaCombo* test4c=CTestDriveTxWithScaCombo::NewL(ETxMessScriptNoprefixNodefscaNew,EFalse,EFalse,ETrue);
		CleanupStack::PushL(test4c);
		User::LeaveIfError(test4c->RunTestL());
		CleanupStack::PopAndDestroy();
		EndTest(KTxA);
		User::After(1000000L);

	// Test prefix on pdu, don't set default sca, new ETSI format
		_LIT8(KTxB,"Tx: PDU prefix, no default SCA set, new standard");
		StartTest(KTxB);
		test4c=CTestDriveTxWithScaCombo::NewL(ETxMessScriptPrefixNodefscaNew,ETrue,EFalse,ETrue);
		CleanupStack::PushL(test4c);
		User::LeaveIfError(test4c->RunTestL());
		CleanupStack::PopAndDestroy();
		EndTest(KTxB);
		User::After(1000000L);

	// Test no prefix on pdu, set default sca, new ETSI format
		_LIT8(KTxC,"Tx: no PDU prefix, default SCA set, new standard");
		StartTest(KTxC);
		test4c=CTestDriveTxWithScaCombo::NewL(ETxMessScriptNoprefixDefscaNew,EFalse,ETrue,ETrue);
		CleanupStack::PushL(test4c);
		User::LeaveIfError(test4c->RunTestL());
		CleanupStack::PopAndDestroy();
		EndTest(KTxC);
		User::After(1000000L);

	// Test prefix on pdu, set default sca, new ETSI format
		_LIT8(KTxD,"Tx: PDU prefix, default SCA set, new standard");
		StartTest(KTxD);
		test4c=CTestDriveTxWithScaCombo::NewL(ETxMessScriptPrefixDefscaNew,ETrue,ETrue,ETrue);
		CleanupStack::PushL(test4c);
		User::LeaveIfError(test4c->RunTestL());
		CleanupStack::PopAndDestroy();
		EndTest(KTxD);
		User::After(1000000L);

	// Test no prefix on pdu, don't set default sca, old ETSI format
		_LIT8(KTxE,"Tx: No PDU prefix, no default SCA set, old standard");
		StartTest(KTxE);
		test4c=CTestDriveTxWithScaCombo::NewL(ETxMessScriptNoprefixNodefscaOld,EFalse,EFalse,EFalse);
		CleanupStack::PushL(test4c);
		User::LeaveIfError(test4c->RunTestL());
		CleanupStack::PopAndDestroy();
		EndTest(KTxE);
		User::After(1000000L);

	// Test prefix on pdu, don't set default sca, old ETSI format
		_LIT8(KTxF,"Tx: PDU prefix, no default SCA set, old standard");
		StartTest(KTxF);
		test4c=CTestDriveTxWithScaCombo::NewL(ETxMessScriptPrefixNodefscaOld,ETrue,EFalse,EFalse);
		CleanupStack::PushL(test4c);
		User::LeaveIfError(test4c->RunTestL());
		CleanupStack::PopAndDestroy();
		EndTest(KTxF);
		User::After(1000000L);

	// Test no prefix on pdu, set default sca, old ETSI format
		_LIT8(KTxG,"Tx: no PDU prefix, default SCA set, old standard");
		StartTest(KTxG);
		test4c=CTestDriveTxWithScaCombo::NewL(ETxMessScriptNoprefixDefscaOld,EFalse,ETrue,EFalse);
		CleanupStack::PushL(test4c);
		User::LeaveIfError(test4c->RunTestL());
		CleanupStack::PopAndDestroy();
		EndTest(KTxG);
		User::After(1000000L);

	// Test prefix on pdu, set default sca, old ETSI format
		_LIT8(KTxH,"Tx: PDU prefix, default SCA set, old standard");
		StartTest(KTxH);
		test4c=CTestDriveTxWithScaCombo::NewL(ETxMessScriptPrefixDefscaOld,ETrue,ETrue,EFalse);
		CleanupStack::PushL(test4c);
		User::LeaveIfError(test4c->RunTestL());
		CleanupStack::PopAndDestroy();
		EndTest(KTxH);
		User::After(1000000L);

	// Test a "+CMS ERROR 321" from a Read (observed on an Ericsson 888)
		SIMPLETESTMACRO("Invalid Read Test",CTestDriveTxRx,ETxMessRxTxScriptA);
		}

// Test Dialing a Data Call
	if((key=='f')||(allTests))
		{
		SIMPLETESTMACRO("Dialing a simple Data Call",CTestDriveDataCall,EDataCallScript);
		}

// Test an Error Dialing a Data Call
	if((key=='g')||(allTests))
		{
		SIMPLETESTMACRO("Dialing a simple Data Call, with the modem ERRORing some commands",CTestDriveDataCall,EDataCallErrorAScript);
		}

// Test some odd initialisation sequences
	if((key=='h')||(allTests))
		{
		SIMPLETESTMACRO("Odd Initialisation Sequence A",CTestDriveOddInit,EOddInitAScript);
		SIMPLETESTMACRO("Odd Initialisation Sequence B",CTestDriveOddInit,EOddInitBScript);
		SIMPLETESTMACRO("Odd Initialisation Sequence C",CTestDriveOddInit,EOddInitCScript);
		SIMPLETESTMACRO("Odd Initialisation Sequence D",CTestDriveOddInit,EOddInitDScript);
		SIMPLETESTMACRO("Odd Initialisation Sequence E",CTestDriveOddInit,EOddInitEScript);
		SIMPLETESTMACRO("Odd Initialisation Sequence F",CTestDriveOddInit,EOddInitFScript);
		SIMPLETESTMACRO("Odd Initialisation Sequence G",CTestDriveOddInit,EOddInitGScript);
		SIMPLETESTMACRO("Odd Initialisation Sequence H",CTestDriveOddInit,EOddInitHScript);
 		SIMPLETESTMACRO("Odd Initialisation Sequence I",CTestDriveOddInit,EOddInitIScript);
		}

// Test SMS Storage functions
	if((key=='i')||(allTests))
		{
		SIMPLETESTMACRO("Message Storage Functions with old standard PDUs",CTestDriveMessStor,EMessStorOldSmsStdScript);
		SIMPLETESTMACRO("Message Storage Functions with new standard PDUs",CTestDriveMessStor,EMessStorNewSmsStdScript);
		}

// Test Initialisation Failure Scenarios
	if((key=='j')||(allTests))
		{
		SIMPLETESTMACRO("Initialisation Failure Scenarios",CTestDriveFailInit,EFailInitAScript);
		}

// Test Incoming Call Scenarios
	if((key=='k')||(allTests))
		{
		SIMPLETESTMACRO("Incoming Call Scenarios",CTestDriveInCall,EInCallScriptA);
		SIMPLETESTMACRO("Incoming Call Scenarios with a Nokia",CTestDriveInCall,EInCallScriptB);
		}

// Test SMS Cancel
	if((key=='l')||(allTests))
		{
		SIMPLETESTMACRO("SMS Cancel CMT Scenarios",CTestDriveSmsCancel,ESmsCancelScript);
		SIMPLETESTMACRO("SMS Cancel CMTI Scenarios",CTestDriveSmsCancel,ESmsCancelCmtiScript);
		}

// Test Shutdown Scenarios
	if((key=='m')||(allTests))
		{
 		SIMPLETESTMACRO("Shutdown Scenarios",CTestDriveShutdown,EShutdownScript);
		SIMPLETESTMACRO("Shutdown Scenarios A",CTestDriveShutdownA,EShutdownScriptA);
		}

// Test SMS Delete
	if((key=='n')||(allTests))
		{
		SIMPLETESTMACRO("A Simple SMS Storage Delete",CTestDriveSmsDelete,ESmsStorageDeleteScript);
		}

// Test simultaneous Fax Reception and Signal Strength Retrieval
	if((key=='o')||(allTests))
		{
		SIMPLETESTMACRO("Simultaneous Fax Reception and Signal Strength Retrieval",CTestDriveSsFax,ESsFaxScriptA);
		SIMPLETESTMACRO("Simultaneous Data Reception and Signal Strength Retrieval",CTestDriveSSData,ESsDataScriptA);
		}

// Test Data Call Cancel Scenarios
	if((key=='p')||(allTests))
		{
		SIMPLETESTMACRO("Data Call Cancel Scenarios",CTestDriveDataCallCancel,EDataCallCancelScript);
		}

// Fax Call Premature Close Scenarios
	if((key=='q')||(allTests))
		{
		SIMPLETESTMACRO("Fax Call Premature Close Scenarios",CTestDrivePremClose,EFaxPremCloseScriptA);
//		SIMPLETESTMACRO("Fax Call Premature Close Scenarios Part B",CTestDrivePremCloseB,EFaxPremCloseScriptB);
		}

// Two Fax Reception Scenarios
	if((key=='r')||(allTests))
		{
		SIMPLETESTMACRO("Two Fax Reception Scenarios",CTestDriveTwoFaxRx,ETwoFaxRxScriptA);
		}

// Voice Call Scenarios
	if((key=='s')||(allTests))
		{
		SIMPLETESTMACRO("Voice Call Scenarios",CTestDriveVoiceCall,EVoiceCallScriptA);
		}

// Test Dialing a Set-up, Data Transfer and Remote Termination Data Call
	if((key=='t')||(allTests))
		{
		SIMPLETESTMACRO("Dialing a Set-up, Data Transfer and Remote Termination Data Call",CTestDriveDataCallRemoteTerm,EDataCallRemoteTermScript);
		}

// Test Dialing a Dial-up Networking Call-back Data Call
	if((key=='u')||(allTests))
		{
		TInt varDelay;  // Variable Delay for EWait script, for scoping purposes
		varDelay = KCallBackDefVarDelay;
		if(!allTests)
			{
			// This tests is valid for supporting variable delay for an EWait script
			varDelay = GetNumberEntry(	KCallBackMaxDigits,	// max numbers of digits
										KCallBackMinVarDelay,	// min value allowed
										KCallBackMaxVarDelay,	// max value allowed
										KInputWaitOnDelaySecs,	// secs to wait for a user key entry
										KCallBackDefVarDelay,	// default value if timed out
										_L("Enter delay value")
									 );
			}
		_LIT8(KCallbackA,"Dialing a Dial-up Networking Call-back Data Call");
		StartTest(KCallbackA);
		CTestDriveDataCallCallBack* test23=CTestDriveDataCallCallBack::NewL(EDataCallCallBackScript, varDelay);
		CleanupStack::PushL(test23);
		User::LeaveIfError(test23->RunTestL());
		CleanupStack::PopAndDestroy();
		EndTest(KCallbackA);
		User::After(1000000L);
		}

// Test an Answer and Remote Hang-up Closely Followed by a Dial Data Call
	if((key=='v')||(allTests))
		{
		TInt varDelay;  // Variable Delay for EWait script, for scoping purposes
		varDelay = KHangupDialDefVarDelay;
		if(!allTests)
			{
			// This tests is valid for supporting variable delay for an EWait script
			varDelay = GetNumberEntry(	KHangupDialMaxDigits,	// max numbers of digits
										KHangupDialMinVarDelay,	// min value allowed
										KHangupDialMaxVarDelay,	// max value allowed
										KInputWaitOnDelaySecs,	// secs to wait for a user key entry
										KHangupDialDefVarDelay,	// default value if timed out
										_L("Enter delay value")
									 );
			}
		_LIT8(KCallbackB,"Answer and Remote Hang-up Closely Followed by a Dial Data Call");
		StartTest(KCallbackB);
		CTestDriveRemoteHangupDial* test24=CTestDriveRemoteHangupDial::NewL(EDataCallRemoteHangDialScript, varDelay);
		CleanupStack::PushL(test24);
		User::LeaveIfError(test24->RunTestL());
		CleanupStack::PopAndDestroy();
		EndTest(KCallbackB);
		User::After(1000000L);
		}

// Phone book tests
	if((key=='w')||(allTests))
		{
		SIMPLETESTMACRO("Phone book Scenarios",CTestDrivePhoneBook,EPhoneBookScript);
		}

// Network and Registration tests
	if((key=='x')||(allTests))
		{
		SIMPLETESTMACRO("Testing Network and Registration",CTestDriveNetworkRegistration,ENetworkRegistrationScript);
		}

// Phone and Line tests
	if((key=='y')||(allTests))
		{
		SIMPLETESTMACRO("Phone and Line Scenarios",CTestDrivePhoneLine,EPhoneLineScript);
		}

// Voice and Data Call tests
	if((key=='z')||(allTests))
		{
		SIMPLETESTMACRO("Voice and Data Calls",CTestDriveAllCalls,EAllCallsScript);
		}

// No CNMI information and Modem notification tests
	if((key=='1')||(allTests))
		{
		SIMPLETESTMACRO("No CNMI info and Modem notification request",CTestDriveNoCnmi,ENoCnmiScript);
		}

// No CMGF information tests
	if((key=='2')||(allTests))
		{
		SIMPLETESTMACRO("No CMGF info request",CTestDriveNoCmgf,ENoCmgfScript);
		}

// AT+CBST information tests
	if((key=='3')||(allTests))
		{
		SIMPLETESTMACRO("AT+CBST tests",CTestDriveDataCallDiffParam, ECallDiffParamScript);
		}
//CBST string parsing test
	if((key=='4')||(allTests))
		{
		SIMPLETESTMACRO("CBST & CNMI string parsing test",CTestDriveCbstParse, ECbstParseScript);
		}

// CGQREQ responses during initialise (added to increase conditional code coverage)
	if((key=='5')||(allTests))
		{
		SIMPLETESTMACRO("CGQREQ responses during initialise",CTestDriveCGQREQResponses,ECGQREQResponsesScript);
		}

// Unsolicited messages injected during initialisation
	if((key=='6')||(allTests))
		{
		SIMPLETESTMACRO("Unsolicited messages injected during initialisation",CTestDriveUnsolicited,EUnsolicitedScript);
		}

// OOM Voice Call tests, not run as part of 'all tests'
	if(key=='9')
		{
		SIMPLETESTMACRO("OOM Voice Call",CTestDriveOOMVoiceCall,EOOMVoiceCall);
		}

//
// Tidy up after the tests
//
	res = commServer.UnloadCommModule(_L("ECUART.CSY"));
	commServer.Close();
	}
TVerdict CCTSYIntegrationTestSMSPStore0004::doTestStepL()
/**
 * @SYMTestCaseID BA-CTSY-INT-SMSP-0004
 * @SYMFssID BA/CTSY/SMSP-0004
 * @SYMTestCaseDesc Cancel reading SMSP list entries.
 * @SYMTestPriority High
 * @SYMTestActions CRetrieveMobilePhoneSmspList::Start, CRetrieveMobilePhoneSmspList::Cancel
 * @SYMTestExpectedResults Pass - Request is cancelled.
 * @SYMTestType CIT
 * @SYMTestCaseDependencies live/automatic
 *
 * Reason for test: Verify request is cancelled.
 *
 * @return - TVerdict code
 */
	{

	//
	// SET UP
	//
	
	// Get the RMobileSmsMessaging subsession
	RMobileSmsMessaging& smsMessaging = iEtelSessionMgr.GetSmsMessagingL(KMainServer,KMainPhone,KMainSmsMessaging);
	
	// Ensure RMobileSmsMessaging::GetCaps returns aCaps.iSmsControl caps in set of KCapsSetSmspList | KCapsGetSmspList 
	RMobileSmsMessaging::TMobileSmsCapsV1  smsCaps;
	RMobileSmsMessaging::TMobileSmsCapsV1Pckg smsCapsPckg(smsCaps);
	CHECK_EQUALS_L(smsMessaging.GetCaps(smsCapsPckg),KErrNone, _L("RMobileSmsMessaging::GetCaps returned returned with an error"));
	TUint32 expectedCaps= RMobileSmsMessaging::KCapsSetSmspList | RMobileSmsMessaging::KCapsGetSmspList;
	CHECK_BITS_SET_L(smsCaps.iSmsControl, expectedCaps, KNoUnwantedBits, _L("RMobileSmsMessaging::GetCaps returned with unexpected caps"));

	//
	// SET UP END
	//
	
	StartTest();
	
	//
	// TEST START
	//
	
	// Use helper class for CRetrieveMobilePhoneSmspList to retrieve the SMSP list 
	TInt err=0;
	CRetrieveMobilePhoneSmspListExec* smspListExec = CRetrieveMobilePhoneSmspListHelper::NewL(smsMessaging);
	CleanupStack::PushL(smspListExec);
	
	// Cancel list retrieval  
	CMobilePhoneSmspList* smspList = smspListExec->DoGetList(err,ECancelAfterStart);
	
	// Check retrieval completes with KErrCancel 
	ASSERT_EQUALS(err, KErrCancel, _L("CRetrieveMobilePhoneSmspList::Start Request could not be cancelled properly"));
		
	//
	// TEST END
	//

    StartCleanup();
    CleanupStack::PopAndDestroy(smspListExec);
	
	return TestStepResult();
	}
示例#29
0
static void activityInput(unsigned char *pbuf , unsigned short len)
{
	if(S_AdjustLedPageBuffer)
	{
		/*命令*/
		S_AdjustLedPageBuffer->lcdinput[0] = pbuf[4];
		S_AdjustLedPageBuffer->lcdinput[0] = (S_AdjustLedPageBuffer->lcdinput[0]<<8) + pbuf[5];
		
		//开始校准
		if(S_AdjustLedPageBuffer->lcdinput[0] == 0x2602)
		{
			if(S_AdjustLedPageBuffer->isTestting == FALSE)
			{
				//初始状态从200开始查找
				S_AdjustLedPageBuffer->itemData.ledLight = 200;
				
				S_AdjustLedPageBuffer->isTestting = TRUE;
				S_AdjustLedPageBuffer->testCnt = 1;
				StartTest(&(S_AdjustLedPageBuffer->itemData));
				
				dspTestStatus("Testting\0");
				
				DspNum(0x2605, S_AdjustLedPageBuffer->testCnt, 2);
				DspNum(0x2604, S_AdjustLedPageBuffer->itemData.ledLight, 2);
			}
		}
		//读取目标值
		else if(S_AdjustLedPageBuffer->lcdinput[0] == 0x2610)
		{
			memset(S_AdjustLedPageBuffer->buf, 0, 20);
			memcpy(S_AdjustLedPageBuffer->buf, &pbuf[7], GetBufLen(&pbuf[7] , 2*pbuf[6]));
			
			S_AdjustLedPageBuffer->targetValue = strtol(S_AdjustLedPageBuffer->buf , NULL, 10);
		}
		//读取误差值
		else if(S_AdjustLedPageBuffer->lcdinput[0] == 0x2640)
		{
			memset(S_AdjustLedPageBuffer->buf, 0, 20);
			memcpy(S_AdjustLedPageBuffer->buf, &pbuf[7], GetBufLen(&pbuf[7] , 2*pbuf[6]));
			
			S_AdjustLedPageBuffer->targetRange = strtol(S_AdjustLedPageBuffer->buf , NULL, 10);
		}
		//保存校准值
		else if(S_AdjustLedPageBuffer->lcdinput[0] == 0x2600)
		{
			if((S_AdjustLedPageBuffer->itemData.ledLight >= 100) && (S_AdjustLedPageBuffer->itemData.ledLight <= 300))
			{
				//获取最新的系统参数
				copyGBSystemSetData(&(S_AdjustLedPageBuffer->systemSetData));
				
				//修改系统参数副本中值
				setTestLedLightIntensity(&(S_AdjustLedPageBuffer->systemSetData), S_AdjustLedPageBuffer->itemData.ledLight);
				
				if(My_Pass == SaveSystemSetData(&(S_AdjustLedPageBuffer->systemSetData)))
				{
					SendKeyCode(1);
					
					//修改成功,更新内存中的值
					setSystemSetData(&(S_AdjustLedPageBuffer->systemSetData));
				}
				else
					SendKeyCode(2);
			}
		}
		//取消返回
		else if(S_AdjustLedPageBuffer->lcdinput[0] == 0x2601)
		{
			if(S_AdjustLedPageBuffer->isTestting == FALSE)
				backToFatherActivity();
			else
				SendKeyCode(3);
		}
	}
}
TVerdict CCTSYIntegrationTestSMSPStore0005::doTestStepL()
/**
 * @SYMTestCaseID BA-CTSY-INT-SMSP-0005
 * @SYMFssID BA/CTSY/SMSP-0005
 * @SYMTestCaseDesc Cancel writing SMSP list entries.
 * @SYMTestPriority High
 * @SYMTestActions 
 * @SYMTestExpectedResults Pass - Request is cancelled.
 * @SYMTestType CIT
 * @SYMTestCaseDependencies live/automatic
 *
 * Reason for test: Verify request is cancelled.
 *
 * @return - TVerdict code
 */
	{

	//
	// SET UP
	//
	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
	
	// Get the RMobileSmsMessaging subsession
	RMobileSmsMessaging& smsMessaging = iEtelSessionMgr.GetSmsMessagingL(KMainServer,KMainPhone,KMainSmsMessaging);
	
	// Ensure RMobileSmsMessaging::GetCaps returns aCaps.iSmsControl caps in set of KCapsSetSmspList | KCapsGetSmspList 
	RMobileSmsMessaging::TMobileSmsCapsV1  smsCaps;
	RMobileSmsMessaging::TMobileSmsCapsV1Pckg smsCapsPckg(smsCaps);
	CHECK_EQUALS_L(smsMessaging.GetCaps(smsCapsPckg),KErrNone, _L("RMobileSmsMessaging::GetCaps returned returned with an error"));
	TUint32 expectedCaps= RMobileSmsMessaging::KCapsSetSmspList | RMobileSmsMessaging::KCapsGetSmspList;
	CHECK_BITS_SET_L(smsCaps.iSmsControl, expectedCaps, KNoUnwantedBits, _L("RMobileSmsMessaging::GetCaps returned with unexpected caps"));
	
	// Take the backup of SMSP list
	TInt listCountAtStart;
	TBackupList backup(*this,smsMessaging);
	CHECK_TRUE_L(backup.BackupL(listCountAtStart), _L("TBackupList::Backup Could not backup"));
	CleanupStack::PushL (backup);
	
	//
	// SET UP END
	//
	
	StartTest();
	
	//
	// TEST START
	//
	
	// Create a CMobilePhoneSmspList with CMobilePhoneSmspList::NewL 
	CMobilePhoneSmspList* smspList = CMobilePhoneSmspList::NewL();
	CleanupStack::PushL(smspList);
		
	// Find out the network
	RMobilePhone::TMobilePhoneNetworkInfoV1 info;
	RMobilePhone::TMobilePhoneNetworkInfoV1Pckg infopckg(info);
	TExtEtelRequestStatus getNetworkStatus (phone,EMobilePhoneGetCurrentNetwork);
	CleanupStack::PushL(getNetworkStatus);
	phone.GetCurrentNetwork(getNetworkStatus, infopckg);
	ASSERT_EQUALS(WaitForRequestWithTimeOut(getNetworkStatus, ETimeMedium),   KErrNone,
	 			_L("MobilePhone::GetCurrentNetwork timed out"))
	ASSERT_EQUALS(getNetworkStatus.Int(), KErrNone, 
				_L("MobilePhone::GetCurrentNetwork returned an error"))	
				
	// Create a RMobileSmsMessaging::TMobileSmspEntryV1 entry with the following parameters: 
	RMobileSmsMessaging::TMobileSmspEntryV1 smspEntry;
	
	     smspEntry.iText = _L("ABCD"); 

	     smspEntry.iValidParams = RMobileSmsMessaging::KDestinationIncluded 

	         | RMobileSmsMessaging::KSCAIncluded 

	         | RMobileSmsMessaging::KProtocolIdIncluded 

	         | RMobileSmsMessaging::KDcsIncluded 

	         | RMobileSmsMessaging::KValidityPeriodIncluded; 

	     smspEntry.iDestination.iTelNumber = _L("1234567890"); 

	     smspEntry.iDestination.iNumberPlan = RMobilePhone::EIsdnNumberPlan; 

	     smspEntry.iDestination.iTypeOfNumber = RMobilePhone::EInternationalNumber; 

	     smspEntry.iValidityPeriod = 0; 

	     smspEntry.iServiceCentre.iTelNumber = _L("1234567890"); 

	     smspEntry.iServiceCentre.iNumberPlan = RMobilePhone::EIsdnNumberPlan; 

	     smspEntry.iServiceCentre.iTypeOfNumber = RMobilePhone::EInternationalNumber; 

	     smspEntry.iProtocolId = 2; 

	     smspEntry.iDcs = 4; 

	     smspEntry.iIndex = 1; 
	    	     
	
	// Create another RMobileSmsMessaging::TMobileSmspEntryV1 entry with the following parameters: 
	RMobileSmsMessaging::TMobileSmspEntryV1 smspEntry2;

	  smspEntry2.iValidParams = RMobileSmsMessaging::KSCAIncluded; 

	  smspEntry2.iServiceCentre.iTypeOfNumber=RMobilePhone::EInternationalNumber; 

	  smspEntry2.iServiceCentre.iNumberPlan=RMobilePhone:: EIsdnNumberPlan; 

	  smspEntry2.iServiceCentre.iTelNumber=_L("441632960000"); 
	  
	  smspEntry2.iIndex = 2; 

	// Create another RMobileSmsMessaging::TMobileSmspEntryV1 entry with the following parameters: 
	RMobileSmsMessaging::TMobileSmspEntryV1 smspEntry3;
	  
	  smspEntry3.iValidParams = RMobileSmsMessaging::KSCAIncluded; 

	  smspEntry3.iServiceCentre.iTypeOfNumber=RMobilePhone::EInternationalNumber; 

	  smspEntry3.iServiceCentre.iNumberPlan=RMobilePhone:: EIsdnNumberPlan; 

	  smspEntry3.iServiceCentre.iTelNumber=_L("441632960000"); 

	  smspEntry3.iIndex = 3; 
	
	
	if(info.iShortName.Find(_L("O2")) != KErrNotFound)	//O2
		{
		DEBUG_PRINTF1(_L("O2 can have three entries in the SMSP list"));
		
		// Add the entry to the CMobilePhoneSmspList list with CMobilePhoneSmspList::AddEntryL 
		smspList->AddEntryL(smspEntry);
		smspList->AddEntryL(smspEntry2);
		smspList->AddEntryL(smspEntry3);
		}
	else
		{
		smspList->AddEntryL(smspEntry);	
		}
		
	// Store the empty SMSP list with RMobileSmsMessaging::StoreSmspListL
	TExtEtelRequestStatus storeSmspListStatus(smsMessaging, EMobileSmsMessagingStoreSmspList);
	CleanupStack::PushL(storeSmspListStatus);
	smsMessaging.StoreSmspListL(storeSmspListStatus,smspList);
	
	// Cancel request immediately with RTelSubSessionBase::CancelAsyncRequest(EMobileSmsMessagingStoreSmspList) 
	smsMessaging.CancelAsyncRequest(EMobileSmsMessagingStoreSmspList);

	// Check store request completes with KErrCancel or KErrNone
	ASSERT_EQUALS(WaitForRequestWithTimeOut(storeSmspListStatus, ETimeShort),KErrNone, _L("RMobileSmsMessaging::StoreSmspListL timed out"));
	ASSERT_TRUE(storeSmspListStatus.Int() == KErrCancel || storeSmspListStatus.Int() == KErrNone, 
				_L("RMobileSmsMessaging:: CancelAsyncRequest could not cancel the request EMobileSmsMessagingStoreSmspList"));
	
	//
	// TEST END
	//

	StartCleanup();
    // Pop:
	// backup
  	// storeSmspListStatus
    // getNetworkStatus
    // smspList
    CleanupStack::PopAndDestroy(4,&backup);	
  
	return TestStepResult();
	}