telephonyserverplugins/common_tsy/test/integration/src/cctsyintegrationtestsubscriberinfo.cpp
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
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 // Test step definitions for the SubscriberInfo functional unit.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @internalTechnology
       
    20 */
       
    21 
       
    22 #include "cctsyintegrationtestsubscriberinfo.h"
       
    23 
       
    24 #include "cetelsessionmgr.h"
       
    25 #include "tetelrequeststatus.h"
       
    26 
       
    27 	
       
    28 CCTSYIntegrationTestSubscriberInfoBase::CCTSYIntegrationTestSubscriberInfoBase(CEtelSessionMgr& aEtelSessionMgr)
       
    29 	: CCTSYIntegrationTestSuiteStepBase(aEtelSessionMgr)
       
    30 /**
       
    31  * Constructor
       
    32  */
       
    33 	{
       
    34 	}
       
    35 
       
    36 CCTSYIntegrationTestSubscriberInfoBase::~CCTSYIntegrationTestSubscriberInfoBase()
       
    37 /*
       
    38  * Destructor
       
    39  */
       
    40 	{
       
    41 	}
       
    42 	
       
    43 
       
    44 CCTSYIntegrationTestSubscriberInfo0001::CCTSYIntegrationTestSubscriberInfo0001(CEtelSessionMgr& aEtelSessionMgr)
       
    45 	: CCTSYIntegrationTestSubscriberInfoBase(aEtelSessionMgr)
       
    46 /**
       
    47  * Constructor.
       
    48  */
       
    49 	{
       
    50 	SetTestStepName(CCTSYIntegrationTestSubscriberInfo0001::GetTestStepName());
       
    51 	}
       
    52 
       
    53 CCTSYIntegrationTestSubscriberInfo0001::~CCTSYIntegrationTestSubscriberInfo0001()
       
    54 /**
       
    55  * Destructor.
       
    56  */
       
    57 	{
       
    58 	}
       
    59 
       
    60 TVerdict CCTSYIntegrationTestSubscriberInfo0001::doTestStepL()
       
    61 /**
       
    62  * @SYMTestCaseID BA-CTSY-INT-SUBI-0001
       
    63  * @SYMFssID BA/CTSY/SUBI-0001
       
    64  * @SYMTestCaseDesc Get the customer service profile with no SIM inserted.
       
    65  * @SYMTestPriority High
       
    66  * @SYMTestActions 
       
    67  * @SYMTestExpectedResults Pass - KErrNotFound returned.
       
    68  * @SYMTestType CIT
       
    69  * @SYMTestCaseDependencies live/manual
       
    70  *
       
    71  * Reason for test: Verify KErrNotFound is returned.
       
    72  *
       
    73  * @return - TVerdict code
       
    74  */
       
    75 	{
       
    76 
       
    77 	//
       
    78 	// SET UP
       
    79 	//
       
    80 
       
    81 	// Remove SIM from phone. 
       
    82 	
       
    83 	DisplayUserInteractionPromptL(_L("The SIM should have been removed before starting this test"));
       
    84 	
       
    85 	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
       
    86 	
       
    87 
       
    88 	//
       
    89 	// SET UP END
       
    90 	//
       
    91 	StartTest();
       
    92 	
       
    93 	//
       
    94 	// TEST START
       
    95 	//
       
    96 	
       
    97 	// Check RMobilePhone::GetCustomerServiceProfile returns KErrNotFound
       
    98 	RMobilePhone::TMobilePhoneCspFileV1 serviceProfile;
       
    99 	RMobilePhone::TMobilePhoneCspFileV1Pckg serviceProfilePkg( serviceProfile );
       
   100 	TExtEtelRequestStatus reqStatus( phone, EMobilePhoneGetCustomerServiceProfile );
       
   101 	CleanupStack::PushL(reqStatus);
       
   102 	phone.GetCustomerServiceProfile( reqStatus, serviceProfilePkg );
       
   103 	
       
   104 	TInt err = WaitForRequestWithTimeOut(reqStatus, ETimeMedium);
       
   105 	ASSERT_EQUALS(err,KErrNotFound,_L("RMobilePhone::GetCustomerServiceProfile returned an error"));	
       
   106 
       
   107 	
       
   108 	//
       
   109 	// TEST END
       
   110 	//
       
   111 
       
   112     StartCleanup();
       
   113 	
       
   114 	CleanupStack::PopAndDestroy(1,&reqStatus);
       
   115 	
       
   116 	return TestStepResult();
       
   117 	}
       
   118 
       
   119 TPtrC CCTSYIntegrationTestSubscriberInfo0001::GetTestStepName()
       
   120 /**
       
   121  * @return The test step name.
       
   122  */
       
   123 	{
       
   124 	return _L("CCTSYIntegrationTestSubscriberInfo0001");
       
   125 	}
       
   126 
       
   127 
       
   128 
       
   129 CCTSYIntegrationTestSubscriberInfo0002::CCTSYIntegrationTestSubscriberInfo0002(CEtelSessionMgr& aEtelSessionMgr)
       
   130 	: CCTSYIntegrationTestSubscriberInfoBase(aEtelSessionMgr)
       
   131 /**
       
   132  * Constructor.
       
   133  */
       
   134 	{
       
   135 	SetTestStepName(CCTSYIntegrationTestSubscriberInfo0002::GetTestStepName());
       
   136 	}
       
   137 
       
   138 CCTSYIntegrationTestSubscriberInfo0002::~CCTSYIntegrationTestSubscriberInfo0002()
       
   139 /**
       
   140  * Destructor.
       
   141  */
       
   142 	{
       
   143 	}
       
   144 
       
   145 TVerdict CCTSYIntegrationTestSubscriberInfo0002::doTestStepL()
       
   146 /**
       
   147  * @SYMTestCaseID BA-CTSY-INT-SUBI-0002
       
   148  * @SYMFssID BA/CTSY/SUBI-0002
       
   149  * @SYMTestCaseDesc Get the subscriber ID (IMSI)
       
   150  * @SYMTestPriority High
       
   151  * @SYMTestActions 
       
   152  * @SYMTestExpectedResults Pass - A subscriber ID is returned.
       
   153  * @SYMTestType CIT
       
   154  * @SYMTestCaseDependencies live/automatic
       
   155  *
       
   156  * Reason for test: Verify a value is returned.
       
   157  *
       
   158  * @return - TVerdict code
       
   159  */
       
   160 	{
       
   161 
       
   162 	//
       
   163 	// SET UP
       
   164 	//
       
   165 	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
       
   166 
       
   167 	//
       
   168 	// SET UP END
       
   169 	//
       
   170 
       
   171 	StartTest();
       
   172 
       
   173 	//
       
   174 	// TEST START
       
   175 	//
       
   176 
       
   177 	// Check RMobilePhone::GetSubscriberId returns a valid subscriber Id in aId
       
   178 	TExtEtelRequestStatus subscriberIdStatus(phone, EMobilePhoneGetSubscriberId);
       
   179 	CleanupStack::PushL(subscriberIdStatus);
       
   180 	
       
   181 	RMobilePhone::TMobilePhoneSubscriberId subscriberId;
       
   182 	phone.GetSubscriberId(subscriberIdStatus, subscriberId);
       
   183 	ASSERT_EQUALS(WaitForRequestWithTimeOut(subscriberIdStatus, ETimeLong),
       
   184 			KErrNone, _L("RMobilePhone::GetSubscriberId timed-out."));
       
   185 	ASSERT_EQUALS(subscriberIdStatus.Int(), KErrNone, _L("RMobilePhone::GetSubscriberId returned with an error"));
       
   186 	ASSERT_TRUE(subscriberId.Length() > 0, _L("RMobilePhone::GetSubscriberId returned invalid IMSI in aId"));
       
   187 	
       
   188     //
       
   189     // Test end
       
   190     //
       
   191 
       
   192     StartCleanup();
       
   193 
       
   194 	CleanupStack::PopAndDestroy(1,&subscriberIdStatus);  
       
   195 
       
   196 	return TestStepResult();
       
   197 	}
       
   198 
       
   199 TPtrC CCTSYIntegrationTestSubscriberInfo0002::GetTestStepName()
       
   200 /**
       
   201  * @return The test step name.
       
   202  */
       
   203 	{
       
   204 	return _L("CCTSYIntegrationTestSubscriberInfo0002");
       
   205 	}
       
   206 
       
   207 
       
   208 
       
   209 CCTSYIntegrationTestSubscriberInfo0003::CCTSYIntegrationTestSubscriberInfo0003(CEtelSessionMgr& aEtelSessionMgr)
       
   210 	: CCTSYIntegrationTestSubscriberInfoBase(aEtelSessionMgr)
       
   211 /**
       
   212  * Constructor.
       
   213  */
       
   214 	{
       
   215 	SetTestStepName(CCTSYIntegrationTestSubscriberInfo0003::GetTestStepName());
       
   216 	}
       
   217 
       
   218 CCTSYIntegrationTestSubscriberInfo0003::~CCTSYIntegrationTestSubscriberInfo0003()
       
   219 /**
       
   220  * Destructor.
       
   221  */
       
   222 	{
       
   223 	}
       
   224 
       
   225 TVerdict CCTSYIntegrationTestSubscriberInfo0003::doTestStepL()
       
   226 /**
       
   227  * @SYMTestCaseID BA-CTSY-INT-SUBI-0003
       
   228  * @SYMFssID BA/CTSY/SUBI-0003
       
   229  * @SYMTestCaseDesc Get the ICC identity
       
   230  * @SYMTestPriority High
       
   231  * @SYMTestActions 
       
   232  * @SYMTestExpectedResults Pass - The ICC identity is returned.
       
   233  * @SYMTestType CIT
       
   234  * @SYMTestCaseDependencies live/automatic
       
   235  *
       
   236  * Reason for test: Verify a value is returned.
       
   237  *
       
   238  * @return - TVerdict code
       
   239  */
       
   240 	{
       
   241 
       
   242 	//
       
   243 	// SET UP
       
   244 	//
       
   245 	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
       
   246 	
       
   247 	//
       
   248 	// SET UP END
       
   249 	//
       
   250 
       
   251 	StartTest();
       
   252 	
       
   253 	//
       
   254 	// TEST START
       
   255 	//
       
   256 	
       
   257 	ASSERT_EQUALS(1,0, _L("NOTE: CTSY doesn't actually support this API - test case can be used if support is added"));
       
   258 	TEST_CHECK_POINT_L(_L("Test leaving for now,  remove this line when this test is valid once more"));
       
   259 	
       
   260 	// Check RMobilePhone::GetIccIdentity returns aIdentity with length > 0
       
   261 	RMobilePhone::TIccIdentity iccIdentity;
       
   262 	TExtEtelRequestStatus reqStatus( phone, EMobilePhoneGetIccIdentity );
       
   263 	CleanupStack::PushL( reqStatus );
       
   264 	phone.GetIccIdentity( reqStatus, iccIdentity );
       
   265 	
       
   266 	TInt err = WaitForRequestWithTimeOut(reqStatus, ETimeMedium);
       
   267 	ASSERT_EQUALS(err,KErrNone,_L("RMobilePhone::GetIccIdentity returned an error"))	
       
   268 	ASSERT_TRUE( iccIdentity.Length() > 0, _L("RMobilePhone::GetIccIdentity returned identity with length 0"))
       
   269 	
       
   270 	//
       
   271 	// TEST END
       
   272 	//
       
   273 
       
   274     StartCleanup();
       
   275 	CleanupStack::PopAndDestroy(1,&reqStatus);
       
   276 	
       
   277 	return TestStepResult();
       
   278 	}
       
   279 
       
   280 TPtrC CCTSYIntegrationTestSubscriberInfo0003::GetTestStepName()
       
   281 /**
       
   282  * @return The test step name.
       
   283  */
       
   284 	{
       
   285 	return _L("CCTSYIntegrationTestSubscriberInfo0003");
       
   286 	}
       
   287 
       
   288 
       
   289 
       
   290 CCTSYIntegrationTestSubscriberInfo0004::CCTSYIntegrationTestSubscriberInfo0004(CEtelSessionMgr& aEtelSessionMgr)
       
   291 	: CCTSYIntegrationTestSubscriberInfoBase(aEtelSessionMgr)
       
   292 /**
       
   293  * Constructor.
       
   294  */
       
   295 	{
       
   296 	SetTestStepName(CCTSYIntegrationTestSubscriberInfo0004::GetTestStepName());
       
   297 	}
       
   298 
       
   299 CCTSYIntegrationTestSubscriberInfo0004::~CCTSYIntegrationTestSubscriberInfo0004()
       
   300 /**
       
   301  * Destructor.
       
   302  */
       
   303 	{
       
   304 	}
       
   305 
       
   306 TVerdict CCTSYIntegrationTestSubscriberInfo0004::doTestStepL()
       
   307 /**
       
   308  * @SYMTestCaseID BA-CTSY-INT-SUBI-0004
       
   309  * @SYMFssID BA/CTSY/SUBI-0004
       
   310  * @SYMTestCaseDesc Get ICC access caps with a 2G SIM
       
   311  * @SYMTestPriority High
       
   312  * @SYMTestActions RMobilePhone::GetIccAccessCaps
       
   313  * @SYMTestExpectedResults Pass - Correct ICC caps returned.
       
   314  * @SYMTestType CIT
       
   315  * @SYMTestCaseDependencies live/manual
       
   316  *
       
   317  * Reason for test: Verify SIM access caps present but not USIM access caps
       
   318  *
       
   319  * @return - TVerdict code
       
   320  */
       
   321 	{
       
   322 	//
       
   323 	// SET UP
       
   324 	//
       
   325 
       
   326 	// Insert a 2G Sim. 
       
   327 	// Boot the phone. 
       
   328 	DisplayUserInteractionPromptL( _L("Please ensure a 2G SIM has been inserted before starting this test"), ETimeVeryLong );
       
   329 
       
   330 	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
       
   331 		
       
   332 	// Post a notification RMobilePhone::NotifySecurityEvent
       
   333 	// Triggers CTSY to call down to LTSY to get the ICC type
       
   334 	// which allows this test to be run.
       
   335 	RMobilePhone::TMobilePhoneSecurityEvent event;
       
   336 	TExtEtelRequestStatus notifySecurityEventStatus(phone, EMobilePhoneNotifySecurityEvent);
       
   337 	CleanupStack::PushL(notifySecurityEventStatus);
       
   338 	phone.NotifySecurityEvent(notifySecurityEventStatus, event); 
       
   339 	
       
   340 	User::After(KOneSecond*5);
       
   341 	
       
   342 	//
       
   343 	// SET UP END
       
   344 	//
       
   345 
       
   346 	StartTest();
       
   347 	
       
   348 	//
       
   349 	// TEST START
       
   350 	//
       
   351 
       
   352 	// ===  Check ICC access caps ===
       
   353 	
       
   354 	// Check RMobilePhone::GetIccAccessCaps returns caps in set of KCapsSimAccessSupported
       
   355 	// Check RMobilePhone::GetIccAccessCaps returns caps NOT in set of
       
   356 	// KCapsUSimAccessSupported | KCapsRUimAccessSupported 
       
   357 	
       
   358 	TUint32 iccAccessCaps;
       
   359 	TInt err = phone.GetIccAccessCaps( iccAccessCaps );
       
   360 
       
   361 	ASSERT_EQUALS(err,KErrNone,_L("RMobilePhone::GetIccAccessCaps failed"))	
       
   362 	ASSERT_BITS_SET(iccAccessCaps, 
       
   363 							RMobilePhone::KCapsSimAccessSupported,
       
   364 							RMobilePhone::KCapsUSimAccessSupported | RMobilePhone::KCapsRUimAccessSupported,
       
   365 							_L("RMobilePhone::GetIccAccessCaps returned unexpected bits") )
       
   366 	
       
   367 
       
   368 
       
   369 							
       
   370 	//
       
   371 	// TEST END
       
   372 	//
       
   373 
       
   374     StartCleanup();
       
   375     CleanupStack::PopAndDestroy(&notifySecurityEventStatus);	
       
   376 	return TestStepResult();
       
   377 	}
       
   378 
       
   379 TPtrC CCTSYIntegrationTestSubscriberInfo0004::GetTestStepName()
       
   380 /**
       
   381  * @return The test step name.
       
   382  */
       
   383 	{
       
   384 	return _L("CCTSYIntegrationTestSubscriberInfo0004");
       
   385 	}
       
   386 
       
   387 
       
   388 
       
   389 CCTSYIntegrationTestSubscriberInfo0005::CCTSYIntegrationTestSubscriberInfo0005(CEtelSessionMgr& aEtelSessionMgr)
       
   390 	: CCTSYIntegrationTestSubscriberInfoBase(aEtelSessionMgr)
       
   391 /**
       
   392  * Constructor.
       
   393  */
       
   394 	{
       
   395 	SetTestStepName(CCTSYIntegrationTestSubscriberInfo0005::GetTestStepName());
       
   396 	}
       
   397 
       
   398 CCTSYIntegrationTestSubscriberInfo0005::~CCTSYIntegrationTestSubscriberInfo0005()
       
   399 /**
       
   400  * Destructor.
       
   401  */
       
   402 	{
       
   403 	}
       
   404 
       
   405 TVerdict CCTSYIntegrationTestSubscriberInfo0005::doTestStepL()
       
   406 /**
       
   407  * @SYMTestCaseID BA-CTSY-INT-SUBI-0005
       
   408  * @SYMFssID BA/CTSY/SUBI-0005
       
   409  * @SYMTestCaseDesc Get ICC access caps with a 3G SIM
       
   410  * @SYMTestPriority High
       
   411  * @SYMTestActions RMobilePhone::GetIccAccessCaps
       
   412  * @SYMTestExpectedResults Pass - Correct ICC caps returned.
       
   413  * @SYMTestType CIT
       
   414  * @SYMTestCaseDependencies live/manual
       
   415  *
       
   416  * Reason for test: Verify correct caps are returned.
       
   417  *
       
   418  * @return - TVerdict code
       
   419  */
       
   420 	{
       
   421 	// Insert a 3G Sim. 
       
   422 	// Boot the phone. 
       
   423 	DoPauseL( _L("Please ensure a 3G SIM has been inserted before starting this test"), ETimeVeryLong );
       
   424 
       
   425 	//
       
   426 	// SET UP
       
   427 	//
       
   428 	
       
   429 	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
       
   430 
       
   431 	// In the CTSY, the security event triggers a call to 
       
   432 	// get the ICC type from the SIM
       
   433 	TExtEtelRequestStatus notifySecurityEventStatus(phone, EMobilePhoneNotifySecurityEvent);
       
   434 	CleanupStack::PushL(notifySecurityEventStatus);
       
   435 	RMobilePhone::TMobilePhoneSecurityEvent event;
       
   436 	phone.NotifySecurityEvent(notifySecurityEventStatus, event); 
       
   437 	User::After(KOneSecond*5);
       
   438 	
       
   439 	//
       
   440 	// SET UP END
       
   441 	//	
       
   442 	
       
   443 	StartTest();
       
   444 	
       
   445 	//
       
   446 	// TEST START
       
   447 	//
       
   448 	
       
   449 
       
   450 	// ===  Check for change in ICC access caps ===
       
   451 
       
   452 	// Check RMobilePhone::GetIccAccessCaps returns caps in set of KCapsUSimAccessSupported | KCapsSimAccessSupported
       
   453 	// Check RMobilePhone::GetIccAccessCaps returns caps NOT in set of KCapsRUimAccessSupported
       
   454 	TUint32 iccAccessCaps;
       
   455 	TInt err = phone.GetIccAccessCaps( iccAccessCaps );
       
   456 	ASSERT_EQUALS(err,KErrNone,_L("RMobilePhone::GetIccAccessCaps returned an error"));
       
   457 	ASSERT_BITS_SET(iccAccessCaps, 
       
   458 							RMobilePhone::KCapsSimAccessSupported | RMobilePhone::KCapsUSimAccessSupported,
       
   459 							 RMobilePhone::KCapsRUimAccessSupported,
       
   460 							_L("RMobilePhone::GetIccAccessCaps returned unexpected bits") );
       
   461 	
       
   462 	//
       
   463 	// TEST END
       
   464 	//
       
   465 
       
   466     StartCleanup();
       
   467 	
       
   468     CleanupStack::PopAndDestroy(&notifySecurityEventStatus);
       
   469 	return TestStepResult();
       
   470 	}
       
   471 
       
   472 TPtrC CCTSYIntegrationTestSubscriberInfo0005::GetTestStepName()
       
   473 /**
       
   474  * @return The test step name.
       
   475  */
       
   476 	{
       
   477 	return _L("CCTSYIntegrationTestSubscriberInfo0005");
       
   478 	}
       
   479 
       
   480 
       
   481 
       
   482 CCTSYIntegrationTestSubscriberInfo0006::CCTSYIntegrationTestSubscriberInfo0006(CEtelSessionMgr& aEtelSessionMgr)
       
   483 	: CCTSYIntegrationTestSubscriberInfoBase(aEtelSessionMgr)
       
   484 /**
       
   485  * Constructor.
       
   486  */
       
   487 	{
       
   488 	SetTestStepName(CCTSYIntegrationTestSubscriberInfo0006::GetTestStepName());
       
   489 	}
       
   490 
       
   491 CCTSYIntegrationTestSubscriberInfo0006::~CCTSYIntegrationTestSubscriberInfo0006()
       
   492 /**
       
   493  * Destructor.
       
   494  */
       
   495 	{
       
   496 	}
       
   497 
       
   498 TVerdict CCTSYIntegrationTestSubscriberInfo0006::doTestStepL()
       
   499 /**
       
   500  * @SYMTestCaseID BA-CTSY-INT-SUBI-0006
       
   501  * @SYMFssID BA/CTSY/SUBI-0006
       
   502  * @SYMTestCaseDesc Cancel notification of change of ICC access caps
       
   503  * @SYMTestPriority High
       
   504  * @SYMTestActions 
       
   505  * @SYMTestExpectedResults Pass - KErrCancel returned.
       
   506  * @SYMTestType CIT
       
   507  * @SYMTestCaseDependencies live/automatic
       
   508  *
       
   509  * Reason for test: Verify request is cancelled.
       
   510  *
       
   511  * @return - TVerdict code
       
   512  */
       
   513 	{
       
   514 
       
   515 	//
       
   516 	// SET UP
       
   517 	//
       
   518 
       
   519 	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
       
   520 
       
   521 	//
       
   522 	// SET UP END
       
   523 	//
       
   524 	
       
   525 	StartTest();
       
   526 	
       
   527 	//
       
   528 	// TEST START
       
   529 	//
       
   530 	
       
   531 	// Make a request for RMobilePhone::NotifyIccAccessCapsChange 
       
   532 	TUint32 accessCaps;
       
   533 	TExtEtelRequestStatus reqAccessCapsStatus(phone, EMobilePhoneNotifyIccAccessCapsChange );
       
   534 	CleanupStack::PushL(reqAccessCapsStatus);
       
   535 	phone.NotifyIccAccessCapsChange( reqAccessCapsStatus, accessCaps );
       
   536 	
       
   537 	// Cancel the request. 
       
   538 	phone.CancelAsyncRequest( EMobilePhoneNotifyIccAccessCapsChange );
       
   539 
       
   540 	// Check request status used for the request is KErrCancel
       
   541 	ASSERT_EQUALS( reqAccessCapsStatus.Int(), KErrCancel, 
       
   542 							_L("Cancelled RMobilePhone::NotifyIccAccessCapsChange gave unexpected status"));
       
   543 
       
   544 	//
       
   545 	// TEST END
       
   546 	//
       
   547 
       
   548     StartCleanup();
       
   549 	
       
   550 	CleanupStack::PopAndDestroy(1,&reqAccessCapsStatus);
       
   551 	
       
   552 	return TestStepResult();
       
   553 	}
       
   554 
       
   555 TPtrC CCTSYIntegrationTestSubscriberInfo0006::GetTestStepName()
       
   556 /**
       
   557  * @return The test step name.
       
   558  */
       
   559 	{
       
   560 	return _L("CCTSYIntegrationTestSubscriberInfo0006");
       
   561 	}
       
   562 
       
   563 
       
   564 
       
   565 CCTSYIntegrationTestSubscriberInfo0007::CCTSYIntegrationTestSubscriberInfo0007(CEtelSessionMgr& aEtelSessionMgr)
       
   566 	: CCTSYIntegrationTestSubscriberInfoBase(aEtelSessionMgr)
       
   567 /**
       
   568  * Constructor.
       
   569  */
       
   570 	{
       
   571 	SetTestStepName(CCTSYIntegrationTestSubscriberInfo0007::GetTestStepName());
       
   572 	}
       
   573 
       
   574 CCTSYIntegrationTestSubscriberInfo0007::~CCTSYIntegrationTestSubscriberInfo0007()
       
   575 /**
       
   576  * Destructor.
       
   577  */
       
   578 	{
       
   579 	}
       
   580 
       
   581 TVerdict CCTSYIntegrationTestSubscriberInfo0007::doTestStepL()
       
   582 /**
       
   583  * @SYMTestCaseID BA-CTSY-INT-SUBI-0007
       
   584  * @SYMFssID BA/CTSY/SUBI-0007
       
   585  * @SYMTestCaseDesc Get SIM service table with a SIM.
       
   586  * @SYMTestPriority High
       
   587  * @SYMTestActions 
       
   588  * @SYMTestExpectedResults Pass - SIM service table returned.
       
   589  * @SYMTestType CIT
       
   590  * @SYMTestCaseDependencies live/automatic
       
   591  *
       
   592  * Reason for test: Verify SMS and ADN service bits in SIM service table set.
       
   593  *
       
   594  * @return - TVerdict code
       
   595  */
       
   596 	{
       
   597 
       
   598 	//
       
   599 	// SET UP
       
   600 	//
       
   601 
       
   602 	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
       
   603 
       
   604 	//
       
   605 	// SET UP END
       
   606 	//	
       
   607 
       
   608 	StartTest();
       
   609 	
       
   610 	//
       
   611 	// TEST START
       
   612 	//
       
   613 
       
   614 	// ===  Check the SIM has SMS service and ADN service ===
       
   615 
       
   616 	// Check RMobilePhone::GetServiceTable with aTable=ESIMServiceTable 
       
   617 	// returns iServices1To8 with bit in set of KSstSMS | KSstADN
       
   618 	RMobilePhone::TMobilePhoneServiceTableV1 serviceTable;
       
   619 	RMobilePhone::TMobilePhoneServiceTableV1Pckg serviceTablePkg( serviceTable );
       
   620 	TExtEtelRequestStatus reqGetServiceTableStatus( phone, EMobilePhoneGetServiceTable );
       
   621 	CleanupStack::PushL( reqGetServiceTableStatus );
       
   622 	phone.GetServiceTable( reqGetServiceTableStatus, RMobilePhone::ESIMServiceTable, serviceTablePkg );
       
   623 	TInt err = WaitForRequestWithTimeOut(reqGetServiceTableStatus, ETimeMedium);
       
   624 	ASSERT_EQUALS(err,KErrNone,_L("RMobilePhone::GetServiceTable timed out"));
       
   625 	
       
   626 	ASSERT_BITS_SET( serviceTable.iServices1To8, 
       
   627 					RMobilePhone::KSstSMS | RMobilePhone::KSstADN, 
       
   628 					KNoUnwantedBits,
       
   629 					_L("RMobilePhone::GetServiceTable returned incorrect bits in iServices1To8") );
       
   630 
       
   631 
       
   632 	//
       
   633 	// TEST END
       
   634 	//
       
   635 
       
   636     StartCleanup();
       
   637 	
       
   638 	CleanupStack::PopAndDestroy(1,&reqGetServiceTableStatus);
       
   639 	
       
   640 	return TestStepResult();
       
   641 	}
       
   642 
       
   643 TPtrC CCTSYIntegrationTestSubscriberInfo0007::GetTestStepName()
       
   644 /**
       
   645  * @return The test step name.
       
   646  */
       
   647 	{
       
   648 	return _L("CCTSYIntegrationTestSubscriberInfo0007");
       
   649 	}
       
   650 
       
   651 
       
   652 
       
   653 CCTSYIntegrationTestSubscriberInfo0008::CCTSYIntegrationTestSubscriberInfo0008(CEtelSessionMgr& aEtelSessionMgr)
       
   654 	: CCTSYIntegrationTestSubscriberInfoBase(aEtelSessionMgr)
       
   655 /**
       
   656  * Constructor.
       
   657  */
       
   658 	{
       
   659 	SetTestStepName(CCTSYIntegrationTestSubscriberInfo0008::GetTestStepName());
       
   660 	}
       
   661 
       
   662 CCTSYIntegrationTestSubscriberInfo0008::~CCTSYIntegrationTestSubscriberInfo0008()
       
   663 /**
       
   664  * Destructor.
       
   665  */
       
   666 	{
       
   667 	}
       
   668 
       
   669 TVerdict CCTSYIntegrationTestSubscriberInfo0008::doTestStepL()
       
   670 /**
       
   671  * @SYMTestCaseID BA-CTSY-INT-SUBI-0008
       
   672  * @SYMFssID BA/CTSY/SUBI-0008
       
   673  * @SYMTestCaseDesc Get SIM service table with a USIM.
       
   674  * @SYMTestPriority High
       
   675  * @SYMTestActions 
       
   676  * @SYMTestExpectedResults Pass - USIM service table returned.
       
   677  * @SYMTestType CIT
       
   678  * @SYMTestCaseDependencies live/automatic
       
   679  *
       
   680  * Reason for test: Verify correct bits set in USIM service table.
       
   681  *
       
   682  * @return - TVerdict code
       
   683  */
       
   684 	{
       
   685 
       
   686 	//
       
   687 	// SET UP
       
   688 	//
       
   689 
       
   690 	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
       
   691 
       
   692 	//
       
   693 	// SET UP END
       
   694 	//	
       
   695 	StartTest();
       
   696 	
       
   697 	//
       
   698 	// TEST START
       
   699 	//
       
   700 	RMobilePhone::TMobilePhoneServiceTableV1 serviceTable;
       
   701 	RMobilePhone::TMobilePhoneServiceTableV1Pckg serviceTablePkg( serviceTable );
       
   702 	TExtEtelRequestStatus reqGetServiceTableStatus( phone, EMobilePhoneGetServiceTable );
       
   703 	CleanupStack::PushL(reqGetServiceTableStatus);
       
   704 	
       
   705 	phone.GetServiceTable( reqGetServiceTableStatus, RMobilePhone::EUSIMServiceTable, serviceTablePkg );
       
   706 
       
   707 	TInt err = WaitForRequestWithTimeOut(reqGetServiceTableStatus, ETimeMedium);
       
   708 	ASSERT_EQUALS(err,KErrNone,_L("RMobilePhone::GetServiceTable timed out"));
       
   709 	
       
   710 	// ===  Check for SMS service support (something usually present) ===
       
   711 	// Check RMobilePhone::GetServiceTable with aTable=EUSIMServiceTable returns 
       
   712 	// iServices9To16 with bit in set of KUstSMS
       
   713 	ASSERT_BITS_SET( serviceTable.iServices9To16, 
       
   714 						RMobilePhone::KUstSMS, 
       
   715 						KNoUnwantedBits,
       
   716 						_L("RMobilePhone::GetServiceTable returned incorrect bits in iServices9To16") );
       
   717 							
       
   718 	//
       
   719 	// TEST END
       
   720 	//
       
   721 
       
   722     StartCleanup();
       
   723 	
       
   724 	CleanupStack::PopAndDestroy(1, &reqGetServiceTableStatus);
       
   725 	
       
   726 	return TestStepResult();
       
   727 	}
       
   728 
       
   729 TPtrC CCTSYIntegrationTestSubscriberInfo0008::GetTestStepName()
       
   730 /**
       
   731  * @return The test step name.
       
   732  */
       
   733 	{
       
   734 	return _L("CCTSYIntegrationTestSubscriberInfo0008");
       
   735 	}
       
   736 
       
   737 
       
   738 
       
   739 CCTSYIntegrationTestSubscriberInfo0009::CCTSYIntegrationTestSubscriberInfo0009(CEtelSessionMgr& aEtelSessionMgr)
       
   740 	: CCTSYIntegrationTestSubscriberInfoBase(aEtelSessionMgr)
       
   741 /**
       
   742  * Constructor.
       
   743  */
       
   744 	{
       
   745 	SetTestStepName(CCTSYIntegrationTestSubscriberInfo0009::GetTestStepName());
       
   746 	}
       
   747 
       
   748 CCTSYIntegrationTestSubscriberInfo0009::~CCTSYIntegrationTestSubscriberInfo0009()
       
   749 /**
       
   750  * Destructor.
       
   751  */
       
   752 	{
       
   753 	}
       
   754 
       
   755 TVerdict CCTSYIntegrationTestSubscriberInfo0009::doTestStepL()
       
   756 /**
       
   757  * @SYMTestCaseID BA-CTSY-INT-SUBI-0009
       
   758  * @SYMFssID BA/CTSY/SUBI-0009
       
   759  * @SYMTestCaseDesc Cancel get SIM service table.
       
   760  * @SYMTestPriority High
       
   761  * @SYMTestActions 
       
   762  * @SYMTestExpectedResults Pass - Request cancelled.
       
   763  * @SYMTestType CIT
       
   764  * @SYMTestCaseDependencies live/automatic
       
   765  *
       
   766  * Reason for test: Verify request cancelled.
       
   767  *
       
   768  * @return - TVerdict code
       
   769  */
       
   770 	{
       
   771 
       
   772 	//
       
   773 	// SET UP
       
   774 	//
       
   775 
       
   776 	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
       
   777 	
       
   778 	//
       
   779 	// SET UP END
       
   780 	//
       
   781 	StartTest();
       
   782 	
       
   783 	//
       
   784 	// TEST START
       
   785 	//
       
   786 	
       
   787 	// Request to get service table with RMobilePhone::GetServiceTable with aTable=ESIMServiceTable 
       
   788 	RMobilePhone::TMobilePhoneServiceTableV1 serviceTable;
       
   789 	RMobilePhone::TMobilePhoneServiceTableV1Pckg serviceTablePkg( serviceTable );
       
   790 	TExtEtelRequestStatus reqGetServiceTableStatus( phone, EMobilePhoneGetServiceTable );
       
   791 	CleanupStack::PushL( reqGetServiceTableStatus );
       
   792 	
       
   793 	phone.GetServiceTable( reqGetServiceTableStatus, RMobilePhone::ESIMServiceTable, serviceTablePkg );
       
   794 
       
   795 	// Cancel request with RTelSubSessionBase::CancelAsyncRequest(EMobilePhoneGetServiceTable) 
       
   796 	phone.CancelAsyncRequest(EMobilePhoneGetServiceTable);
       
   797 
       
   798 	// Check request completes with KErrCancel or KErrNone
       
   799 	ASSERT_TRUE( KErrNone == reqGetServiceTableStatus.Int() || KErrCancel == reqGetServiceTableStatus.Int(),
       
   800 						 _L("Cancelled RMobilePhone::GetServiceTable request returned bad status") );
       
   801 	
       
   802 	//
       
   803 	// TEST END
       
   804 	//
       
   805 
       
   806     StartCleanup();
       
   807 	
       
   808 	CleanupStack::PopAndDestroy(1,&reqGetServiceTableStatus);
       
   809 	
       
   810 	return TestStepResult();
       
   811 	}
       
   812 
       
   813 TPtrC CCTSYIntegrationTestSubscriberInfo0009::GetTestStepName()
       
   814 /**
       
   815  * @return The test step name.
       
   816  */
       
   817 	{
       
   818 	return _L("CCTSYIntegrationTestSubscriberInfo0009");
       
   819 	}
       
   820 
       
   821 
       
   822