|
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 MailboxNumbers functional unit. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @internalTechnology |
|
20 */ |
|
21 |
|
22 #include "cctsyintegrationtestmailboxnumbers.h" |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 CCTSYIntegrationTestMailboxNumbersBase::CCTSYIntegrationTestMailboxNumbersBase(CEtelSessionMgr& aEtelSessionMgr) |
|
28 : CCTSYIntegrationTestSuiteStepBase(aEtelSessionMgr) |
|
29 /** |
|
30 * Constructor |
|
31 */ |
|
32 { |
|
33 } |
|
34 |
|
35 CCTSYIntegrationTestMailboxNumbersBase::~CCTSYIntegrationTestMailboxNumbersBase() |
|
36 /* |
|
37 * Destructor |
|
38 */ |
|
39 { |
|
40 } |
|
41 |
|
42 |
|
43 CCTSYIntegrationTestMailboxNumbers0001::CCTSYIntegrationTestMailboxNumbers0001(CEtelSessionMgr& aEtelSessionMgr) |
|
44 : CCTSYIntegrationTestMailboxNumbersBase(aEtelSessionMgr) |
|
45 /** |
|
46 * Constructor. |
|
47 */ |
|
48 { |
|
49 SetTestStepName(CCTSYIntegrationTestMailboxNumbers0001::GetTestStepName()); |
|
50 } |
|
51 |
|
52 CCTSYIntegrationTestMailboxNumbers0001::~CCTSYIntegrationTestMailboxNumbers0001() |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 { |
|
57 } |
|
58 |
|
59 TVerdict CCTSYIntegrationTestMailboxNumbers0001::doTestStepL() |
|
60 /** |
|
61 * @SYMTestCaseID BA-CTSY-INT-MBXN-0001 |
|
62 * @SYMFssID BA/CTSY/MBXN-0001 |
|
63 * @SYMTestCaseDesc Get the voice mailbox number |
|
64 * @SYMTestPriority High |
|
65 * @SYMTestActions |
|
66 * @SYMTestExpectedResults Pass - Valid voice mailbox number returned. |
|
67 * @SYMTestType CIT |
|
68 * @SYMTestCaseDependencies live/automatic |
|
69 * |
|
70 * Reason for test: Verify voice mailbox number is returned. |
|
71 * |
|
72 * @return - TVerdict code |
|
73 */ |
|
74 { |
|
75 |
|
76 // |
|
77 // SET UP |
|
78 // |
|
79 |
|
80 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
81 |
|
82 // |
|
83 // SET UP END |
|
84 // |
|
85 |
|
86 StartTest(); |
|
87 |
|
88 // |
|
89 // TEST START |
|
90 // |
|
91 |
|
92 // Check RMobilePhone::GetMailboxNumbers returns TMobilePhoneVoicemailIdsV3::iVoice >= 0 |
|
93 RMobilePhone::TMobilePhoneVoicemailIdsV3 mailboxNumbers; |
|
94 RMobilePhone::TMobilePhoneVoicemailIdsV3Pckg mailboxNumbersPckg(mailboxNumbers); |
|
95 // Before retrieving into TMobilePhoneVoicemailIdsV3::iVoice, set its value to 111 and then test |
|
96 // it has been changed by CTSY. It may be returning as 0. |
|
97 const TUint8 KInvalidMxNum = 111; |
|
98 mailboxNumbers.iVoice = KInvalidMxNum; |
|
99 |
|
100 TExtEtelRequestStatus getMailboxNumbersStatus(phone, EMobilePhoneGetMailboxNumbers); |
|
101 CleanupStack::PushL(getMailboxNumbersStatus); |
|
102 phone.GetMailboxNumbers(getMailboxNumbersStatus, mailboxNumbersPckg); |
|
103 |
|
104 ASSERT_EQUALS(WaitForRequestWithTimeOut(getMailboxNumbersStatus, ETimeLong), KErrNone, |
|
105 _L("RMobilePhone::GetMailboxNumbers timed-out")); |
|
106 ASSERT_EQUALS(getMailboxNumbersStatus.Int(), KErrNone, |
|
107 _L("RMobilePhone::GetMailboxNumbers returned error status.")); |
|
108 |
|
109 ASSERT_TRUE(mailboxNumbers.iVoice != KInvalidMxNum, |
|
110 _L("RMobilePhone::GetMailboxNumbers returned invalid mailbox number.")); |
|
111 |
|
112 // |
|
113 // TEST END |
|
114 // |
|
115 |
|
116 StartCleanup(); |
|
117 |
|
118 CleanupStack::PopAndDestroy(1, &getMailboxNumbersStatus); |
|
119 |
|
120 return TestStepResult(); |
|
121 } |
|
122 |
|
123 TPtrC CCTSYIntegrationTestMailboxNumbers0001::GetTestStepName() |
|
124 /** |
|
125 * @return The test step name. |
|
126 */ |
|
127 { |
|
128 return _L("CCTSYIntegrationTestMailboxNumbers0001"); |
|
129 } |
|
130 |
|
131 |
|
132 |