telephonyserverplugins/common_tsy/test/component/src/cctsyusimapplicationfu.cpp
changeset 0 3553901f7fa8
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // The TEFUnit test suite for USIMApplication in the Common TSY.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file 
       
    20 */
       
    21 
       
    22 #include "cctsyusimapplicationfu.h"
       
    23 #include <etel.h>
       
    24 #include <etelmm.h>
       
    25 #include <et_clsvr.h>
       
    26 #include <ctsy/mmtsy_names.h>
       
    27 #include <ctsy/serviceapi/mmtsy_ipcdefs.h>
       
    28 #include "tmockltsydata.h"
       
    29 #include <ctsy/serviceapi/gsmerror.h>
       
    30 
       
    31 CTestSuite* CCTsyUSIMApplicationFU::CreateSuiteL(const TDesC& aName)
       
    32 	{
       
    33 	SUB_SUITE;
       
    34 
       
    35 	ADD_TEST_STEP_ISO_CPP(CCTsyUSIMApplicationFU, TestGetUSimApplicationInfo0001L);
       
    36 	ADD_TEST_STEP_ISO_CPP(CCTsyUSIMApplicationFU, TestGetUSimAppsSelectionMode0001L);
       
    37 	ADD_TEST_STEP_ISO_CPP(CCTsyUSIMApplicationFU, TestSetUSimApplicationStatus0001L);
       
    38 	ADD_TEST_STEP_ISO_CPP(CCTsyUSIMApplicationFU, TestSetUSimAppsSelectionMode0001L);
       
    39 	ADD_TEST_STEP_ISO_CPP(CCTsyUSIMApplicationFU, TestEnumerateUSimApplications0001L);
       
    40 	ADD_TEST_STEP_ISO_CPP(CCTsyUSIMApplicationFU, TestNotifyUSimApplicationsInfoChange0001L);
       
    41 	ADD_TEST_STEP_ISO_CPP(CCTsyUSIMApplicationFU, TestNotifyUSimAppsSelectionModeChange0001L);
       
    42 	ADD_TEST_STEP_ISO_CPP(CCTsyUSIMApplicationFU, TestGetCurrentActiveUSimApplication0001L);
       
    43 	ADD_TEST_STEP_ISO_CPP(CCTsyUSIMApplicationFU, TestGetCurrentActiveUSimApplication0002L);
       
    44 	ADD_TEST_STEP_ISO_CPP(CCTsyUSIMApplicationFU, TestGetCurrentActiveUSimApplication0004L);
       
    45 	ADD_TEST_STEP_ISO_CPP(CCTsyUSIMApplicationFU, TestGetCurrentActiveUSimApplication0005L);
       
    46 
       
    47 	END_SUITE;
       
    48 	}
       
    49 
       
    50 
       
    51 //
       
    52 // Actual test cases
       
    53 //
       
    54 
       
    55 
       
    56 /**
       
    57 @SYMTestCaseID BA-CTSY-USIMA-MGUAI-0001
       
    58 @SYMComponent  telephony_ctsy
       
    59 @SYMTestCaseDesc Test support in CTSY for RMobilePhone::GetUSimApplicationInfo
       
    60 @SYMTestPriority High
       
    61 @SYMTestActions Invokes RMobilePhone::GetUSimApplicationInfo
       
    62 @SYMTestExpectedResults Pass
       
    63 @SYMTestType CT
       
    64 */
       
    65 void CCTsyUSIMApplicationFU::TestGetUSimApplicationInfo0001L()
       
    66 	{
       
    67 	OpenEtelServerL(EUseExtendedError);
       
    68 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
    69 	OpenPhoneL();
       
    70 
       
    71 	TRequestStatus reqStatus;
       
    72 	TInt uSimAppIndex(0);
       
    73 	RMobilePhone::TUSimApplicationInfoV2 info;
       
    74 	RMobilePhone::TUSimApplicationInfoV2Pckg infoPckg(info);
       
    75 	iPhone.GetUSimApplicationInfo(reqStatus, uSimAppIndex, infoPckg);
       
    76 	User::WaitForRequest(reqStatus);
       
    77 	ASSERT_EQUALS(KErrNotSupported, reqStatus.Int());
       
    78 
       
    79 	AssertMockLtsyStatusL();
       
    80 	CleanupStack::PopAndDestroy(this);	
       
    81 	}
       
    82 
       
    83 
       
    84 /**
       
    85 @SYMTestCaseID BA-CTSY-USIMA-MGUASM-0001
       
    86 @SYMComponent  telephony_ctsy
       
    87 @SYMTestCaseDesc Test support in CTSY for RMobilePhone::GetUSimAppsSelectionMode
       
    88 @SYMTestPriority High
       
    89 @SYMTestActions Invokes RMobilePhone::GetUSimAppsSelectionMode
       
    90 @SYMTestExpectedResults Pass
       
    91 @SYMTestType CT
       
    92 */
       
    93 void CCTsyUSIMApplicationFU::TestGetUSimAppsSelectionMode0001L()
       
    94 	{
       
    95 
       
    96 	OpenEtelServerL(EUseExtendedError);
       
    97 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
    98 	OpenPhoneL();
       
    99 
       
   100 	RMobilePhone::TUSimSelectionMode usimSelectionMode(RMobilePhone::EUSimSelectionAutomatic);
       
   101 	TInt ret = iPhone.GetUSimAppsSelectionMode(usimSelectionMode);
       
   102 	ASSERT_EQUALS(KErrNotSupported, ret);
       
   103 
       
   104 	AssertMockLtsyStatusL();
       
   105 	CleanupStack::PopAndDestroy(this);
       
   106 	
       
   107 	}
       
   108 
       
   109 
       
   110 /**
       
   111 @SYMTestCaseID BA-CTSY-USIMA-MSUAS-0001
       
   112 @SYMComponent  telephony_ctsy
       
   113 @SYMTestCaseDesc Test support in CTSY for RMobilePhone::SetUSimApplicationStatus
       
   114 @SYMTestPriority High
       
   115 @SYMTestActions Invokes RMobilePhone::SetUSimApplicationStatus
       
   116 @SYMTestExpectedResults Pass
       
   117 @SYMTestType CT
       
   118 */
       
   119 void CCTsyUSIMApplicationFU::TestSetUSimApplicationStatus0001L()
       
   120 	{
       
   121 
       
   122 	OpenEtelServerL(EUseExtendedError);
       
   123 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   124 	OpenPhoneL();
       
   125 
       
   126 	TRequestStatus reqStatus;
       
   127 	RMobilePhone::TAID aid;
       
   128 	RMobilePhone::TUSimAppAction usimAppAction(RMobilePhone::EUSimActivate);
       
   129 	iPhone.SetUSimApplicationStatus(reqStatus, aid, usimAppAction);
       
   130 	User::WaitForRequest(reqStatus);
       
   131 	ASSERT_EQUALS(KErrNotSupported, reqStatus.Int());
       
   132 
       
   133 	AssertMockLtsyStatusL();
       
   134 	CleanupStack::PopAndDestroy(this);
       
   135 	
       
   136 	}
       
   137 
       
   138 
       
   139 /**
       
   140 @SYMTestCaseID BA-CTSY-USIMA-MSUASM-0001
       
   141 @SYMComponent  telephony_ctsy
       
   142 @SYMTestCaseDesc Test support in CTSY for RMobilePhone::SetUSimAppsSelectionMode
       
   143 @SYMTestPriority High
       
   144 @SYMTestActions Invokes RMobilePhone::SetUSimAppsSelectionMode
       
   145 @SYMTestExpectedResults Pass
       
   146 @SYMTestType CT
       
   147 */
       
   148 void CCTsyUSIMApplicationFU::TestSetUSimAppsSelectionMode0001L()
       
   149 	{
       
   150 
       
   151 	OpenEtelServerL(EUseExtendedError);
       
   152 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   153 	OpenPhoneL();
       
   154 
       
   155 	RMobilePhone::TUSimSelectionMode usimSelectionMode(RMobilePhone::EUSimSelectionAutomatic);
       
   156 	TInt ret = iPhone.SetUSimAppsSelectionMode(usimSelectionMode);
       
   157 	ASSERT_EQUALS(KErrNotSupported, ret);
       
   158 
       
   159 	AssertMockLtsyStatusL();
       
   160 	CleanupStack::PopAndDestroy(this);
       
   161 	
       
   162 	}
       
   163 
       
   164 
       
   165 /**
       
   166 @SYMTestCaseID BA-CTSY-USIMA-MEUA-0001
       
   167 @SYMComponent  telephony_ctsy
       
   168 @SYMTestCaseDesc Test support in CTSY for RMobilePhone::EnumerateUSimApplications
       
   169 @SYMTestPriority High
       
   170 @SYMTestActions Invokes RMobilePhone::EnumerateUSimApplications
       
   171 @SYMTestExpectedResults Pass
       
   172 @SYMTestType CT
       
   173 */
       
   174 void CCTsyUSIMApplicationFU::TestEnumerateUSimApplications0001L()
       
   175 	{
       
   176 
       
   177 	OpenEtelServerL(EUseExtendedError);
       
   178 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   179 	OpenPhoneL();
       
   180 
       
   181 	TRequestStatus reqStatus;
       
   182 	TInt count(0);
       
   183 	RMobilePhone::TAID aid;
       
   184 	iPhone.EnumerateUSimApplications(reqStatus, count, aid);
       
   185 	User::WaitForRequest(reqStatus);
       
   186 	ASSERT_EQUALS(KErrNotSupported, reqStatus.Int());
       
   187 
       
   188 	AssertMockLtsyStatusL();
       
   189 	CleanupStack::PopAndDestroy(this);
       
   190 	
       
   191 	}
       
   192 
       
   193 
       
   194 /**
       
   195 @SYMTestCaseID BA-CTSY-USIMA-MNUAIC-0001
       
   196 @SYMComponent  telephony_ctsy
       
   197 @SYMTestCaseDesc Test support in CTSY for RMobilePhone::NotifyUSimApplicationsInfoChange
       
   198 @SYMTestPriority High
       
   199 @SYMTestActions Invokes RMobilePhone::NotifyUSimApplicationsInfoChange
       
   200 @SYMTestExpectedResults Pass
       
   201 @SYMTestType CT
       
   202 */
       
   203 void CCTsyUSIMApplicationFU::TestNotifyUSimApplicationsInfoChange0001L()
       
   204 	{
       
   205 
       
   206 	OpenEtelServerL(EUseExtendedError);
       
   207 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   208 	OpenPhoneL();
       
   209 
       
   210 	TRequestStatus reqStatus;
       
   211 	TInt count(0);
       
   212 	RMobilePhone::TAID aid;
       
   213 	iPhone.NotifyUSimApplicationsInfoChange(reqStatus, count, aid);
       
   214 	User::WaitForRequest(reqStatus);
       
   215 	ASSERT_EQUALS(KErrNotSupported, reqStatus.Int());
       
   216 
       
   217 	AssertMockLtsyStatusL();
       
   218 	CleanupStack::PopAndDestroy(this);
       
   219 	
       
   220 	}
       
   221 
       
   222 
       
   223 /**
       
   224 @SYMTestCaseID BA-CTSY-USIMA-MNUASMC-0001
       
   225 @SYMComponent  telephony_ctsy
       
   226 @SYMTestCaseDesc Test support in CTSY for RMobilePhone::NotifyUSimAppsSelectionModeChange
       
   227 @SYMTestPriority High
       
   228 @SYMTestActions Invokes RMobilePhone::NotifyUSimAppsSelectionModeChange
       
   229 @SYMTestExpectedResults Pass
       
   230 @SYMTestType CT
       
   231 */
       
   232 void CCTsyUSIMApplicationFU::TestNotifyUSimAppsSelectionModeChange0001L()
       
   233 	{
       
   234 
       
   235 	OpenEtelServerL(EUseExtendedError);
       
   236 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   237 	OpenPhoneL();
       
   238 
       
   239 	TRequestStatus reqStatus;
       
   240 	RMobilePhone::TUSimSelectionMode usimSelectionMode(RMobilePhone::EUSimSelectionAutomatic);
       
   241 	iPhone.NotifyUSimAppsSelectionModeChange(reqStatus, usimSelectionMode);
       
   242 	User::WaitForRequest(reqStatus);
       
   243 	ASSERT_EQUALS(KErrNotSupported, reqStatus.Int());
       
   244 
       
   245 	AssertMockLtsyStatusL();
       
   246 	CleanupStack::PopAndDestroy(this);
       
   247 	
       
   248 	}
       
   249 
       
   250 /**
       
   251 @SYMTestCaseID BA-CTSY-SUBI-MGIK-0001
       
   252 @SYMComponent  telephony_ctsy
       
   253 @SYMTestCaseDesc Test support in CTSY for RMobilePhone::GetCurrentActiveUSimApplication
       
   254 @SYMTestPriority High
       
   255 @SYMTestActions Invokes RMobilePhone::GetCurrentActiveUSimApplication
       
   256 @SYMTestExpectedResults Pass
       
   257 @SYMTestType CT
       
   258 */
       
   259 void CCTsyUSIMApplicationFU::TestGetCurrentActiveUSimApplication0001L()
       
   260 	{
       
   261 	OpenEtelServerL();
       
   262 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   263 	OpenPhoneL();
       
   264 
       
   265 	RBuf8 data;
       
   266 	CleanupClosePushL(data);
       
   267 
       
   268 	// Test data
       
   269 	_LIT8(KSER,"0123456789");
       
   270 
       
   271 	// Do the failures first because once it has successfully retrievd the active USim application ID
       
   272 	// it caches it and makes no calls to LTSY.
       
   273 
       
   274  	//-------------------------------------------------------------------------
       
   275 	// TEST A: failure to dispatch request to LTSY
       
   276  	//-------------------------------------------------------------------------
       
   277 	iMockLTSY.ExpectL(EMobilePhoneGetCurrentActiveUSimApplication, KErrNotSupported);
       
   278 
       
   279 	TRequestStatus requestStatus;
       
   280 	RMobilePhone::TAID aid;
       
   281 	iPhone.GetCurrentActiveUSimApplication(requestStatus, aid);
       
   282 
       
   283 	User::WaitForRequest(requestStatus);
       
   284 	AssertMockLtsyStatusL();
       
   285 	ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
       
   286 
       
   287 	//-------------------------------------------------------------------------
       
   288 	// TEST B: failure on completion of pending request from LTSY->CTSY
       
   289  	//-------------------------------------------------------------------------
       
   290 	iMockLTSY.ExpectL(EMobilePhoneGetCurrentActiveUSimApplication);
       
   291 	iMockLTSY.CompleteL(EMobilePhoneGetCurrentActiveUSimApplication, KErrNotSupported);
       
   292 
       
   293 	iPhone.GetCurrentActiveUSimApplication(requestStatus, aid);
       
   294 
       
   295 	User::WaitForRequest(requestStatus);
       
   296 	AssertMockLtsyStatusL();
       
   297 	ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
       
   298 
       
   299 	//-------------------------------------------------------------------------
       
   300 	// TEST C: Successful completion request of
       
   301 	// RMobilePhone::GetCurrentActiveUSimApplication
       
   302  	//-------------------------------------------------------------------------
       
   303 	iMockLTSY.ExpectL(EMobilePhoneGetCurrentActiveUSimApplication);
       
   304 	RMobilePhone::TAID retAid(KNullDesC8);
       
   305 	TMockLtsyData1<RMobilePhone::TAID > retAidData(retAid);
       
   306 	retAidData.SerialiseL(data);
       
   307 	iMockLTSY.CompleteL(EMobilePhoneGetCurrentActiveUSimApplication, KErrNone, data);
       
   308 
       
   309 	iPhone.GetCurrentActiveUSimApplication(requestStatus, aid);
       
   310 
       
   311 	User::WaitForRequest(requestStatus);
       
   312 	AssertMockLtsyStatusL();
       
   313 	ASSERT_EQUALS(KErrNone, requestStatus.Int());
       
   314 	// Check result
       
   315 	ASSERT_TRUE( 0 == KNullDesC8().Compare(aid) );
       
   316 
       
   317 	//-------------------------------------------------------------------------
       
   318 	// this time send not empty SID
       
   319  	//-------------------------------------------------------------------------
       
   320 
       
   321 	iMockLTSY.ExpectL(EMobilePhoneGetCurrentActiveUSimApplication);
       
   322 	retAid.Copy(KSER);
       
   323 	data.Close();
       
   324 	retAidData.SerialiseL(data);
       
   325 	iMockLTSY.CompleteL(EMobilePhoneGetCurrentActiveUSimApplication, KErrNone, data);
       
   326 
       
   327 	iPhone.GetCurrentActiveUSimApplication(requestStatus, aid);
       
   328 
       
   329 	User::WaitForRequest(requestStatus);
       
   330 	AssertMockLtsyStatusL();
       
   331 	ASSERT_EQUALS(KErrNone, requestStatus.Int());
       
   332 	// Check result
       
   333 	ASSERT_TRUE( 0 == KSER().Compare(aid) );
       
   334 
       
   335 	// Done !
       
   336 	CleanupStack::PopAndDestroy(2); // data, this
       
   337 	}
       
   338 
       
   339 /**
       
   340 @SYMTestCaseID BA-CTSY-SUBI-MGIK-0002
       
   341 @SYMComponent  telephony_ctsy
       
   342 @SYMTestCaseDesc Test support in CTSY for cancelling of RMobilePhone::GetCurrentActiveUSimApplication
       
   343 @SYMTestPriority High
       
   344 @SYMTestActions Invokes cancelling of RMobilePhone::GetCurrentActiveUSimApplication
       
   345 @SYMTestExpectedResults Pass
       
   346 @SYMTestType CT
       
   347 */
       
   348 void CCTsyUSIMApplicationFU::TestGetCurrentActiveUSimApplication0002L()
       
   349 	{
       
   350 	OpenEtelServerL(EUseExtendedError);
       
   351 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   352 	OpenPhoneL();
       
   353 
       
   354 	TRequestStatus mockLtsyStatus;
       
   355 	iMockLTSY.NotifyTerminated(mockLtsyStatus);
       
   356 
       
   357 	RBuf8 data;
       
   358 	CleanupClosePushL(data);
       
   359 
       
   360 	//-------------------------------------------------------------------------
       
   361 	// Test A: cancelling of RMobilePhone::GetCurrentActiveUSimApplication
       
   362  	//-------------------------------------------------------------------------
       
   363 
       
   364 	// Expect call down to LTSY for this IPC
       
   365 	iMockLTSY.ExpectL(EMobilePhoneGetCurrentActiveUSimApplication);
       
   366 
       
   367 	// Queue response to be delayed to give time for cancel to come through
       
   368 	// Return data is needed because CTSY does not pass the cancel to
       
   369 	// LTSY
       
   370 	RMobilePhone::TAID retAid = _L8("0123456789");	
       
   371 	TMockLtsyData1<RMobilePhone::TAID> retAidData(retAid);
       
   372 	retAidData.SerialiseL(data);
       
   373 	iMockLTSY.CompleteL(EMobilePhoneGetCurrentActiveUSimApplication, KErrNone, data, 10);
       
   374 
       
   375 	TRequestStatus requestStatus;
       
   376 	RMobilePhone::TAID aid;
       
   377 	iPhone.GetCurrentActiveUSimApplication(requestStatus, aid);
       
   378 	iPhone.CancelAsyncRequest(EMobilePhoneGetCurrentActiveUSimApplication);
       
   379 	User::WaitForRequest(requestStatus);
       
   380 	ASSERT_EQUALS(KErrCancel, requestStatus.Int());
       
   381 
       
   382 	// Wait for completion of iMockLTSY.NotifyTerminated
       
   383 	User::WaitForRequest(mockLtsyStatus);
       
   384 	AssertMockLtsyStatusL();
       
   385 	CleanupStack::PopAndDestroy(2); // data, this
       
   386 	}
       
   387 
       
   388 /**
       
   389 @SYMTestCaseID BA-CTSY-SUBI-MGIK-0004
       
   390 @SYMComponent  telephony_ctsy
       
   391 @SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobilePhone::GetCurrentActiveUSimApplication
       
   392 @SYMTestPriority High
       
   393 @SYMTestActions Invokes multiple client requests to RMobilePhone::GetCurrentActiveUSimApplication
       
   394 @SYMTestExpectedResults Pass
       
   395 @SYMTestType CT
       
   396 */
       
   397 void CCTsyUSIMApplicationFU::TestGetCurrentActiveUSimApplication0004L()
       
   398 	{
       
   399 	OpenEtelServerL(EUseExtendedError);
       
   400 	CleanupStack::PushL(TCleanupItem(Cleanup, this));
       
   401 	OpenPhoneL();
       
   402 
       
   403 	RBuf8 data;
       
   404 	CleanupClosePushL(data);
       
   405 
       
   406 	//-------------------------------------------------------------------------
       
   407 	// Test A: Test multiple clients requesting RMobilePhone::GetCurrentActiveUSimApplication
       
   408  	//-------------------------------------------------------------------------
       
   409 
       
   410 	// Open second client
       
   411 	RTelServer telServer2;
       
   412 	TInt ret = telServer2.Connect();
       
   413 	ASSERT_EQUALS(KErrNone, ret);
       
   414 	CleanupClosePushL(telServer2);
       
   415 
       
   416 	RMobilePhone phone2;
       
   417 	ret = phone2.Open(telServer2, KMmTsyPhoneName);
       
   418 	ASSERT_EQUALS(KErrNone, ret);
       
   419 	CleanupClosePushL(phone2);
       
   420 
       
   421 	// First client request
       
   422 	iMockLTSY.ExpectL(EMobilePhoneGetCurrentActiveUSimApplication);
       
   423 	_LIT8(KRetAid,"0123456789");	
       
   424 	RMobilePhone::TAID retAid;
       
   425 	retAid.Copy(KRetAid());	
       
   426 	TMockLtsyData1<RMobilePhone::TAID> retAidData(retAid);
       
   427 	retAidData.SerialiseL(data);
       
   428 
       
   429 	TRequestStatus requestStatus;
       
   430 	RMobilePhone::TAID aid;
       
   431 	iPhone.GetCurrentActiveUSimApplication(requestStatus, aid);
       
   432 	
       
   433 	iMockLTSY.CompleteL(EMobilePhoneGetCurrentActiveUSimApplication, KErrNone, data);	
       
   434 
       
   435 	//second get expected to fail with KErrServerBusy
       
   436 	TRequestStatus requestStatus2;
       
   437 	RMobilePhone::TAID aid2;
       
   438 	phone2.GetCurrentActiveUSimApplication(requestStatus2, aid2);
       
   439 	
       
   440 	User::WaitForRequest(requestStatus);
       
   441 	ASSERT_EQUALS(KErrNone, requestStatus.Int());
       
   442 	ASSERT_TRUE( 0 == KRetAid().Compare(aid) );
       
   443 	
       
   444 	User::WaitForRequest(requestStatus2);
       
   445 	ASSERT_EQUALS(KErrServerBusy, requestStatus2.Int());	
       
   446 	
       
   447 	// Done !
       
   448 	AssertMockLtsyStatusL();
       
   449 	
       
   450 	CleanupStack::PopAndDestroy(4, this); // phone2, telServer2, data, this
       
   451 	}
       
   452 
       
   453 /**
       
   454 @SYMTestCaseID BA-CTSY-CIPC-MCNG-0005
       
   455 @SYMComponent  telephony_ctsy
       
   456 @SYMTestCaseDesc Test support in CTSY for RMobilePhone::GetCurrentActiveUSimApplication with timeout
       
   457 @SYMTestPriority High
       
   458 @SYMTestActions Invokes RMobilePhone::GetCurrentActiveUSimApplication and tests for timeout
       
   459 @SYMTestExpectedResults Pass
       
   460 @SYMTestType CT
       
   461 */
       
   462 void CCTsyUSIMApplicationFU::TestGetCurrentActiveUSimApplication0005L()
       
   463 	{
       
   464 	OpenEtelServerL(EUseExtendedError);
       
   465 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   466 	OpenPhoneL();
       
   467 
       
   468 	RBuf8 data;
       
   469 	CleanupClosePushL(data);
       
   470 
       
   471 	//-------------------------------------------------------------------------
       
   472 	// Test A: Test timeout of RMobilePhone::GetCurrentActiveUSimApplication
       
   473  	//-------------------------------------------------------------------------
       
   474 
       
   475 	iMockLTSY.ExpectL(EMobilePhoneGetCurrentActiveUSimApplication);
       
   476 
       
   477 	TRequestStatus requestStatus;
       
   478 	RMobilePhone::TAID aid;
       
   479 	iPhone.GetCurrentActiveUSimApplication(requestStatus, aid);
       
   480 
       
   481 	User::WaitForRequest(requestStatus);
       
   482 	ASSERT_EQUALS(KErrTimedOut, requestStatus.Int());
       
   483 
       
   484 	// Done !
       
   485 	AssertMockLtsyStatusL();
       
   486 	CleanupStack::PopAndDestroy(2, this); // data, this
       
   487 	}