|
24
|
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 |
|
|
|
18 |
/**
|
|
|
19 |
@file The TEFUnit test suite for CallControl in the Common TSY.
|
|
|
20 |
*/
|
|
|
21 |
|
|
|
22 |
#include <etel.h>
|
|
|
23 |
#include <etelmm.h>
|
|
|
24 |
#include <et_clsvr.h>
|
|
|
25 |
#include <ctsy/mmtsy_names.h>
|
|
|
26 |
#include <ctsy/serviceapi/mmtsy_ipcdefs.h>
|
|
|
27 |
#include <test/tmockltsydata.h>
|
|
|
28 |
#include <ctsy/serviceapi/gsmerror.h>
|
|
|
29 |
|
|
|
30 |
#include "config.h"
|
|
|
31 |
#include <centralrepository.h>
|
|
|
32 |
#include <ctsy/ltsy/mltsydispatchphoneinterface.h>
|
|
|
33 |
#include <ctsy/ltsy/mltsydispatchsiminterface.h>
|
|
|
34 |
#include <ctsy/ltsy/mltsydispatchsecurityinterface.h>
|
|
|
35 |
#include <ctsy/ltsy/mltsydispatchcallcontrolinterface.h>
|
|
|
36 |
#include "mockltsyindicatorids.h"
|
|
|
37 |
#include "cctsycallcontrolfunegative.h"
|
|
|
38 |
|
|
|
39 |
/**
|
|
|
40 |
Create incoming call on RLine
|
|
|
41 |
@param aLine RLine use to create call.
|
|
|
42 |
@param aCallId Call id for created call.
|
|
|
43 |
@param aLineName The name of the line. Deprecated, line should be opened in advance
|
|
|
44 |
@param aIncomingCallName On completion contains the name of the incoming call.
|
|
|
45 |
@param aMobileService Applicability of created call to a mobile service group.
|
|
|
46 |
@param aMobileCallStatus Call state of created call.
|
|
|
47 |
*/
|
|
|
48 |
|
|
|
49 |
void CCTsyCallControlFUNegative::CreateIncomingCallL(TInt aCallId, RMobilePhone::TMobileService aMode)
|
|
|
50 |
{
|
|
|
51 |
RBuf8 data;
|
|
|
52 |
CleanupClosePushL(data);
|
|
|
53 |
|
|
|
54 |
RMobileCall::TMobileCallInfoV1 mobileCallInfo;
|
|
|
55 |
mobileCallInfo.iService = aMode;
|
|
|
56 |
mobileCallInfo.iCallId = aCallId;
|
|
|
57 |
TMockLtsyCallData1<RMobileCall::TMobileCallInfoV1> mockCallData1(aCallId, aMode, mobileCallInfo);
|
|
|
58 |
mockCallData1.SerialiseL(data);
|
|
|
59 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyIncomingCallIndId, KErrNone, data);
|
|
|
60 |
|
|
|
61 |
data.Close();
|
|
|
62 |
CleanupStack::PopAndDestroy(1, &data);
|
|
|
63 |
}
|
|
|
64 |
|
|
|
65 |
void CCTsyCallControlFUNegative::WaitForIncomingCallNotificationL(
|
|
|
66 |
RMobileCall& aMobileCall, RMobileLine& aMobileLine, TName& aCallName)
|
|
|
67 |
{
|
|
|
68 |
TRequestStatus notifyStatus;
|
|
|
69 |
aMobileLine.NotifyIncomingCall(notifyStatus, aCallName);
|
|
|
70 |
User::WaitForRequest(notifyStatus);
|
|
|
71 |
ASSERT_EQUALS(KErrNone, notifyStatus.Int());
|
|
|
72 |
|
|
|
73 |
TInt err = aMobileCall.OpenExistingCall(aMobileLine, aCallName);
|
|
|
74 |
CleanupClosePushL(aMobileCall);
|
|
|
75 |
ASSERT_EQUALS(KErrNone, err);
|
|
|
76 |
|
|
|
77 |
RMobileCall::TMobileCallStatus callStatus;
|
|
|
78 |
aMobileCall.GetMobileCallStatus(callStatus);
|
|
|
79 |
ASSERT_EQUALS(RMobileCall::EStatusRinging, callStatus);
|
|
|
80 |
}
|
|
|
81 |
|
|
|
82 |
CTestSuite* CCTsyCallControlFUNegative::CreateSuiteL(const TDesC& aName)
|
|
|
83 |
{
|
|
|
84 |
SUB_SUITE;
|
|
|
85 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlFUNegative, TestUnit0001L);
|
|
|
86 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlFUNegative, TestUnit0002L);
|
|
|
87 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlFUNegative, TestUnit0003L);
|
|
|
88 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlFUNegative, TestUnit0004L);
|
|
|
89 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlFUNegative, TestUnit0005L);
|
|
|
90 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlFUNegative, TestUnit0006L);
|
|
|
91 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlFUNegative, TestUnit0007L);
|
|
|
92 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlFUNegative, TestUnit0008L);
|
|
|
93 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlFUNegative, TestUnit0009L);
|
|
|
94 |
|
|
|
95 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlFUNegative, TestUnit0011L);
|
|
|
96 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlFUNegative, TestUnit0012L);
|
|
|
97 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlFUNegative, TestUnit0013L);
|
|
|
98 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlFUNegative, TestUnit0014L);
|
|
|
99 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlFUNegative, TestUnit0015L);
|
|
|
100 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlFUNegative, TestUnit0016L);
|
|
|
101 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlFUNegative, TestUnit0017L);
|
|
|
102 |
|
|
|
103 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlFUNegative, TestUnit0019L);
|
|
|
104 |
|
|
|
105 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlFUNegative, TestUnit0021L);
|
|
|
106 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlFUNegative, TestUnit0022L);
|
|
|
107 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlFUNegative, TestUnit0023L);
|
|
|
108 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlFUNegative, TestUnit0024L);
|
|
|
109 |
|
|
|
110 |
END_SUITE;
|
|
|
111 |
}
|
|
|
112 |
|
|
|
113 |
//
|
|
|
114 |
// 'Negative' unit tests
|
|
|
115 |
//
|
|
|
116 |
|
|
|
117 |
/**
|
|
|
118 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROL-NEGATIVE-UN0001
|
|
|
119 |
@SYMComponent telephony_ctsy
|
|
|
120 |
@SYMTestCaseDesc Test returned value if EMobileCallAnswerISV is not supported by LTSY
|
|
|
121 |
@SYMTestPriority High
|
|
|
122 |
@SYMTestActions Invokes RMobileCall::AnswerIncomingCallISV()
|
|
|
123 |
@SYMTestExpectedResults Pass
|
|
|
124 |
@SYMTestType UT
|
|
|
125 |
*/
|
|
|
126 |
void CCTsyCallControlFUNegative::TestUnit0001L()
|
|
|
127 |
{
|
|
|
128 |
TConfig config;
|
|
|
129 |
config.SetSupportedValue(MLtsyDispatchCallControlAnswer::KLtsyDispatchCallControlAnswerApiId, EFalse);
|
|
|
130 |
|
|
|
131 |
OpenEtelServerL(EUseExtendedError);
|
|
|
132 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
|
133 |
OpenPhoneL();
|
|
|
134 |
|
|
|
135 |
RBuf8 data;
|
|
|
136 |
CleanupClosePushL(data);
|
|
|
137 |
|
|
|
138 |
RMobileLine mobileLine;
|
|
|
139 |
CleanupClosePushL(mobileLine);
|
|
|
140 |
|
|
|
141 |
RMobileCall mobileCall;
|
|
|
142 |
CleanupClosePushL(mobileCall);
|
|
|
143 |
|
|
|
144 |
ASSERT_EQUALS(KErrNone, OpenLineAndCallL(mobileLine, mobileCall, RMobilePhone::EVoiceService));
|
|
|
145 |
mobileCall.Close();
|
|
|
146 |
CleanupStack::Pop(&mobileCall);
|
|
|
147 |
|
|
|
148 |
TName incomingCallName;
|
|
|
149 |
TInt callId = 1;
|
|
|
150 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
|
151 |
|
|
|
152 |
CreateIncomingCallL(callId, mobileService);
|
|
|
153 |
|
|
|
154 |
DriverCompleteGetMobileCallInfoL(callId, mobileService);
|
|
|
155 |
|
|
|
156 |
// KErrGsmBusyUserRequest hardcoded to be sent by CTSY to LTSY,
|
|
|
157 |
// mapped to KErrGsmCCUserBusy
|
|
|
158 |
TInt hangUpCause = KErrGsmCCUserBusy;
|
|
|
159 |
TMockLtsyData2<TInt, TInt> mockData2(callId, hangUpCause);
|
|
|
160 |
data.Close();
|
|
|
161 |
mockData2.SerialiseL(data);
|
|
|
162 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlHangUp::KLtsyDispatchCallControlHangUpApiId, data);
|
|
|
163 |
|
|
|
164 |
DriverCompleteSuccessfulHangUpNotificationsL(callId, EFalse, KErrGsmCCCallRejected, EFalse);
|
|
|
165 |
|
|
|
166 |
WaitForIncomingCallNotificationL(mobileCall, mobileLine, incomingCallName);
|
|
|
167 |
|
|
|
168 |
RMobileCall::TMobileCallStatus callStatus = RMobileCall::EStatusIdle;
|
|
|
169 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData3(callId, mobileService, callStatus);
|
|
|
170 |
data.Close();
|
|
|
171 |
mockCallData3.SerialiseL(data);
|
|
|
172 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId , KErrNone, data);
|
|
|
173 |
|
|
|
174 |
TRequestStatus requestStatus;
|
|
|
175 |
RMobileCall::TEtel3rdPartyMobileCallParamsV1 callParams;
|
|
|
176 |
TPckg<RMobileCall::TEtel3rdPartyMobileCallParamsV1> callParamsPckg(callParams);
|
|
|
177 |
|
|
|
178 |
mobileCall.AnswerIncomingCallISV(requestStatus, callParamsPckg);
|
|
|
179 |
User::WaitForRequest(requestStatus);
|
|
|
180 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
|
181 |
|
|
|
182 |
TRequestStatus reqStatusTerminated;
|
|
|
183 |
iMockLTSY.NotifyTerminated(reqStatusTerminated);
|
|
|
184 |
|
|
|
185 |
ClientHangUpCallL(mobileCall);
|
|
|
186 |
|
|
|
187 |
User::WaitForRequest(reqStatusTerminated);
|
|
|
188 |
ASSERT_EQUALS(reqStatusTerminated.Int(), KErrNone);
|
|
|
189 |
|
|
|
190 |
mobileCall.Close();
|
|
|
191 |
mobileLine.Close();
|
|
|
192 |
data.Close();
|
|
|
193 |
AssertMockLtsyStatusL();
|
|
|
194 |
CleanupStack::PopAndDestroy(4, this); // mobileCall, mobileLine, data, this
|
|
|
195 |
}
|
|
|
196 |
|
|
|
197 |
/**
|
|
|
198 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROL-NEGATIVE-UN0002
|
|
|
199 |
@SYMComponent telephony_ctsy
|
|
|
200 |
@SYMTestCaseDesc Test returned value if EMobileCallHold is not supported by LTSY
|
|
|
201 |
@SYMTestPriority High
|
|
|
202 |
@SYMTestActions Invokes MobileCall::Hold()
|
|
|
203 |
@SYMTestExpectedResults Pass
|
|
|
204 |
@SYMTestType UT
|
|
|
205 |
*/
|
|
|
206 |
void CCTsyCallControlFUNegative::TestUnit0002L()
|
|
|
207 |
{
|
|
|
208 |
TConfig config;
|
|
|
209 |
config.SetSupportedValue(MLtsyDispatchCallControlHold::KLtsyDispatchCallControlHoldApiId, EFalse);
|
|
|
210 |
|
|
|
211 |
OpenEtelServerL(EUseExtendedError);
|
|
|
212 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
|
213 |
OpenPhoneL();
|
|
|
214 |
|
|
|
215 |
RMobileLine mobileLine;
|
|
|
216 |
CleanupClosePushL(mobileLine);
|
|
|
217 |
|
|
|
218 |
RMobileCall mobileCall;
|
|
|
219 |
CleanupClosePushL(mobileCall);
|
|
|
220 |
|
|
|
221 |
TInt callId = 1;
|
|
|
222 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
|
223 |
DriverDialCallL(callId, mobileService);
|
|
|
224 |
|
|
|
225 |
TInt hangUpCause = KErrGsmCCNormalCallClearing; // Hang up cause for normal hang up
|
|
|
226 |
DriverHangUpCallL(callId, hangUpCause);
|
|
|
227 |
|
|
|
228 |
ClientDialCallL(mobileLine, mobileCall, mobileService);
|
|
|
229 |
|
|
|
230 |
TRequestStatus requestStatus;
|
|
|
231 |
|
|
|
232 |
mobileCall.Hold(requestStatus);
|
|
|
233 |
User::WaitForRequest(requestStatus);
|
|
|
234 |
ASSERT_EQUALS(requestStatus.Int(), KErrNotSupported);
|
|
|
235 |
|
|
|
236 |
TRequestStatus reqStatusTerminated;
|
|
|
237 |
iMockLTSY.NotifyTerminated(reqStatusTerminated);
|
|
|
238 |
|
|
|
239 |
ClientHangUpCallL(mobileCall);
|
|
|
240 |
|
|
|
241 |
User::WaitForRequest(reqStatusTerminated);
|
|
|
242 |
ASSERT_EQUALS(reqStatusTerminated.Int(), KErrNone);
|
|
|
243 |
|
|
|
244 |
mobileCall.Close();
|
|
|
245 |
mobileLine.Close();
|
|
|
246 |
AssertMockLtsyStatusL();
|
|
|
247 |
config.Reset();
|
|
|
248 |
CleanupStack::PopAndDestroy(3, this); // mobileCall, mobileLine, this
|
|
|
249 |
}
|
|
|
250 |
|
|
|
251 |
/**
|
|
|
252 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROL-NEGATIVE-UN0003
|
|
|
253 |
@SYMComponent telephony_ctsy
|
|
|
254 |
@SYMTestCaseDesc Test returned value if EMobileCallDialEmergencyCall is not supported by LTSY
|
|
|
255 |
@SYMTestPriority High
|
|
|
256 |
@SYMTestActions Invokes MobileCall::DialEmergencyCall()
|
|
|
257 |
@SYMTestExpectedResults Pass
|
|
|
258 |
@SYMTestType UT
|
|
|
259 |
*/
|
|
|
260 |
void CCTsyCallControlFUNegative::TestUnit0003L()
|
|
|
261 |
{
|
|
|
262 |
TConfig config;
|
|
|
263 |
config.SetSupportedValue(MLtsyDispatchCallControlDialEmergency::KLtsyDispatchCallControlDialEmergencyApiId, EFalse);
|
|
|
264 |
|
|
|
265 |
OpenEtelServerL(EUseExtendedError);
|
|
|
266 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
|
267 |
OpenPhoneL();
|
|
|
268 |
|
|
|
269 |
RMobileLine mobileLine;
|
|
|
270 |
CleanupClosePushL(mobileLine);
|
|
|
271 |
|
|
|
272 |
RMobileCall mobileCall;
|
|
|
273 |
CleanupClosePushL(mobileCall);
|
|
|
274 |
|
|
|
275 |
ASSERT_EQUALS(KErrNone, OpenLineAndCallL(mobileLine, mobileCall, RMobilePhone::EVoiceService));
|
|
|
276 |
|
|
|
277 |
TRequestStatus requestStatus;
|
|
|
278 |
RMobileENStore::TEmergencyNumber emergencyNumber = _L("911");
|
|
|
279 |
|
|
|
280 |
mobileCall.DialEmergencyCall(requestStatus, emergencyNumber);
|
|
|
281 |
User::WaitForRequest(requestStatus);
|
|
|
282 |
ASSERT_EQUALS(requestStatus.Int(), KErrNotSupported);
|
|
|
283 |
|
|
|
284 |
RMobileCall::TMobileCallStatus callStatus = RMobileCall::EStatusUnknown;
|
|
|
285 |
mobileCall.GetMobileCallStatus(callStatus);
|
|
|
286 |
ASSERT_EQUALS(RMobileCall::EStatusIdle, callStatus);
|
|
|
287 |
|
|
|
288 |
AssertMockLtsyStatusL();
|
|
|
289 |
config.Reset();
|
|
|
290 |
CleanupStack::PopAndDestroy(3, this); // mobileCall, mobileLine, this
|
|
|
291 |
}
|
|
|
292 |
|
|
|
293 |
/**
|
|
|
294 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROL-NEGATIVE-UN0004
|
|
|
295 |
@SYMComponent telephony_ctsy
|
|
|
296 |
@SYMTestCaseDesc Test returned value if EMobilePhoneStopDTMFTone is not supported by LTSY
|
|
|
297 |
@SYMTestPriority High
|
|
|
298 |
@SYMTestActions Invokes RMobilePhone::StopDTMFTone()
|
|
|
299 |
@SYMTestExpectedResults Pass
|
|
|
300 |
@SYMTestType UT
|
|
|
301 |
*/
|
|
|
302 |
void CCTsyCallControlFUNegative::TestUnit0004L()
|
|
|
303 |
{
|
|
|
304 |
TConfig config;
|
|
|
305 |
config.SetSupportedValue(MLtsyDispatchCallControlStopDtmfTone::KLtsyDispatchCallControlStopDtmfToneApiId, EFalse);
|
|
|
306 |
|
|
|
307 |
OpenEtelServerL(EUseExtendedError);
|
|
|
308 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
|
309 |
OpenPhoneL();
|
|
|
310 |
|
|
|
311 |
TInt callId = 1;
|
|
|
312 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
|
313 |
DriverDialCallL(callId, mobileService);
|
|
|
314 |
|
|
|
315 |
RMobileLine mobileLine;
|
|
|
316 |
CleanupClosePushL(mobileLine);
|
|
|
317 |
|
|
|
318 |
RMobileCall mobileCall;
|
|
|
319 |
CleanupClosePushL(mobileCall);
|
|
|
320 |
|
|
|
321 |
ClientDialCallL(mobileLine, mobileCall, mobileService);
|
|
|
322 |
|
|
|
323 |
RBuf8 data;
|
|
|
324 |
CleanupClosePushL(data);
|
|
|
325 |
|
|
|
326 |
TChar tone('1');
|
|
|
327 |
TMockLtsyData2<TInt, TChar> toneLtsyData(callId, tone);
|
|
|
328 |
toneLtsyData.SerialiseL(data);
|
|
|
329 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlStartDtmfTone::KLtsyDispatchCallControlStartDtmfToneApiId, data, KErrNone);
|
|
|
330 |
iMockLTSY.CompleteL(MLtsyDispatchCallControlStartDtmfTone::KLtsyDispatchCallControlStartDtmfToneApiId, KErrNone);
|
|
|
331 |
|
|
|
332 |
TInt err = iPhone.StartDTMFTone(tone);
|
|
|
333 |
ASSERT_EQUALS(err, KErrNone);
|
|
|
334 |
|
|
|
335 |
err = iPhone.StopDTMFTone();
|
|
|
336 |
ASSERT_EQUALS(err, KErrNotSupported);
|
|
|
337 |
|
|
|
338 |
TInt hangUpCause = KErrGsmCCNormalCallClearing; // Hang up cause for normal hang up
|
|
|
339 |
DriverHangUpCallL(callId, hangUpCause);
|
|
|
340 |
|
|
|
341 |
TRequestStatus reqStatusTerminated;
|
|
|
342 |
iMockLTSY.NotifyTerminated(reqStatusTerminated);
|
|
|
343 |
|
|
|
344 |
ClientHangUpCallL(mobileCall);
|
|
|
345 |
|
|
|
346 |
User::WaitForRequest(reqStatusTerminated);
|
|
|
347 |
ASSERT_EQUALS(KErrNone, reqStatusTerminated.Int());
|
|
|
348 |
|
|
|
349 |
AssertMockLtsyStatusL();
|
|
|
350 |
config.Reset();
|
|
|
351 |
CleanupStack::PopAndDestroy(4, this); // mobileCall, mobileLine, data, this
|
|
|
352 |
}
|
|
|
353 |
|
|
|
354 |
/**
|
|
|
355 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROL-NEGATIVE-UN0005
|
|
|
356 |
@SYMComponent telephony_ctsy
|
|
|
357 |
@SYMTestCaseDesc Test returned value if EMobilePhoneSetALSLine is not supported by LTSY
|
|
|
358 |
@SYMTestPriority High
|
|
|
359 |
@SYMTestActions Invokes RMobilePhone::SetALSLine()
|
|
|
360 |
@SYMTestExpectedResults Pass
|
|
|
361 |
@SYMTestType UT
|
|
|
362 |
*/
|
|
|
363 |
void CCTsyCallControlFUNegative::TestUnit0005L()
|
|
|
364 |
{
|
|
|
365 |
TConfig config;
|
|
|
366 |
config.SetSupportedValue(MLtsyDispatchCallControlSetActiveAlsLine::KLtsyDispatchCallControlSetActiveAlsLineApiId, EFalse);
|
|
|
367 |
|
|
|
368 |
OpenEtelServerL(EUseExtendedError);
|
|
|
369 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
|
370 |
OpenPhoneL();
|
|
|
371 |
|
|
|
372 |
TRequestStatus requestStatus;
|
|
|
373 |
RMobilePhone::TMobilePhoneALSLine alsLine = RMobilePhone::EAlternateLineAuxiliary;
|
|
|
374 |
|
|
|
375 |
iPhone.SetALSLine(requestStatus, alsLine);
|
|
|
376 |
User::WaitForRequest(requestStatus);
|
|
|
377 |
ASSERT_EQUALS(KErrNone, requestStatus.Int());
|
|
|
378 |
|
|
|
379 |
AssertMockLtsyStatusL();
|
|
|
380 |
config.Reset();
|
|
|
381 |
CleanupStack::PopAndDestroy(1, this); // data, centRep, this
|
|
|
382 |
}
|
|
|
383 |
|
|
|
384 |
/**
|
|
|
385 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROL-NEGATIVE-UN0006
|
|
|
386 |
@SYMComponent telephony_ctsy
|
|
|
387 |
@SYMTestCaseDesc Test returned value if EMobilePhoneSendDTMFTonesCancel is not supported by LTSY
|
|
|
388 |
@SYMTestPriority High
|
|
|
389 |
@SYMTestActions Invokes RMobilePhone::SendDTMFTones() and then RMobilePhone::CancelAsyncRequest()
|
|
|
390 |
@SYMTestExpectedResults Pass
|
|
|
391 |
@SYMTestType UT
|
|
|
392 |
*/
|
|
|
393 |
void CCTsyCallControlFUNegative::TestUnit0006L()
|
|
|
394 |
{
|
|
|
395 |
TConfig config;
|
|
|
396 |
config.SetSupportedValue(MLtsyDispatchCallControlSendDtmfTonesCancel::KLtsyDispatchCallControlSendDtmfTonesCancelApiId, EFalse);
|
|
|
397 |
|
|
|
398 |
OpenEtelServerL(EUseExtendedError);
|
|
|
399 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
|
400 |
OpenPhoneL();
|
|
|
401 |
|
|
|
402 |
RBuf8 data;
|
|
|
403 |
CleanupClosePushL(data);
|
|
|
404 |
|
|
|
405 |
TInt callId = 1;
|
|
|
406 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
|
407 |
DriverDialCallL(callId, mobileService);
|
|
|
408 |
|
|
|
409 |
TInfoName tones(_L("123456789"));
|
|
|
410 |
TMockLtsyData2<TInt, TInfoName> toneLtsyData(callId, tones);
|
|
|
411 |
toneLtsyData.SerialiseL(data);
|
|
|
412 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlSendDtmfTones::KLtsyDispatchCallControlSendDtmfTonesApiId, data, KErrNone);
|
|
|
413 |
iMockLTSY.CompleteL(MLtsyDispatchCallControlSendDtmfTones::KLtsyDispatchCallControlSendDtmfTonesApiId, KErrNone);
|
|
|
414 |
|
|
|
415 |
TInt hangUpCause = KErrGsmCCNormalCallClearing; // Hang up cause for normal hang up
|
|
|
416 |
DriverHangUpCallL(callId, hangUpCause);
|
|
|
417 |
|
|
|
418 |
// Client Side Test
|
|
|
419 |
RMobileLine mobileLine;
|
|
|
420 |
CleanupClosePushL(mobileLine);
|
|
|
421 |
|
|
|
422 |
RMobileCall mobileCall;
|
|
|
423 |
CleanupClosePushL(mobileCall);
|
|
|
424 |
|
|
|
425 |
ClientDialCallL(mobileLine, mobileCall, mobileService);
|
|
|
426 |
|
|
|
427 |
|
|
|
428 |
// Test sending DTMF tones and then cancelling
|
|
|
429 |
TRequestStatus requestStatus;
|
|
|
430 |
|
|
|
431 |
iPhone.SendDTMFTones(requestStatus, tones);
|
|
|
432 |
iPhone.CancelAsyncRequest(EMobilePhoneSendDTMFTones);
|
|
|
433 |
User::WaitForRequest(requestStatus);
|
|
|
434 |
ASSERT_EQUALS(KErrNone, requestStatus.Int());
|
|
|
435 |
|
|
|
436 |
TRequestStatus reqStatusTerminated;
|
|
|
437 |
iMockLTSY.NotifyTerminated(reqStatusTerminated);
|
|
|
438 |
|
|
|
439 |
ClientHangUpCallL(mobileCall);
|
|
|
440 |
|
|
|
441 |
User::WaitForRequest(reqStatusTerminated);
|
|
|
442 |
ASSERT_EQUALS(KErrNone, reqStatusTerminated.Int());
|
|
|
443 |
|
|
|
444 |
AssertMockLtsyStatusL();
|
|
|
445 |
config.Reset();
|
|
|
446 |
CleanupStack::PopAndDestroy(4, this); //mobileCall, mobileLine, data, this
|
|
|
447 |
}
|
|
|
448 |
|
|
|
449 |
/**
|
|
|
450 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROL-NEGATIVE-UN0007
|
|
|
451 |
@SYMComponent telephony_ctsy
|
|
|
452 |
@SYMTestCaseDesc Test returned value if EEtelCallHangUp is not supported by LTSY
|
|
|
453 |
@SYMTestPriority High
|
|
|
454 |
@SYMTestActions Invokes RMobileCall::HangUp()
|
|
|
455 |
@SYMTestExpectedResults Pass
|
|
|
456 |
@SYMTestType UT
|
|
|
457 |
*/
|
|
|
458 |
void CCTsyCallControlFUNegative::TestUnit0007L()
|
|
|
459 |
{
|
|
|
460 |
TConfig config;
|
|
|
461 |
config.SetSupportedValue(MLtsyDispatchCallControlHangUp::KLtsyDispatchCallControlHangUpApiId, EFalse);
|
|
|
462 |
|
|
|
463 |
OpenEtelServerL(EUseExtendedError);
|
|
|
464 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
|
465 |
OpenPhoneL();
|
|
|
466 |
|
|
|
467 |
RMobileLine mobileLine;
|
|
|
468 |
CleanupClosePushL(mobileLine);
|
|
|
469 |
|
|
|
470 |
RMobileCall mobileCall;
|
|
|
471 |
CleanupClosePushL(mobileCall);
|
|
|
472 |
|
|
|
473 |
TInt callId = 1;
|
|
|
474 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
|
475 |
DriverDialCallL(callId, mobileService);
|
|
|
476 |
|
|
|
477 |
ClientDialCallL(mobileLine, mobileCall, mobileService);
|
|
|
478 |
|
|
|
479 |
TRequestStatus requestStatus;
|
|
|
480 |
mobileCall.HangUp(requestStatus);
|
|
|
481 |
User::WaitForRequest(requestStatus);
|
|
|
482 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
|
483 |
|
|
|
484 |
AssertMockLtsyStatusL();
|
|
|
485 |
config.Reset();
|
|
|
486 |
CleanupStack::PopAndDestroy(3, this); // mobileCall, mobileLine, this
|
|
|
487 |
}
|
|
|
488 |
|
|
|
489 |
/**
|
|
|
490 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROL-NEGATIVE-UN0008
|
|
|
491 |
@SYMComponent telephony_ctsy
|
|
|
492 |
@SYMTestCaseDesc Test returned value if EMobileCallResume is not supported by LTSY
|
|
|
493 |
@SYMTestPriority High
|
|
|
494 |
@SYMTestActions Invokes RMobileCall::Resume()
|
|
|
495 |
@SYMTestExpectedResults Pass
|
|
|
496 |
@SYMTestType UT
|
|
|
497 |
*/
|
|
|
498 |
void CCTsyCallControlFUNegative::TestUnit0008L()
|
|
|
499 |
{
|
|
|
500 |
TConfig config;
|
|
|
501 |
config.SetSupportedValue(MLtsyDispatchCallControlResume::KLtsyDispatchCallControlResumeApiId, EFalse);
|
|
|
502 |
|
|
|
503 |
OpenEtelServerL(EUseExtendedError);
|
|
|
504 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
|
505 |
OpenPhoneL();
|
|
|
506 |
|
|
|
507 |
TInt callId = 1;
|
|
|
508 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
|
509 |
DriverDialCallL(callId, mobileService);
|
|
|
510 |
|
|
|
511 |
DriverHoldCallL(callId, KErrNone);
|
|
|
512 |
|
|
|
513 |
TInt hangUpCause = KErrGsmCCNormalCallClearing;
|
|
|
514 |
DriverHangUpCallL(callId, hangUpCause);
|
|
|
515 |
|
|
|
516 |
RMobileLine mobileLine;
|
|
|
517 |
CleanupClosePushL(mobileLine);
|
|
|
518 |
|
|
|
519 |
RMobileCall mobileCall;
|
|
|
520 |
CleanupClosePushL(mobileCall);
|
|
|
521 |
|
|
|
522 |
ClientDialCallL(mobileLine, mobileCall, mobileService);
|
|
|
523 |
|
|
|
524 |
TRequestStatus notifyStatus;
|
|
|
525 |
RMobileCall::TMobileCallStatus callStatus;
|
|
|
526 |
mobileCall.NotifyMobileCallStatusChange(notifyStatus, callStatus);
|
|
|
527 |
|
|
|
528 |
TRequestStatus holdStatus;
|
|
|
529 |
mobileCall.Hold(holdStatus);
|
|
|
530 |
User::WaitForRequest(holdStatus);
|
|
|
531 |
ASSERT_EQUALS(KErrNone, holdStatus.Int());
|
|
|
532 |
|
|
|
533 |
User::WaitForRequest(notifyStatus);
|
|
|
534 |
ASSERT_EQUALS(KErrNone, notifyStatus.Int());
|
|
|
535 |
ASSERT_EQUALS(RMobileCall::EStatusHold, callStatus);
|
|
|
536 |
|
|
|
537 |
TRequestStatus requestStatus;
|
|
|
538 |
|
|
|
539 |
mobileCall.Resume(requestStatus);
|
|
|
540 |
User::WaitForRequest(requestStatus);
|
|
|
541 |
ASSERT_EQUALS(requestStatus.Int(), KErrNotSupported);
|
|
|
542 |
|
|
|
543 |
TRequestStatus reqStatusTerminated;
|
|
|
544 |
iMockLTSY.NotifyTerminated(reqStatusTerminated);
|
|
|
545 |
|
|
|
546 |
ClientHangUpCallL(mobileCall);
|
|
|
547 |
|
|
|
548 |
User::WaitForRequest(reqStatusTerminated);
|
|
|
549 |
ASSERT_EQUALS(KErrNone, reqStatusTerminated.Int());
|
|
|
550 |
|
|
|
551 |
mobileCall.Close();
|
|
|
552 |
mobileLine.Close();
|
|
|
553 |
AssertMockLtsyStatusL();
|
|
|
554 |
config.Reset();
|
|
|
555 |
CleanupStack::PopAndDestroy(3, this); // mobileCall, mobileLine, this
|
|
|
556 |
}
|
|
|
557 |
|
|
|
558 |
/**
|
|
|
559 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROL-NEGATIVE-UN0009
|
|
|
560 |
@SYMComponent telephony_ctsy
|
|
|
561 |
@SYMTestCaseDesc Test returned value if EMobileCallSetDynamicHscsdParams is not supported by LTSY
|
|
|
562 |
@SYMTestPriority High
|
|
|
563 |
@SYMTestActions Invokes RMobileCall::SetDynamicHscsdParams()
|
|
|
564 |
@SYMTestExpectedResults Pass
|
|
|
565 |
@SYMTestType UT
|
|
|
566 |
*/
|
|
|
567 |
void CCTsyCallControlFUNegative::TestUnit0009L()
|
|
|
568 |
{
|
|
|
569 |
TConfig config;
|
|
|
570 |
config.SetSupportedValue(MLtsyDispatchCallControlSetDynamicHscsdParams::KLtsyDispatchCallControlSetDynamicHscsdParamsApiId, EFalse);
|
|
|
571 |
|
|
|
572 |
OpenEtelServerL(EUseExtendedError);
|
|
|
573 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
|
574 |
OpenPhoneL();
|
|
|
575 |
|
|
|
576 |
TInt callId = 1;
|
|
|
577 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
|
578 |
DriverDialCallL(callId, mobileService);
|
|
|
579 |
|
|
|
580 |
TInt hangUpCause = KErrGsmCCNormalCallClearing;
|
|
|
581 |
DriverHangUpCallL(callId, hangUpCause);
|
|
|
582 |
|
|
|
583 |
RMobileLine mobileLine;
|
|
|
584 |
CleanupClosePushL(mobileLine);
|
|
|
585 |
|
|
|
586 |
RMobileCall mobileCall;
|
|
|
587 |
CleanupClosePushL(mobileCall);
|
|
|
588 |
|
|
|
589 |
ClientDialCallL(mobileLine, mobileCall, mobileService);
|
|
|
590 |
|
|
|
591 |
TRequestStatus requestStatus;
|
|
|
592 |
RMobileCall::TMobileHscsdCallParamsV8 hscsdParams;
|
|
|
593 |
hscsdParams.iWantedAiur = RMobileCall::EAiurBps38400;
|
|
|
594 |
hscsdParams.iWantedRxTimeSlots = 2;
|
|
|
595 |
|
|
|
596 |
mobileCall.SetDynamicHscsdParams(requestStatus, hscsdParams.iWantedAiur, hscsdParams.iWantedRxTimeSlots);
|
|
|
597 |
User::WaitForRequest(requestStatus);
|
|
|
598 |
ASSERT_EQUALS(requestStatus.Int(), KErrNotSupported);
|
|
|
599 |
|
|
|
600 |
TRequestStatus reqStatusTerminated;
|
|
|
601 |
iMockLTSY.NotifyTerminated(reqStatusTerminated);
|
|
|
602 |
|
|
|
603 |
ClientHangUpCallL(mobileCall);
|
|
|
604 |
|
|
|
605 |
User::WaitForRequest(reqStatusTerminated);
|
|
|
606 |
ASSERT_EQUALS(KErrNone, reqStatusTerminated.Int());
|
|
|
607 |
|
|
|
608 |
mobileCall.Close();
|
|
|
609 |
mobileLine.Close();
|
|
|
610 |
AssertMockLtsyStatusL();
|
|
|
611 |
config.Reset();
|
|
|
612 |
CleanupStack::PopAndDestroy(3, this); // mobileCall, mobileLine, this
|
|
|
613 |
}
|
|
|
614 |
|
|
|
615 |
/**
|
|
|
616 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROL-NEGATIVE-UN0011
|
|
|
617 |
@SYMComponent telephony_ctsy
|
|
|
618 |
@SYMTestCaseDesc Test returned value if EMobileCallTransfer is not supported by LTSY
|
|
|
619 |
@SYMTestPriority High
|
|
|
620 |
@SYMTestActions Invokes RMobileCall::Transfer()
|
|
|
621 |
@SYMTestExpectedResults Pass
|
|
|
622 |
@SYMTestType UT
|
|
|
623 |
*/
|
|
|
624 |
void CCTsyCallControlFUNegative::TestUnit0011L()
|
|
|
625 |
{
|
|
|
626 |
TConfig config;
|
|
|
627 |
config.SetSupportedValue(MLtsyDispatchCallControlTransfer::KLtsyDispatchCallControlTransferApiId, EFalse);
|
|
|
628 |
|
|
|
629 |
OpenEtelServerL(EUseExtendedError);
|
|
|
630 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
|
631 |
OpenPhoneL();
|
|
|
632 |
|
|
|
633 |
TInt callId1 = 1;
|
|
|
634 |
TInt callId2 = 2;
|
|
|
635 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
|
636 |
|
|
|
637 |
DriverDialAndHoldFirstCallDialSecondCallL(mobileService, callId1, callId2);
|
|
|
638 |
|
|
|
639 |
TInt hangUpCause = KErrGsmCCNormalCallClearing;
|
|
|
640 |
|
|
|
641 |
DriverHangUpCallL(callId1, hangUpCause, EFalse);
|
|
|
642 |
DriverHangUpCallL(callId2, hangUpCause, ETrue);
|
|
|
643 |
|
|
|
644 |
RMobileLine mobileLine;
|
|
|
645 |
CleanupClosePushL(mobileLine);
|
|
|
646 |
|
|
|
647 |
RMobileCall mobileCall;
|
|
|
648 |
CleanupClosePushL(mobileCall);
|
|
|
649 |
|
|
|
650 |
RMobileLine mobileLine2;
|
|
|
651 |
CleanupClosePushL(mobileLine2);
|
|
|
652 |
|
|
|
653 |
RMobileCall mobileCall2;
|
|
|
654 |
CleanupClosePushL(mobileCall2);
|
|
|
655 |
|
|
|
656 |
ClientDialAndHoldFirstCallDialSecondCallL(mobileService, mobileCall, mobileLine,
|
|
|
657 |
mobileCall2, mobileLine2);
|
|
|
658 |
|
|
|
659 |
TRequestStatus requestStatus;
|
|
|
660 |
|
|
|
661 |
mobileCall.Transfer(requestStatus);
|
|
|
662 |
User::WaitForRequest(requestStatus);
|
|
|
663 |
ASSERT_EQUALS(requestStatus.Int(), KErrNotSupported);
|
|
|
664 |
|
|
|
665 |
RMobileCall::TMobileCallStatus callStatus;
|
|
|
666 |
ASSERT_EQUALS(KErrNone, mobileCall.GetMobileCallStatus(callStatus));
|
|
|
667 |
ASSERT_EQUALS(RMobileCall::EStatusHold, callStatus);
|
|
|
668 |
|
|
|
669 |
ASSERT_EQUALS(KErrNone, mobileCall2.GetMobileCallStatus(callStatus));
|
|
|
670 |
ASSERT_EQUALS(RMobileCall::EStatusConnected, callStatus);
|
|
|
671 |
|
|
|
672 |
TRequestStatus reqStatusTerminated;
|
|
|
673 |
iMockLTSY.NotifyTerminated(reqStatusTerminated);
|
|
|
674 |
|
|
|
675 |
ClientHangUpCallL(mobileCall);
|
|
|
676 |
ClientHangUpCallL(mobileCall2);
|
|
|
677 |
|
|
|
678 |
mobileCall.Close();
|
|
|
679 |
mobileLine.Close();
|
|
|
680 |
|
|
|
681 |
User::WaitForRequest(reqStatusTerminated);
|
|
|
682 |
ASSERT_EQUALS(reqStatusTerminated.Int(), KErrNone);
|
|
|
683 |
|
|
|
684 |
AssertMockLtsyStatusL();
|
|
|
685 |
config.Reset();
|
|
|
686 |
CleanupStack::PopAndDestroy(5, this); // mobileCall2, mobileLine2, mobileCall, mobileLine, this
|
|
|
687 |
}
|
|
|
688 |
|
|
|
689 |
/**
|
|
|
690 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROL-NEGATIVE-UN0012
|
|
|
691 |
@SYMComponent telephony_ctsy
|
|
|
692 |
@SYMTestCaseDesc Test returned value if EMobilePhoneSendDTMFTones is not supported by LTSY
|
|
|
693 |
@SYMTestPriority High
|
|
|
694 |
@SYMTestActions Invokes RMobilePhone::SendDTMFTones()
|
|
|
695 |
@SYMTestExpectedResults Pass
|
|
|
696 |
@SYMTestType UT
|
|
|
697 |
*/
|
|
|
698 |
void CCTsyCallControlFUNegative::TestUnit0012L()
|
|
|
699 |
{
|
|
|
700 |
TConfig config;
|
|
|
701 |
config.SetSupportedValue(MLtsyDispatchCallControlSendDtmfTones::KLtsyDispatchCallControlSendDtmfTonesApiId, EFalse);
|
|
|
702 |
|
|
|
703 |
OpenEtelServerL(EUseExtendedError);
|
|
|
704 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
|
705 |
OpenPhoneL();
|
|
|
706 |
|
|
|
707 |
TInt callId = 1;
|
|
|
708 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
|
709 |
DriverDialCallL(callId, mobileService);
|
|
|
710 |
|
|
|
711 |
TInt hangUpCause = KErrGsmCCNormalCallClearing; // Hang up cause for normal hang up
|
|
|
712 |
DriverHangUpCallL(callId, hangUpCause);
|
|
|
713 |
|
|
|
714 |
RMobileLine mobileLine;
|
|
|
715 |
CleanupClosePushL(mobileLine);
|
|
|
716 |
|
|
|
717 |
RMobileCall mobileCall;
|
|
|
718 |
CleanupClosePushL(mobileCall);
|
|
|
719 |
|
|
|
720 |
ClientDialCallL(mobileLine, mobileCall, mobileService);
|
|
|
721 |
|
|
|
722 |
TRequestStatus requestStatus;
|
|
|
723 |
TInfoName fullTonesString = _L("12345w67890wABCD");
|
|
|
724 |
|
|
|
725 |
iPhone.SendDTMFTones(requestStatus, fullTonesString);
|
|
|
726 |
User::WaitForRequest(requestStatus);
|
|
|
727 |
ASSERT_EQUALS(requestStatus.Int(), KErrNotSupported);
|
|
|
728 |
|
|
|
729 |
TRequestStatus reqStatusTerminated;
|
|
|
730 |
iMockLTSY.NotifyTerminated(reqStatusTerminated);
|
|
|
731 |
|
|
|
732 |
ClientHangUpCallL(mobileCall);
|
|
|
733 |
|
|
|
734 |
User::WaitForRequest(reqStatusTerminated);
|
|
|
735 |
ASSERT_EQUALS(reqStatusTerminated.Int(), KErrNone);
|
|
|
736 |
|
|
|
737 |
mobileCall.Close();
|
|
|
738 |
mobileLine.Close();
|
|
|
739 |
AssertMockLtsyStatusL();
|
|
|
740 |
config.Reset();
|
|
|
741 |
CleanupStack::PopAndDestroy(3, this); // mobileCall, mobileLine, this
|
|
|
742 |
}
|
|
|
743 |
|
|
|
744 |
/**
|
|
|
745 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROL-NEGATIVE-UN0013
|
|
|
746 |
@SYMComponent telephony_ctsy
|
|
|
747 |
@SYMTestCaseDesc Test returned value if EMobilePhoneGetIdentityServiceStatus is not supported by LTSY
|
|
|
748 |
@SYMTestPriority High
|
|
|
749 |
@SYMTestActions Invokes RMobilePhone::GetIdentityServiceStatus()
|
|
|
750 |
@SYMTestExpectedResults Pass
|
|
|
751 |
@SYMTestType UT
|
|
|
752 |
*/
|
|
|
753 |
void CCTsyCallControlFUNegative::TestUnit0013L()
|
|
|
754 |
{
|
|
|
755 |
TConfig config;
|
|
|
756 |
config.SetSupportedValue(MLtsyDispatchCallControlGetIdentityServiceStatus::KLtsyDispatchCallControlGetIdentityServiceStatusApiId, EFalse);
|
|
|
757 |
|
|
|
758 |
OpenEtelServerL(EUseExtendedError);
|
|
|
759 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
|
760 |
OpenPhoneL();
|
|
|
761 |
|
|
|
762 |
TRequestStatus requestStatus;
|
|
|
763 |
RMobilePhone::TMobilePhoneIdService expService(RMobilePhone::EIdServiceCallerPresentation);
|
|
|
764 |
TMockLtsyData1<RMobilePhone::TMobilePhoneIdService> expLtsyData(expService);
|
|
|
765 |
RMobilePhone::TMobilePhoneIdServiceStatus status;
|
|
|
766 |
|
|
|
767 |
iPhone.GetIdentityServiceStatus(requestStatus, expService, status);
|
|
|
768 |
User::WaitForRequest(requestStatus);
|
|
|
769 |
ASSERT_EQUALS(requestStatus.Int(), KErrNotSupported);
|
|
|
770 |
|
|
|
771 |
AssertMockLtsyStatusL();
|
|
|
772 |
config.Reset();
|
|
|
773 |
CleanupStack::PopAndDestroy(this); // this
|
|
|
774 |
}
|
|
|
775 |
|
|
|
776 |
/**
|
|
|
777 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROL-NEGATIVE-UN0014
|
|
|
778 |
@SYMComponent telephony_ctsy
|
|
|
779 |
@SYMTestCaseDesc Test returned value if EMobileCallSwap is not supported by LTSY
|
|
|
780 |
@SYMTestPriority High
|
|
|
781 |
@SYMTestActions Invokes RMobileCall::Swap()
|
|
|
782 |
@SYMTestExpectedResults Pass
|
|
|
783 |
@SYMTestType UT
|
|
|
784 |
*/
|
|
|
785 |
void CCTsyCallControlFUNegative::TestUnit0014L()
|
|
|
786 |
{
|
|
|
787 |
TConfig config;
|
|
|
788 |
config.SetSupportedValue(MLtsyDispatchCallControlSwap::KLtsyDispatchCallControlSwapApiId, EFalse);
|
|
|
789 |
|
|
|
790 |
OpenEtelServerL(EUseExtendedError);
|
|
|
791 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
|
792 |
OpenPhoneL();
|
|
|
793 |
|
|
|
794 |
TInt callId1 = 1;
|
|
|
795 |
TInt callId2 = 2;
|
|
|
796 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
|
797 |
|
|
|
798 |
DriverDialAndHoldFirstCallDialSecondCallL(mobileService, callId1, callId2);
|
|
|
799 |
|
|
|
800 |
TInt hangUpCause = KErrGsmCCNormalCallClearing;
|
|
|
801 |
DriverHangUpCallL(callId1, hangUpCause, EFalse);
|
|
|
802 |
DriverHangUpCallL(callId2, hangUpCause, ETrue);
|
|
|
803 |
|
|
|
804 |
RMobileLine mobileLine;
|
|
|
805 |
CleanupClosePushL(mobileLine);
|
|
|
806 |
|
|
|
807 |
RMobileCall mobileCall;
|
|
|
808 |
CleanupClosePushL(mobileCall);
|
|
|
809 |
|
|
|
810 |
RMobileLine mobileLine2;
|
|
|
811 |
CleanupClosePushL(mobileLine2);
|
|
|
812 |
|
|
|
813 |
RMobileCall mobileCall2;
|
|
|
814 |
CleanupClosePushL(mobileCall2);
|
|
|
815 |
|
|
|
816 |
ClientDialAndHoldFirstCallDialSecondCallL(mobileService, mobileCall, mobileLine,
|
|
|
817 |
mobileCall2, mobileLine2);
|
|
|
818 |
|
|
|
819 |
TRequestStatus requestStatus;
|
|
|
820 |
|
|
|
821 |
mobileCall.Swap(requestStatus);
|
|
|
822 |
User::WaitForRequest(requestStatus);
|
|
|
823 |
ASSERT_EQUALS(requestStatus.Int(), KErrNotSupported);
|
|
|
824 |
|
|
|
825 |
RMobileCall::TMobileCallStatus callStatus;
|
|
|
826 |
ASSERT_EQUALS(KErrNone, mobileCall.GetMobileCallStatus(callStatus));
|
|
|
827 |
ASSERT_EQUALS(RMobileCall::EStatusHold, callStatus);
|
|
|
828 |
|
|
|
829 |
ASSERT_EQUALS(KErrNone, mobileCall2.GetMobileCallStatus(callStatus));
|
|
|
830 |
ASSERT_EQUALS(RMobileCall::EStatusConnected, callStatus);
|
|
|
831 |
|
|
|
832 |
TRequestStatus reqStatusTerminated;
|
|
|
833 |
iMockLTSY.NotifyTerminated(reqStatusTerminated);
|
|
|
834 |
|
|
|
835 |
ClientHangUpCallL(mobileCall);
|
|
|
836 |
ClientHangUpCallL(mobileCall2);
|
|
|
837 |
|
|
|
838 |
User::WaitForRequest(reqStatusTerminated);
|
|
|
839 |
ASSERT_EQUALS(reqStatusTerminated.Int(), KErrNone);
|
|
|
840 |
|
|
|
841 |
mobileCall.Close();
|
|
|
842 |
mobileLine.Close();
|
|
|
843 |
mobileCall2.Close();
|
|
|
844 |
mobileLine2.Close();
|
|
|
845 |
AssertMockLtsyStatusL();
|
|
|
846 |
config.Reset();
|
|
|
847 |
CleanupStack::PopAndDestroy(5, this); // mobileCall2, mobileLine2, mobileCall, mobileLine, this
|
|
|
848 |
}
|
|
|
849 |
|
|
|
850 |
/**
|
|
|
851 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROL-NEGATIVE-UN0015
|
|
|
852 |
@SYMComponent telephony_ctsy
|
|
|
853 |
@SYMTestCaseDesc Test returned value if EEtelCallLoanDataPort is not supported by LTSY
|
|
|
854 |
@SYMTestPriority High
|
|
|
855 |
@SYMTestActions Invokes RMobileCall::LoanDataPort()
|
|
|
856 |
@SYMTestExpectedResults Pass
|
|
|
857 |
@SYMTestType UT
|
|
|
858 |
*/
|
|
|
859 |
void CCTsyCallControlFUNegative::TestUnit0015L()
|
|
|
860 |
{
|
|
|
861 |
TConfig config;
|
|
|
862 |
config.SetSupportedValue(MLtsyDispatchCallControlLoanDataPort::KLtsyDispatchCallControlLoanDataPortApiId, EFalse);
|
|
|
863 |
|
|
|
864 |
OpenEtelServerL(EUseExtendedError);
|
|
|
865 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
|
866 |
OpenPhoneL();
|
|
|
867 |
|
|
|
868 |
TInt callId = 1;
|
|
|
869 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
|
870 |
DriverDialCallL(callId, mobileService);
|
|
|
871 |
|
|
|
872 |
TInt hangUpCause = KErrGsmCCNormalCallClearing; // Hang up cause for normal hang up
|
|
|
873 |
DriverHangUpCallL(callId, hangUpCause);
|
|
|
874 |
|
|
|
875 |
RMobileLine mobileLine;
|
|
|
876 |
CleanupClosePushL(mobileLine);
|
|
|
877 |
|
|
|
878 |
RMobileCall mobileCall;
|
|
|
879 |
CleanupClosePushL(mobileCall);
|
|
|
880 |
|
|
|
881 |
ClientDialCallL(mobileLine, mobileCall, mobileService);
|
|
|
882 |
|
|
|
883 |
TRequestStatus requestStatus;
|
|
|
884 |
_LIT(KCom, "Com");
|
|
|
885 |
TFileName csy(KCom);
|
|
|
886 |
TName portName(KCom);
|
|
|
887 |
RCall::TCommPort port;
|
|
|
888 |
port.iCsy = csy;
|
|
|
889 |
port.iPort = portName;
|
|
|
890 |
|
|
|
891 |
mobileCall.LoanDataPort(requestStatus, port);
|
|
|
892 |
User::WaitForRequest(requestStatus);
|
|
|
893 |
ASSERT_EQUALS(requestStatus.Int(), KErrNotSupported);
|
|
|
894 |
|
|
|
895 |
TRequestStatus reqStatusTerminated;
|
|
|
896 |
iMockLTSY.NotifyTerminated(reqStatusTerminated);
|
|
|
897 |
|
|
|
898 |
ClientHangUpCallL(mobileCall);
|
|
|
899 |
|
|
|
900 |
User::WaitForRequest(reqStatusTerminated);
|
|
|
901 |
ASSERT_EQUALS(reqStatusTerminated.Int(), KErrNone);
|
|
|
902 |
|
|
|
903 |
mobileCall.Close();
|
|
|
904 |
mobileLine.Close();
|
|
|
905 |
AssertMockLtsyStatusL();
|
|
|
906 |
config.Reset();
|
|
|
907 |
CleanupStack::PopAndDestroy(3, this); // mobileCall, mobileLine, this
|
|
|
908 |
}
|
|
|
909 |
|
|
|
910 |
/**
|
|
|
911 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROL-NEGATIVE-UN0016
|
|
|
912 |
@SYMComponent telephony_ctsy
|
|
|
913 |
@SYMTestCaseDesc Test returned value if EEtelCallRecoverDataPort is not supported by LTSY
|
|
|
914 |
@SYMTestPriority High
|
|
|
915 |
@SYMTestActions Invokes RMobileCall::RecoverDataPort()
|
|
|
916 |
@SYMTestExpectedResults Pass
|
|
|
917 |
@SYMTestType UT
|
|
|
918 |
*/
|
|
|
919 |
void CCTsyCallControlFUNegative::TestUnit0016L()
|
|
|
920 |
{
|
|
|
921 |
TConfig config;
|
|
|
922 |
config.SetSupportedValue(MLtsyDispatchCallControlRecoverDataPort::KLtsyDispatchCallControlRecoverDataPortApiId, EFalse);
|
|
|
923 |
|
|
|
924 |
OpenEtelServerL(EUseExtendedError);
|
|
|
925 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
|
926 |
OpenPhoneL();
|
|
|
927 |
|
|
|
928 |
TInt callId = 1;
|
|
|
929 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
|
930 |
DriverDialCallL(callId, mobileService);
|
|
|
931 |
|
|
|
932 |
TInt hangUpCause = KErrGsmCCNormalCallClearing; // Hang up cause for normal hang up
|
|
|
933 |
DriverHangUpCallL(callId, hangUpCause);
|
|
|
934 |
|
|
|
935 |
RMobileLine mobileLine;
|
|
|
936 |
CleanupClosePushL(mobileLine);
|
|
|
937 |
|
|
|
938 |
RMobileCall mobileCall;
|
|
|
939 |
CleanupClosePushL(mobileCall);
|
|
|
940 |
|
|
|
941 |
ClientDialCallL(mobileLine, mobileCall, mobileService);
|
|
|
942 |
|
|
|
943 |
TInt err = mobileCall.RecoverDataPort();
|
|
|
944 |
ASSERT_EQUALS(err, KErrNotSupported);
|
|
|
945 |
|
|
|
946 |
TRequestStatus reqStatusTerminated;
|
|
|
947 |
iMockLTSY.NotifyTerminated(reqStatusTerminated);
|
|
|
948 |
|
|
|
949 |
ClientHangUpCallL(mobileCall);
|
|
|
950 |
|
|
|
951 |
User::WaitForRequest(reqStatusTerminated);
|
|
|
952 |
ASSERT_EQUALS(reqStatusTerminated.Int(), KErrNone);
|
|
|
953 |
|
|
|
954 |
mobileCall.Close();
|
|
|
955 |
mobileLine.Close();
|
|
|
956 |
AssertMockLtsyStatusL();
|
|
|
957 |
config.Reset();
|
|
|
958 |
CleanupStack::PopAndDestroy(3, this); // mobileCall, mobileLine, this
|
|
|
959 |
}
|
|
|
960 |
|
|
|
961 |
/**
|
|
|
962 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROL-NEGATIVE-UN0017
|
|
|
963 |
@SYMComponent telephony_ctsy
|
|
|
964 |
@SYMTestCaseDesc Test returned value if EMobilePhoneStartDTMFTone is not supported by LTSY
|
|
|
965 |
@SYMTestPriority High
|
|
|
966 |
@SYMTestActions Invokes RMobilePhone::StartDTMFTone()
|
|
|
967 |
@SYMTestExpectedResults Pass
|
|
|
968 |
@SYMTestType UT
|
|
|
969 |
*/
|
|
|
970 |
void CCTsyCallControlFUNegative::TestUnit0017L()
|
|
|
971 |
{
|
|
|
972 |
TConfig config;
|
|
|
973 |
config.SetSupportedValue(MLtsyDispatchCallControlStartDtmfTone::KLtsyDispatchCallControlStartDtmfToneApiId, EFalse);
|
|
|
974 |
|
|
|
975 |
OpenEtelServerL(EUseExtendedError);
|
|
|
976 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
|
977 |
OpenPhoneL();
|
|
|
978 |
|
|
|
979 |
TInt callId = 1;
|
|
|
980 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
|
981 |
DriverDialCallL(callId, mobileService);
|
|
|
982 |
|
|
|
983 |
RMobileLine mobileLine;
|
|
|
984 |
CleanupClosePushL(mobileLine);
|
|
|
985 |
|
|
|
986 |
RMobileCall mobileCall;
|
|
|
987 |
CleanupClosePushL(mobileCall);
|
|
|
988 |
|
|
|
989 |
ClientDialCallL(mobileLine, mobileCall, mobileService);
|
|
|
990 |
|
|
|
991 |
TChar tone('1');
|
|
|
992 |
|
|
|
993 |
TInt err = iPhone.StartDTMFTone(tone);
|
|
|
994 |
ASSERT_EQUALS(err, KErrNotSupported);
|
|
|
995 |
|
|
|
996 |
TInt hangUpCause = KErrGsmCCNormalCallClearing; // Hang up cause for normal hang up
|
|
|
997 |
DriverHangUpCallL(callId, hangUpCause);
|
|
|
998 |
|
|
|
999 |
TRequestStatus reqStatusTerminated;
|
|
|
1000 |
iMockLTSY.NotifyTerminated(reqStatusTerminated);
|
|
|
1001 |
|
|
|
1002 |
ClientHangUpCallL(mobileCall);
|
|
|
1003 |
|
|
|
1004 |
User::WaitForRequest(reqStatusTerminated);
|
|
|
1005 |
ASSERT_EQUALS(reqStatusTerminated.Int(), KErrNone);
|
|
|
1006 |
|
|
|
1007 |
AssertMockLtsyStatusL();
|
|
|
1008 |
config.Reset();
|
|
|
1009 |
CleanupStack::PopAndDestroy(3, this); // mobileCall, mobileLine, this
|
|
|
1010 |
}
|
|
|
1011 |
|
|
|
1012 |
/**
|
|
|
1013 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROL-NEGATIVE-UN0019
|
|
|
1014 |
@SYMComponent telephony_ctsy
|
|
|
1015 |
@SYMTestCaseDesc Test returned value if ECustomCheckEmergencyNumberIPC is not supported by LTSY
|
|
|
1016 |
@SYMTestPriority High
|
|
|
1017 |
@SYMTestActions Invokes RMmCustomAPI::CheckEmergencyNumber()
|
|
|
1018 |
@SYMTestExpectedResults Pass
|
|
|
1019 |
@SYMTestType UT
|
|
|
1020 |
*/
|
|
|
1021 |
void CCTsyCallControlFUNegative::TestUnit0019L()
|
|
|
1022 |
{
|
|
|
1023 |
TConfig config;
|
|
|
1024 |
config.SetSupportedValue(MLtsyDispatchCallControlQueryIsEmergencyNumber::KLtsyDispatchCallControlQueryIsEmergencyNumberApiId, EFalse);
|
|
|
1025 |
|
|
|
1026 |
OpenEtelServerL(EUseExtendedError);
|
|
|
1027 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
|
1028 |
OpenPhoneL();
|
|
|
1029 |
|
|
|
1030 |
RMmCustomAPI customApi;
|
|
|
1031 |
OpenCustomApiLC(customApi);
|
|
|
1032 |
|
|
|
1033 |
TRequestStatus requestStatus;
|
|
|
1034 |
TBool result;
|
|
|
1035 |
RMmCustomAPI::TEmerNumberCheckMode mode;
|
|
|
1036 |
_LIT(KEmerNum, "IfThisIsEmer?");
|
|
|
1037 |
mode.iCheckMode = RMmCustomAPI::EEmerNumberCheckAdvanced;
|
|
|
1038 |
mode.iNumber.Copy(KEmerNum);
|
|
|
1039 |
|
|
|
1040 |
customApi.CheckEmergencyNumber(requestStatus, mode, result);
|
|
|
1041 |
User::WaitForRequest(requestStatus);
|
|
|
1042 |
ASSERT_EQUALS(requestStatus.Int(), KErrNotSupported);
|
|
|
1043 |
|
|
|
1044 |
AssertMockLtsyStatusL();
|
|
|
1045 |
config.Reset();
|
|
|
1046 |
CleanupStack::PopAndDestroy(2, this); // customApi, this
|
|
|
1047 |
}
|
|
|
1048 |
|
|
|
1049 |
/**
|
|
|
1050 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROL-NEGATIVE-UN0021
|
|
|
1051 |
@SYMComponent telephony_ctsy
|
|
|
1052 |
@SYMTestCaseDesc Test returned value if ECustomGetAlsBlockedIPC is not supported by LTSY
|
|
|
1053 |
@SYMTestPriority High
|
|
|
1054 |
@SYMTestActions Invokes RMmCustomAPI::GetAlsBlocked()
|
|
|
1055 |
@SYMTestExpectedResults Pass
|
|
|
1056 |
@SYMTestType UT
|
|
|
1057 |
*/
|
|
|
1058 |
void CCTsyCallControlFUNegative::TestUnit0021L()
|
|
|
1059 |
{
|
|
|
1060 |
TConfig config;
|
|
|
1061 |
config.SetSupportedValue(MLtsyDispatchCallControlGetAlsBlockedStatus::KLtsyDispatchCallControlGetAlsBlockedStatusApiId, EFalse);
|
|
|
1062 |
|
|
|
1063 |
OpenEtelServerL(EUseExtendedError);
|
|
|
1064 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
|
1065 |
OpenPhoneL();
|
|
|
1066 |
|
|
|
1067 |
RMmCustomAPI customApi;
|
|
|
1068 |
OpenCustomApiLC(customApi);
|
|
|
1069 |
|
|
|
1070 |
TRequestStatus requestStatus;
|
|
|
1071 |
RMmCustomAPI::TGetAlsBlockStatus status;
|
|
|
1072 |
|
|
|
1073 |
TInt err = customApi.GetAlsBlocked(status);
|
|
|
1074 |
ASSERT_EQUALS(err, KErrNotSupported);
|
|
|
1075 |
|
|
|
1076 |
AssertMockLtsyStatusL();
|
|
|
1077 |
config.Reset();
|
|
|
1078 |
CleanupStack::PopAndDestroy(2, this); // customApi, this
|
|
|
1079 |
}
|
|
|
1080 |
|
|
|
1081 |
/**
|
|
|
1082 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROL-NEGATIVE-UN0022
|
|
|
1083 |
@SYMComponent telephony_ctsy
|
|
|
1084 |
@SYMTestCaseDesc Test returned value if ECustomSetAlsBlockedIPC is not supported by LTSY
|
|
|
1085 |
@SYMTestPriority High
|
|
|
1086 |
@SYMTestActions Invokes RMmCustomAPI::SetAlsBlocked()
|
|
|
1087 |
@SYMTestExpectedResults Pass
|
|
|
1088 |
@SYMTestType UT
|
|
|
1089 |
*/
|
|
|
1090 |
void CCTsyCallControlFUNegative::TestUnit0022L()
|
|
|
1091 |
{
|
|
|
1092 |
TConfig config;
|
|
|
1093 |
config.SetSupportedValue(MLtsyDispatchCallControlSetAlsBlocked::KLtsyDispatchCallControlSetAlsBlockedApiId, EFalse);
|
|
|
1094 |
|
|
|
1095 |
OpenEtelServerL(EUseExtendedError);
|
|
|
1096 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
|
1097 |
OpenPhoneL();
|
|
|
1098 |
|
|
|
1099 |
RMmCustomAPI customApi;
|
|
|
1100 |
OpenCustomApiLC(customApi);
|
|
|
1101 |
|
|
|
1102 |
TRequestStatus requestStatus;
|
|
|
1103 |
RMmCustomAPI::TSetAlsBlock setData = RMmCustomAPI::EActivateBlock;
|
|
|
1104 |
|
|
|
1105 |
TInt err = customApi.SetAlsBlocked(setData);
|
|
|
1106 |
ASSERT_EQUALS(err, KErrNotSupported);
|
|
|
1107 |
|
|
|
1108 |
AssertMockLtsyStatusL();
|
|
|
1109 |
config.Reset();
|
|
|
1110 |
CleanupStack::PopAndDestroy(2, this); // customApi, this
|
|
|
1111 |
}
|
|
|
1112 |
|
|
|
1113 |
/**
|
|
|
1114 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROL-NEGATIVE-UN0023
|
|
|
1115 |
@SYMComponent telephony_ctsy
|
|
|
1116 |
@SYMTestCaseDesc Test returned value if ECustomGetLifeTimeIPC is not supported by LTSY
|
|
|
1117 |
@SYMTestPriority High
|
|
|
1118 |
@SYMTestActions Invokes RMmCustomAPI::GetLifeTime()
|
|
|
1119 |
@SYMTestExpectedResults Pass
|
|
|
1120 |
@SYMTestType UT
|
|
|
1121 |
*/
|
|
|
1122 |
void CCTsyCallControlFUNegative::TestUnit0023L()
|
|
|
1123 |
{
|
|
|
1124 |
TConfig config;
|
|
|
1125 |
config.SetSupportedValue(MLtsyDispatchCallControlGetLifeTime::KLtsyDispatchCallControlGetLifeTimeApiId, EFalse);
|
|
|
1126 |
|
|
|
1127 |
OpenEtelServerL(EUseExtendedError);
|
|
|
1128 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
|
1129 |
OpenPhoneL();
|
|
|
1130 |
|
|
|
1131 |
RMmCustomAPI customApi;
|
|
|
1132 |
OpenCustomApiLC(customApi);
|
|
|
1133 |
|
|
|
1134 |
TRequestStatus requestStatus;
|
|
|
1135 |
RMmCustomAPI::TLifeTimeData lifeTime;
|
|
|
1136 |
RMmCustomAPI::TLifeTimeDataPckg lifeTimePckg(lifeTime);
|
|
|
1137 |
|
|
|
1138 |
TInt err = customApi.GetLifeTime(lifeTimePckg);
|
|
|
1139 |
ASSERT_EQUALS(err, KErrNotSupported);
|
|
|
1140 |
|
|
|
1141 |
AssertMockLtsyStatusL();
|
|
|
1142 |
config.Reset();
|
|
|
1143 |
CleanupStack::PopAndDestroy(2, this); // customApi, this
|
|
|
1144 |
}
|
|
|
1145 |
|
|
|
1146 |
/**
|
|
|
1147 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROL-NEGATIVE-UN0024
|
|
|
1148 |
@SYMComponent telephony_ctsy
|
|
|
1149 |
@SYMTestCaseDesc Test returned value if ECustomTerminateCallIPC is not supported by LTSY
|
|
|
1150 |
@SYMTestPriority High
|
|
|
1151 |
@SYMTestActions Invokes RMmCustomAPI::TerminateCall()
|
|
|
1152 |
@SYMTestExpectedResults Pass
|
|
|
1153 |
@SYMTestType UT
|
|
|
1154 |
*/
|
|
|
1155 |
void CCTsyCallControlFUNegative::TestUnit0024L()
|
|
|
1156 |
{
|
|
|
1157 |
TConfig config;
|
|
|
1158 |
config.SetSupportedValue(MLtsyDispatchCallControlTerminateAllCalls::KLtsyDispatchCallControlTerminateAllCallsApiId, EFalse);
|
|
|
1159 |
// or MLtsyDispatchCallControlTerminateErrorCall::KLtsyDispatchCallControlTerminateErrorCallApiId
|
|
|
1160 |
|
|
|
1161 |
OpenEtelServerL(EUseExtendedError);
|
|
|
1162 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
|
1163 |
OpenPhoneL();
|
|
|
1164 |
|
|
|
1165 |
TRequestStatus requestStatus;
|
|
|
1166 |
RMmCustomAPI customApi;
|
|
|
1167 |
OpenCustomApiLC(customApi);
|
|
|
1168 |
|
|
|
1169 |
TInt callId = 1;
|
|
|
1170 |
DriverDialCallL(callId, RMobilePhone::EVoiceService);
|
|
|
1171 |
|
|
|
1172 |
RMobileLine mobileLine;
|
|
|
1173 |
CleanupClosePushL(mobileLine);
|
|
|
1174 |
|
|
|
1175 |
RMobileCall mobileCall;
|
|
|
1176 |
CleanupClosePushL(mobileCall);
|
|
|
1177 |
|
|
|
1178 |
ClientDialCallL(mobileLine, mobileCall, RMobilePhone::EVoiceService);
|
|
|
1179 |
|
|
|
1180 |
// Getting the call information
|
|
|
1181 |
RMobileCall::TMobileCallInfoV1 callInfo;
|
|
|
1182 |
RMobileCall::TMobileCallInfoV1Pckg callInfoPckg(callInfo);
|
|
|
1183 |
ASSERT_EQUALS(KErrNone, mobileCall.GetMobileCallInfo(callInfoPckg));
|
|
|
1184 |
ASSERT_EQUALS(callId , callInfo.iCallId);
|
|
|
1185 |
|
|
|
1186 |
TInt err = customApi.TerminateCall(callInfo.iCallName);
|
|
|
1187 |
ASSERT_EQUALS(err, KErrNotSupported);
|
|
|
1188 |
|
|
|
1189 |
// Hang up the call
|
|
|
1190 |
DriverHangUpCallL(callId, KErrGsmCCNormalCallClearing);
|
|
|
1191 |
|
|
|
1192 |
TRequestStatus reqStatusTerminated;
|
|
|
1193 |
iMockLTSY.NotifyTerminated(reqStatusTerminated);
|
|
|
1194 |
|
|
|
1195 |
ClientHangUpCallL(mobileCall);
|
|
|
1196 |
|
|
|
1197 |
User::WaitForRequest(reqStatusTerminated);
|
|
|
1198 |
ASSERT_EQUALS(reqStatusTerminated.Int(), KErrNone);
|
|
|
1199 |
|
|
|
1200 |
AssertMockLtsyStatusL();
|
|
|
1201 |
config.Reset();
|
|
|
1202 |
CleanupStack::PopAndDestroy(4, this); // mobileCall, mobileLine, customApi, this
|
|
|
1203 |
}
|