|
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 // The TEFUnit test suite for MulticallCallControl in the Common TSY. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 */ |
|
21 |
|
22 #include "cctsymulticallcallcontrolfu.h" |
|
23 #include <etel.h> |
|
24 #include <etelmm.h> |
|
25 #include <et_clsvr.h> |
|
26 #include <ctsy/mmtsy_names.h> |
|
27 #include <ctsy/serviceapi/mmtsy_ipcdefs.h> |
|
28 #include "tmockltsydata.h" |
|
29 #include <ctsy/serviceapi/gsmerror.h> |
|
30 |
|
31 CTestSuite* CCTsyMulticallCallControlFU::CreateSuiteL(const TDesC& aName) |
|
32 { |
|
33 SUB_SUITE; |
|
34 |
|
35 ADD_TEST_STEP_ISO_CPP(CCTsyMulticallCallControlFU, TestGetMulticallParams0001L); |
|
36 ADD_TEST_STEP_ISO_CPP(CCTsyMulticallCallControlFU, TestSetMulticallParams0001L); |
|
37 ADD_TEST_STEP_ISO_CPP(CCTsyMulticallCallControlFU, TestNotifyMulticallParamsChange0001L); |
|
38 ADD_TEST_STEP_ISO_CPP(CCTsyMulticallCallControlFU, TestNotifyMulticallIndicatorChange0001L); |
|
39 |
|
40 END_SUITE; |
|
41 } |
|
42 |
|
43 |
|
44 // |
|
45 // Actual test cases |
|
46 // |
|
47 |
|
48 |
|
49 /** |
|
50 @SYMTestCaseID BA-CTSY-MCC-MGMP-0001 |
|
51 @SYMComponent telephony_ctsy |
|
52 @SYMTestCaseDesc Test support in CTSY for RMobilePhone::GetMulticallParams |
|
53 @SYMTestPriority High |
|
54 @SYMTestActions Invokes RMobilePhone::GetMulticallParams |
|
55 @SYMTestExpectedResults Pass |
|
56 @SYMTestType CT |
|
57 */ |
|
58 void CCTsyMulticallCallControlFU::TestGetMulticallParams0001L() |
|
59 { |
|
60 |
|
61 OpenEtelServerL(EUseExtendedError); |
|
62 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
63 OpenPhoneL(); |
|
64 |
|
65 TRequestStatus reqStatus; |
|
66 RMobilePhone::TMobilePhoneMulticallSettingsV1 multicallSettings; |
|
67 RMobilePhone::TMobilePhoneMulticallSettingsV1Pckg |
|
68 multicallParams(multicallSettings); |
|
69 iPhone.GetMulticallParams(reqStatus, multicallParams); |
|
70 User::WaitForRequest(reqStatus); |
|
71 ASSERT_EQUALS(KErrNotSupported, reqStatus.Int()); |
|
72 |
|
73 AssertMockLtsyStatusL(); |
|
74 CleanupStack::PopAndDestroy(this); |
|
75 |
|
76 } |
|
77 |
|
78 |
|
79 /** |
|
80 @SYMTestCaseID BA-CTSY-MCC-MSMP-0001 |
|
81 @SYMComponent telephony_ctsy |
|
82 @SYMTestCaseDesc Test support in CTSY for RMobilePhone::SetMulticallParams |
|
83 @SYMTestPriority High |
|
84 @SYMTestActions Invokes RMobilePhone::SetMulticallParams |
|
85 @SYMTestExpectedResults Pass |
|
86 @SYMTestType CT |
|
87 */ |
|
88 void CCTsyMulticallCallControlFU::TestSetMulticallParams0001L() |
|
89 { |
|
90 |
|
91 OpenEtelServerL(EUseExtendedError); |
|
92 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
93 OpenPhoneL(); |
|
94 |
|
95 TRequestStatus reqStatus; |
|
96 iPhone.SetMulticallParams(reqStatus, 2); |
|
97 User::WaitForRequest(reqStatus); |
|
98 ASSERT_EQUALS(KErrNotSupported, reqStatus.Int()); |
|
99 |
|
100 AssertMockLtsyStatusL(); |
|
101 CleanupStack::PopAndDestroy(this); |
|
102 |
|
103 } |
|
104 |
|
105 |
|
106 /** |
|
107 @SYMTestCaseID BA-CTSY-MCC-MNMPC-0001 |
|
108 @SYMComponent telephony_ctsy |
|
109 @SYMTestCaseDesc Test support in CTSY for RMobilePhone::NotifyMulticallParamsChange |
|
110 @SYMTestPriority High |
|
111 @SYMTestActions Invokes RMobilePhone::NotifyMulticallParamsChange |
|
112 @SYMTestExpectedResults Pass |
|
113 @SYMTestType CT |
|
114 */ |
|
115 void CCTsyMulticallCallControlFU::TestNotifyMulticallParamsChange0001L() |
|
116 { |
|
117 |
|
118 OpenEtelServerL(EUseExtendedError); |
|
119 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
120 OpenPhoneL(); |
|
121 |
|
122 TRequestStatus reqStatus; |
|
123 RMobilePhone::TMobilePhoneMulticallSettingsV1 multicallSettings; |
|
124 RMobilePhone::TMobilePhoneMulticallSettingsV1Pckg |
|
125 multicallParams(multicallSettings); |
|
126 iPhone.NotifyMulticallParamsChange(reqStatus, multicallParams); |
|
127 User::WaitForRequest(reqStatus); |
|
128 ASSERT_EQUALS(KErrNotSupported, reqStatus.Int()); |
|
129 |
|
130 AssertMockLtsyStatusL(); |
|
131 CleanupStack::PopAndDestroy(this); |
|
132 |
|
133 } |
|
134 |
|
135 |
|
136 /** |
|
137 @SYMTestCaseID BA-CTSY-MCC-MNMIC-0001 |
|
138 @SYMComponent telephony_ctsy |
|
139 @SYMTestCaseDesc Test support in CTSY for RMobilePhone::NotifyMulticallIndicatorChange |
|
140 @SYMTestPriority High |
|
141 @SYMTestActions Invokes RMobilePhone::NotifyMulticallIndicatorChange |
|
142 @SYMTestExpectedResults Pass |
|
143 @SYMTestType CT |
|
144 */ |
|
145 void CCTsyMulticallCallControlFU::TestNotifyMulticallIndicatorChange0001L() |
|
146 { |
|
147 |
|
148 OpenEtelServerL(EUseExtendedError); |
|
149 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
150 OpenPhoneL(); |
|
151 |
|
152 TRequestStatus reqStatus; |
|
153 RMobilePhone::TMobilePhoneMulticallIndicator |
|
154 multicallIndicator(RMobilePhone::EBearerUserExceeded); |
|
155 iPhone.NotifyMulticallIndicatorChange(reqStatus, multicallIndicator); |
|
156 User::WaitForRequest(reqStatus); |
|
157 ASSERT_EQUALS(KErrNotSupported, reqStatus.Int()); |
|
158 |
|
159 AssertMockLtsyStatusL(); |
|
160 CleanupStack::PopAndDestroy(this); |
|
161 |
|
162 } |
|
163 |
|
164 |
|
165 |