24
|
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 UserNetworkAccess functional unit.
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
/**
|
|
19 |
@internalTechnology
|
|
20 |
*/
|
|
21 |
|
|
22 |
#include "cctsyintegrationtestusernetworkaccess.h"
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
CCTSYIntegrationTestUserNetworkAccessBase::CCTSYIntegrationTestUserNetworkAccessBase(CEtelSessionMgr& aEtelSessionMgr)
|
|
28 |
: CCTSYIntegrationTestSuiteStepBase(aEtelSessionMgr), iNetworkTestHelper(*this)
|
|
29 |
/**
|
|
30 |
* Constructor
|
|
31 |
*/
|
|
32 |
{
|
|
33 |
}
|
|
34 |
|
|
35 |
CCTSYIntegrationTestUserNetworkAccessBase::~CCTSYIntegrationTestUserNetworkAccessBase()
|
|
36 |
/*
|
|
37 |
* Destructor
|
|
38 |
*/
|
|
39 |
{
|
|
40 |
}
|
|
41 |
|
|
42 |
|
|
43 |
CCTSYIntegrationTestUserNetworkAccess0001::CCTSYIntegrationTestUserNetworkAccess0001(CEtelSessionMgr& aEtelSessionMgr)
|
|
44 |
: CCTSYIntegrationTestUserNetworkAccessBase(aEtelSessionMgr)
|
|
45 |
/**
|
|
46 |
* Constructor.
|
|
47 |
*/
|
|
48 |
{
|
|
49 |
SetTestStepName(CCTSYIntegrationTestUserNetworkAccess0001::GetTestStepName());
|
|
50 |
}
|
|
51 |
|
|
52 |
CCTSYIntegrationTestUserNetworkAccess0001::~CCTSYIntegrationTestUserNetworkAccess0001()
|
|
53 |
/**
|
|
54 |
* Destructor.
|
|
55 |
*/
|
|
56 |
{
|
|
57 |
}
|
|
58 |
|
|
59 |
TVerdict CCTSYIntegrationTestUserNetworkAccess0001::doTestStepL()
|
|
60 |
/**
|
|
61 |
* @SYMTestCaseID BA-CTSY-INT-USNA-0001
|
|
62 |
* @SYMFssID BA/CTSY/USNA-0001
|
|
63 |
* @SYMTestCaseDesc Send a network service request.
|
|
64 |
* @SYMTestPriority High
|
|
65 |
* @SYMTestActions
|
|
66 |
* @SYMTestExpectedResults Pass - KErrNone returned on sending network service request.
|
|
67 |
* @SYMTestType CIT
|
|
68 |
* @SYMTestCaseDependencies live/automatic
|
|
69 |
*
|
|
70 |
* Reason for test: Verify request completes with KErrNone
|
|
71 |
*
|
|
72 |
* @return - TVerdict code
|
|
73 |
*/
|
|
74 |
{
|
|
75 |
|
|
76 |
//
|
|
77 |
// SET UP
|
|
78 |
//
|
|
79 |
|
|
80 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
81 |
|
|
82 |
// Call TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL
|
|
83 |
CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone,
|
|
84 |
_L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
|
|
85 |
|
|
86 |
|
|
87 |
//
|
|
88 |
// SET UP END
|
|
89 |
//
|
|
90 |
|
|
91 |
StartTest();
|
|
92 |
|
|
93 |
//
|
|
94 |
// TEST START
|
|
95 |
//
|
|
96 |
|
|
97 |
// Send a network service request with RMobilePhone::SendNetworkServiceRequest and aServiceString="*#77#" (check status of COLR)
|
|
98 |
TExtEtelRequestStatus sendNetworkServiceRequestStatus(phone, EMobilePhoneSendNetworkServiceRequest);
|
|
99 |
CleanupStack::PushL(sendNetworkServiceRequestStatus);
|
|
100 |
_LIT(KServiceStr, "*#77#");
|
|
101 |
phone.SendNetworkServiceRequest(sendNetworkServiceRequestStatus, KServiceStr);
|
|
102 |
|
|
103 |
// Check KErrNone is returned.
|
|
104 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendNetworkServiceRequestStatus, ETimeLong), KErrNone,
|
|
105 |
_L("RMobilePhone::SendNetworkServiceRequest timed-out"));
|
|
106 |
ASSERT_EQUALS(sendNetworkServiceRequestStatus.Int(), KErrNone,
|
|
107 |
_L("RMobilePhone::SendNetworkServiceRequest returned error status."));
|
|
108 |
|
|
109 |
//
|
|
110 |
// TEST END
|
|
111 |
//
|
|
112 |
|
|
113 |
StartCleanup();
|
|
114 |
|
|
115 |
CleanupStack::PopAndDestroy(1, &sendNetworkServiceRequestStatus);
|
|
116 |
|
|
117 |
return TestStepResult();
|
|
118 |
}
|
|
119 |
|
|
120 |
TPtrC CCTSYIntegrationTestUserNetworkAccess0001::GetTestStepName()
|
|
121 |
/**
|
|
122 |
* @return The test step name.
|
|
123 |
*/
|
|
124 |
{
|
|
125 |
return _L("CCTSYIntegrationTestUserNetworkAccess0001");
|
|
126 |
}
|
|
127 |
|
|
128 |
|
|
129 |
|