|
1 // Copyright (c) 2008-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 // |
|
15 |
|
16 /** |
|
17 @file Test step definitions for the USimApplication functional unit. |
|
18 @internalTechnology |
|
19 */ |
|
20 |
|
21 #include "cctsyintegrationtestusimapplication.h" |
|
22 |
|
23 #include "cctsyinidata.h" |
|
24 |
|
25 CCTSYIntegrationTestUSimApplicationBase::CCTSYIntegrationTestUSimApplicationBase(CEtelSessionMgr& aEtelSessionMgr) |
|
26 : CCTSYIntegrationTestSuiteStepBase(aEtelSessionMgr) |
|
27 /** |
|
28 * Constructor |
|
29 */ |
|
30 { |
|
31 } |
|
32 |
|
33 CCTSYIntegrationTestUSimApplicationBase::~CCTSYIntegrationTestUSimApplicationBase() |
|
34 /* |
|
35 * Destructor |
|
36 */ |
|
37 { |
|
38 } |
|
39 |
|
40 CCTSYIntegrationTestUSimApplication0001::CCTSYIntegrationTestUSimApplication0001(CEtelSessionMgr& aEtelSessionMgr) |
|
41 : CCTSYIntegrationTestUSimApplicationBase(aEtelSessionMgr) |
|
42 /** |
|
43 * Constructor. |
|
44 */ |
|
45 { |
|
46 SetTestStepName(CCTSYIntegrationTestUSimApplication0001::GetTestStepName()); |
|
47 } |
|
48 |
|
49 CCTSYIntegrationTestUSimApplication0001::~CCTSYIntegrationTestUSimApplication0001() |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 { |
|
54 } |
|
55 |
|
56 TVerdict CCTSYIntegrationTestUSimApplication0001::doTestStepL() |
|
57 /** |
|
58 * @SYMTestCaseID BA-CTSY-INT-USIM-0001 |
|
59 * @SYMFssID BA/CTSY/USIM-0001 |
|
60 * @SYMTestCaseDesc Get the currrent active usim application id |
|
61 * @SYMTestPriority High |
|
62 * @SYMTestActions |
|
63 * @SYMTestExpectedResults Pass - current active usim application id returned. |
|
64 * @SYMTestType CIT |
|
65 * @SYMTestCaseDependencies live/automatic |
|
66 * |
|
67 * Reason for test: Verify current active usim application id returned. |
|
68 * |
|
69 * @return - TVerdict code |
|
70 */ |
|
71 { |
|
72 |
|
73 // |
|
74 // SET UP |
|
75 // |
|
76 |
|
77 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
78 |
|
79 // |
|
80 // SET UP END |
|
81 // |
|
82 |
|
83 StartTest(); |
|
84 |
|
85 // |
|
86 // TEST START |
|
87 // |
|
88 |
|
89 // === Get the current active usim application id === |
|
90 |
|
91 // Check RMobilePhone::GetCurrentActiveUSimApplication returns aid with length > 0 |
|
92 RMobilePhone::TAID aid; |
|
93 TExtEtelRequestStatus requestStatus(phone, EMobilePhoneGetCurrentActiveUSimApplication); |
|
94 CleanupStack::PushL(requestStatus); |
|
95 phone.GetCurrentActiveUSimApplication(requestStatus, aid); |
|
96 ASSERT_EQUALS(WaitForRequestWithTimeOut(requestStatus, ETimeLong), |
|
97 KErrNone, _L("RMobilePhone::GetCurrentActiveUSimApplication timed out.")) |
|
98 ASSERT_EQUALS(requestStatus.Int(), KErrNone, _L("RMobilePhone::GetCurrentActiveUSimApplication completed with incorrect status")) |
|
99 ASSERT_TRUE(aid.Length() > 0, |
|
100 _L("RMobilePhone::GetCurrentActiveUSimApplication returned invalid current active usim app id")) |
|
101 |
|
102 |
|
103 // |
|
104 // TEST END |
|
105 // |
|
106 |
|
107 StartCleanup(); |
|
108 |
|
109 // Pop: |
|
110 // requestStatus |
|
111 CleanupStack::Pop(); |
|
112 |
|
113 return TestStepResult(); |
|
114 } |
|
115 |
|
116 |
|
117 TPtrC CCTSYIntegrationTestUSimApplication0001::GetTestStepName() |
|
118 /** |
|
119 * @return The test step name. |
|
120 */ |
|
121 { |
|
122 return _L("CCTSYIntegrationTestUSimApplication0001"); |
|
123 } |