telephonyserverplugins/common_tsy/test/integration/src/cctsyintegrationtestsessionmanagement.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 SessionManagement functional unit.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @internalTechnology
       
    20 */
       
    21 
       
    22 #include "cctsyintegrationtestsessionmanagement.h"
       
    23 
       
    24 
       
    25 
       
    26 	
       
    27 CCTSYIntegrationTestSessionManagementBase::CCTSYIntegrationTestSessionManagementBase(CEtelSessionMgr& aEtelSessionMgr)
       
    28 	: CCTSYIntegrationTestSuiteStepBase(aEtelSessionMgr)
       
    29 /**
       
    30  * Constructor
       
    31  */
       
    32 	{
       
    33 	}
       
    34 
       
    35 CCTSYIntegrationTestSessionManagementBase::~CCTSYIntegrationTestSessionManagementBase()
       
    36 /*
       
    37  * Destructor
       
    38  */
       
    39 	{
       
    40 	}
       
    41 	
       
    42 
       
    43 CCTSYIntegrationTestSessionManagement0001::CCTSYIntegrationTestSessionManagement0001(CEtelSessionMgr& aEtelSessionMgr)
       
    44 	: CCTSYIntegrationTestSessionManagementBase(aEtelSessionMgr)
       
    45 /**
       
    46  * Constructor.
       
    47  */
       
    48 	{
       
    49 	SetTestStepName(CCTSYIntegrationTestSessionManagement0001::GetTestStepName());
       
    50 	}
       
    51 
       
    52 CCTSYIntegrationTestSessionManagement0001::~CCTSYIntegrationTestSessionManagement0001()
       
    53 /**
       
    54  * Destructor.
       
    55  */
       
    56 	{
       
    57 	}
       
    58 
       
    59 TVerdict CCTSYIntegrationTestSessionManagement0001::doTestStepL()
       
    60 /**
       
    61  * @SYMTestCaseID BA-CTSY-INT-SESMG-0001
       
    62  * @SYMFssID BA/CTSY/SESMG-0001
       
    63  * @SYMTestCaseDesc Automatic network selection at start
       
    64  * @SYMTestPriority High
       
    65  * @SYMTestActions RMobilePhone::GetNetworkRegistrationStatus, RMobilePhone::NotifyCurrentNetworkChange, RMobilePhone::GetCurrentNetwork
       
    66  * @SYMTestExpectedResults Pass - Registration status notificatins are received
       
    67  * @SYMTestType CIT
       
    68  * @SYMTestCaseDependencies live/automatic
       
    69  *
       
    70  * Reason for test: Verify current network change and network registration status notifications complete.
       
    71  *
       
    72  * @return - TVerdict code
       
    73  */
       
    74 	{
       
    75 
       
    76 	//
       
    77 	// SET UP
       
    78 	//
       
    79 
       
    80 	
       
    81 	// Ensure that RMobilePhone::GetNetworkCaps returns caps in set of KCapsGetRegistrationStatus 
       
    82 
       
    83 	// Close down TSY, so registration will re-start when TSY re-opens 
       
    84 
       
    85 
       
    86 	//
       
    87 	// SET UP END
       
    88 	//
       
    89 	
       
    90 	StartTest();
       
    91 	
       
    92 	//
       
    93 	// TEST START
       
    94 	//
       
    95 	
       
    96 	
       
    97 	// ===  Open TSY to force registration ===
       
    98 
       
    99 	// Load the TSY with RTelServer::LoadPhoneModule 
       
   100 
       
   101 	// Open the phone subsession with RMobilePhone::Open 
       
   102 
       
   103 	// ===  Ensure network registration status's go from unknown->searching->registered home network ===
       
   104 
       
   105 	// Check RMobilePhone::NotifyNetworkRegistrationStatusChange completes with ERegistrationUnknown->ENotRegisteredSearching->ERegisteredOnHomeNetwork
       
   106 
       
   107 	// Check RMobilePhone::GetNetworkRegistrationStatus returns ERegisteredOnHomeNetwork
       
   108 
       
   109 	// ===  Check receive notifciations for current network change ===
       
   110 
       
   111 	// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 completes with aNetworkInfo.iCountryCode with length > 0
       
   112 	// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 completes with aNetworkInfo.iDisplayTag with length > 0
       
   113 	// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 completes with aNetworkInfo.iLongName with length > 0
       
   114 	// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 completes with aNetworkInfo.iMode=ENetworkModeGsm
       
   115 	// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 completes with aNetworkInfo.iNetworkId with length > 0
       
   116 	// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 completes with aNetworkInfo.iShortName with length > 0
       
   117 	// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 completes with aNetworkInfo.iStatus=ENetworkStatusCurrent
       
   118 	// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 completes with aArea.iCellId > 0
       
   119 	// Check RMobilePhone::NotifyCurrentNetworkChange with parameter type TMobilePhoneNetworkInfoV5 completes with aArea.iLocationAreaCode > 0
       
   120 
       
   121 	// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iCountryCode with length > 0
       
   122 	// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iDisplayTag with length > 0
       
   123 	// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iLongName with length > 0
       
   124 	// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iMode=ENetworkModeGsm
       
   125 	// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iNetworkId with length > 0
       
   126 	// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iShortName with length > 0
       
   127 	// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aNetworkInfo.iStatus=ENetworkStatusCurrent
       
   128 	// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aArea.iCellId > 0
       
   129 	// Check RMobilePhone::GetCurrentNetwork with parameter type TMobilePhoneNetworkInfoV5 returns aArea.iLocationAreaCode > 0
       
   130 
       
   131 	
       
   132 	//
       
   133 	// TEST END
       
   134 	//
       
   135 
       
   136     StartCleanup();
       
   137 	
       
   138 	// Put any required test clean up here, then remove this comment
       
   139 	
       
   140 	return TestStepResult();
       
   141 	}
       
   142 
       
   143 TPtrC CCTSYIntegrationTestSessionManagement0001::GetTestStepName()
       
   144 /**
       
   145  * @return The test step name.
       
   146  */
       
   147 	{
       
   148 	return _L("CCTSYIntegrationTestSessionManagement0001");
       
   149 	}
       
   150 
       
   151 
       
   152