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 "listretrieverao.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 "cctsyphonefunegative.h"
|
|
38 |
|
|
39 |
CTestSuite* CCTsyPhoneFUNegative::CreateSuiteL(const TDesC& aName)
|
|
40 |
{
|
|
41 |
SUB_SUITE;
|
|
42 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0001L);
|
|
43 |
|
|
44 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0007L);
|
|
45 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0008L);
|
|
46 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0009L);
|
|
47 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0010L);
|
|
48 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0011L);
|
|
49 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0012L);
|
|
50 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0013L);
|
|
51 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0014L);
|
|
52 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0015L);
|
|
53 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0016L);
|
|
54 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0017L);
|
|
55 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0018L);
|
|
56 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0019L);
|
|
57 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0020L);
|
|
58 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0021L);
|
|
59 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0022L);
|
|
60 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0023L);
|
|
61 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0024L);
|
|
62 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0025L);
|
|
63 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0026L);
|
|
64 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0027L);
|
|
65 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0028L);
|
|
66 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0029L);
|
|
67 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0030L);
|
|
68 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhoneFUNegative, TestUnit0031L);
|
|
69 |
|
|
70 |
END_SUITE;
|
|
71 |
}
|
|
72 |
//
|
|
73 |
// 'Negative' unit tests
|
|
74 |
//
|
|
75 |
|
|
76 |
/**
|
|
77 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0001
|
|
78 |
@SYMComponent telephony_ctsy
|
|
79 |
@SYMTestCaseDesc Test returned value if EMobilePhoneGetFdnStatus is not supported by LTSY
|
|
80 |
@SYMTestPriority High
|
|
81 |
@SYMTestActions Invokes RMobilePhone::GetFdnStatus() (Sync and Async)
|
|
82 |
@SYMTestExpectedResults Pass
|
|
83 |
@SYMTestType UT
|
|
84 |
*/
|
|
85 |
void CCTsyPhoneFUNegative::TestUnit0001L()
|
|
86 |
{
|
|
87 |
TConfig config;
|
|
88 |
config.SetSupportedValue(MLtsyDispatchPhoneGetFdnStatus::KLtsyDispatchPhoneGetFdnStatusApiId, EFalse);
|
|
89 |
|
|
90 |
OpenEtelServerL(EUseExtendedError);
|
|
91 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
92 |
OpenPhoneL();
|
|
93 |
|
|
94 |
TRequestStatus requestStatus;
|
|
95 |
RMobilePhone::TMobilePhoneFdnStatus fdnStatus;
|
|
96 |
|
|
97 |
iPhone.GetFdnStatus(requestStatus, fdnStatus);
|
|
98 |
User::WaitForRequest(requestStatus);
|
|
99 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
100 |
|
|
101 |
TInt err = iPhone.GetFdnStatus(fdnStatus);
|
|
102 |
ASSERT_EQUALS(KErrNotSupported, err);
|
|
103 |
|
|
104 |
AssertMockLtsyStatusL();
|
|
105 |
config.Reset();
|
|
106 |
CleanupStack::PopAndDestroy(this); // this
|
|
107 |
}
|
|
108 |
|
|
109 |
/**
|
|
110 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0007
|
|
111 |
@SYMComponent telephony_ctsy
|
|
112 |
@SYMTestCaseDesc Test returned value if ECustomNetWakeupIPC is not supported by LTSY
|
|
113 |
@SYMTestPriority High
|
|
114 |
@SYMTestActions Invokes RMmCustomAPI::NetWakeup()
|
|
115 |
@SYMTestExpectedResults Pass
|
|
116 |
@SYMTestType UT
|
|
117 |
*/
|
|
118 |
void CCTsyPhoneFUNegative::TestUnit0007L()
|
|
119 |
{
|
|
120 |
//
|
|
121 |
TConfig config;
|
|
122 |
config.SetSupportedValue(MLtsyDispatchPhoneNspsWakeup::KLtsyDispatchPhoneNspsWakeupApiId, EFalse);
|
|
123 |
|
|
124 |
OpenEtelServerL(EUseExtendedError);
|
|
125 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
126 |
OpenPhoneL();
|
|
127 |
|
|
128 |
TRequestStatus requestStatus;
|
|
129 |
RMmCustomAPI customApi;
|
|
130 |
OpenCustomApiLC(customApi);
|
|
131 |
|
|
132 |
customApi.NetWakeup(requestStatus);
|
|
133 |
User::WaitForRequest(requestStatus);
|
|
134 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
135 |
|
|
136 |
AssertMockLtsyStatusL();
|
|
137 |
config.Reset();
|
|
138 |
CleanupStack::PopAndDestroy(2, this); // customApi, data, this
|
|
139 |
}
|
|
140 |
|
|
141 |
/**
|
|
142 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0008
|
|
143 |
@SYMComponent telephony_ctsy
|
|
144 |
@SYMTestCaseDesc Test returned value if ECustomSetSystemNetworkModeIPC is not supported by LTSY
|
|
145 |
@SYMTestPriority High
|
|
146 |
@SYMTestActions Invokes customApi::SetSystemNetworkMode() (Sync and Async)
|
|
147 |
@SYMTestExpectedResults Pass
|
|
148 |
@SYMTestType UT
|
|
149 |
*/
|
|
150 |
void CCTsyPhoneFUNegative::TestUnit0008L()
|
|
151 |
{
|
|
152 |
TConfig config;
|
|
153 |
config.SetSupportedValue(MLtsyDispatchPhoneSetSystemNetworkMode::KLtsyDispatchPhoneSetSystemNetworkModeApiId, EFalse);
|
|
154 |
|
|
155 |
OpenEtelServerL(EUseExtendedError);
|
|
156 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
157 |
OpenPhoneL();
|
|
158 |
|
|
159 |
TRequestStatus requestStatus;
|
|
160 |
RMmCustomAPI customApi;
|
|
161 |
OpenCustomApiLC(customApi);
|
|
162 |
|
|
163 |
RMmCustomAPI::TNetworkModeCaps mode = RMmCustomAPI::KCapsNetworkModeUmts;
|
|
164 |
|
|
165 |
// Check sync version of the API
|
|
166 |
TInt err = customApi.SetSystemNetworkMode(mode);
|
|
167 |
ASSERT_EQUALS(KErrNotSupported, err);
|
|
168 |
|
|
169 |
// Check async version of the API
|
|
170 |
customApi.SetSystemNetworkMode(requestStatus, mode);
|
|
171 |
User::WaitForRequest(requestStatus);
|
|
172 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
173 |
|
|
174 |
AssertMockLtsyStatusL();
|
|
175 |
config.Reset();
|
|
176 |
CleanupStack::PopAndDestroy(2, this); // customApi, this
|
|
177 |
}
|
|
178 |
|
|
179 |
/**
|
|
180 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0009
|
|
181 |
@SYMComponent telephony_ctsy
|
|
182 |
@SYMTestCaseDesc Test returned value if ECustomGetCurrentSystemNetworkModesIPC is not supported by LTSY
|
|
183 |
@SYMTestPriority High
|
|
184 |
@SYMTestActions Invokes customApi::GetCurrentSystemNetworkModes() (Sync and Async)
|
|
185 |
@SYMTestExpectedResults Pass
|
|
186 |
@SYMTestType UT
|
|
187 |
*/
|
|
188 |
void CCTsyPhoneFUNegative::TestUnit0009L()
|
|
189 |
{
|
|
190 |
TConfig config;
|
|
191 |
config.SetSupportedValue(MLtsyDispatchPhoneGetCurrentSystemNetworkModes::KLtsyDispatchPhoneGetCurrentSystemNetworkModesApiId, EFalse);
|
|
192 |
|
|
193 |
OpenEtelServerL(EUseExtendedError);
|
|
194 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
195 |
OpenPhoneL();
|
|
196 |
|
|
197 |
TRequestStatus requestStatus;
|
|
198 |
RMmCustomAPI customApi;
|
|
199 |
OpenCustomApiLC(customApi);
|
|
200 |
|
|
201 |
TUint32 modes;
|
|
202 |
|
|
203 |
// Check sync version of the API
|
|
204 |
TInt err = customApi.GetCurrentSystemNetworkModes(modes);
|
|
205 |
ASSERT_EQUALS(KErrNotSupported, err);
|
|
206 |
|
|
207 |
// Check async version of the API
|
|
208 |
customApi.GetCurrentSystemNetworkModes(requestStatus, modes);
|
|
209 |
User::WaitForRequest(requestStatus);
|
|
210 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
211 |
|
|
212 |
AssertMockLtsyStatusL();
|
|
213 |
config.Reset();
|
|
214 |
CleanupStack::PopAndDestroy(2, this); // customApi, this
|
|
215 |
}
|
|
216 |
|
|
217 |
/**
|
|
218 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0010
|
|
219 |
@SYMComponent telephony_ctsy
|
|
220 |
@SYMTestCaseDesc Test returned value if ECustomResetNetServerIPC is not supported by LTSY
|
|
221 |
@SYMTestPriority High
|
|
222 |
@SYMTestActions Invokes customApi::ResetNetServer()
|
|
223 |
@SYMTestExpectedResults Pass
|
|
224 |
@SYMTestType UT
|
|
225 |
*/
|
|
226 |
void CCTsyPhoneFUNegative::TestUnit0010L()
|
|
227 |
{
|
|
228 |
TConfig config;
|
|
229 |
config.SetSupportedValue(MLtsyDispatchPhoneResetNetServer::KLtsyDispatchPhoneResetNetServerApiId, EFalse);
|
|
230 |
|
|
231 |
OpenEtelServerL(EUseExtendedError);
|
|
232 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
233 |
OpenPhoneL();
|
|
234 |
|
|
235 |
TRequestStatus requestStatus;
|
|
236 |
RMmCustomAPI customApi;
|
|
237 |
OpenCustomApiLC(customApi);
|
|
238 |
|
|
239 |
customApi.ResetNetServer(requestStatus);
|
|
240 |
User::WaitForRequest(requestStatus);
|
|
241 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
242 |
|
|
243 |
AssertMockLtsyStatusL();
|
|
244 |
config.Reset();
|
|
245 |
CleanupStack::PopAndDestroy(2, this); // customApi, this
|
|
246 |
}
|
|
247 |
|
|
248 |
/**
|
|
249 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0011
|
|
250 |
@SYMComponent telephony_ctsy
|
|
251 |
@SYMTestCaseDesc Test returned value if ECustomSetAlwaysOnMode is not supported by LTSY
|
|
252 |
@SYMTestPriority High
|
|
253 |
@SYMTestActions Invokes customApi::SetAlwaysOn()
|
|
254 |
@SYMTestExpectedResults Pass
|
|
255 |
@SYMTestType UT
|
|
256 |
*/
|
|
257 |
void CCTsyPhoneFUNegative::TestUnit0011L()
|
|
258 |
{
|
|
259 |
TConfig config;
|
|
260 |
config.SetSupportedValue(MLtsyDispatchPhoneSetAlwaysOnMode::KLtsyDispatchPhoneSetAlwaysOnModeApiId, EFalse);
|
|
261 |
|
|
262 |
OpenEtelServerL(EUseExtendedError);
|
|
263 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
264 |
OpenPhoneL();
|
|
265 |
|
|
266 |
TRequestStatus requestStatus;
|
|
267 |
RMmCustomAPI customApi;
|
|
268 |
OpenCustomApiLC(customApi);
|
|
269 |
|
|
270 |
// Open a packet service, ctsy must have a packet service sub session in order to activate the SetAlwaysOn
|
|
271 |
RPacketService packetService;
|
|
272 |
OpenPacketServiceLC(packetService,RPacketService::EStatusUnattached);
|
|
273 |
|
|
274 |
RMmCustomAPI::TSetAlwaysOnMode expData = RMmCustomAPI::EAlwaysModeBoth;
|
|
275 |
|
|
276 |
customApi.SetAlwaysOn(requestStatus, expData);
|
|
277 |
User::WaitForRequest(requestStatus);
|
|
278 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
279 |
|
|
280 |
AssertMockLtsyStatusL();
|
|
281 |
config.Reset();
|
|
282 |
CleanupStack::PopAndDestroy(3, this); // customApi, packetService, this
|
|
283 |
}
|
|
284 |
|
|
285 |
/**
|
|
286 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0012
|
|
287 |
@SYMComponent telephony_ctsy
|
|
288 |
@SYMTestCaseDesc Test returned value if ECustomSetDriveModeIPC is not supported by LTSY
|
|
289 |
@SYMTestPriority High
|
|
290 |
@SYMTestActions Invokes customApi::SetDriveMode()
|
|
291 |
@SYMTestExpectedResults Pass
|
|
292 |
@SYMTestType UT
|
|
293 |
*/
|
|
294 |
void CCTsyPhoneFUNegative::TestUnit0012L()
|
|
295 |
{
|
|
296 |
TConfig config;
|
|
297 |
config.SetSupportedValue(MLtsyDispatchPhoneSetDriveMode::KLtsyDispatchPhoneSetDriveModeApiId, EFalse);
|
|
298 |
|
|
299 |
OpenEtelServerL(EUseExtendedError);
|
|
300 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
301 |
OpenPhoneL();
|
|
302 |
|
|
303 |
TRequestStatus requestStatus;
|
|
304 |
RMmCustomAPI customApi;
|
|
305 |
OpenCustomApiLC(customApi);
|
|
306 |
|
|
307 |
customApi.SetDriveMode(requestStatus, RMmCustomAPI::EActivateDriveMode);
|
|
308 |
User::WaitForRequest(requestStatus);
|
|
309 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
310 |
|
|
311 |
AssertMockLtsyStatusL();
|
|
312 |
config.Reset();
|
|
313 |
CleanupStack::PopAndDestroy(2, this); // customApi, this
|
|
314 |
}
|
|
315 |
|
|
316 |
/**
|
|
317 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0013
|
|
318 |
@SYMComponent telephony_ctsy
|
|
319 |
@SYMTestCaseDesc Test returned value if ECustomReadHSxPAStatusIPC is not supported by LTSY
|
|
320 |
@SYMTestPriority High
|
|
321 |
@SYMTestActions Invokes customApi::ReadHSxPAStatus()
|
|
322 |
@SYMTestExpectedResults Pass
|
|
323 |
@SYMTestType UT
|
|
324 |
*/
|
|
325 |
void CCTsyPhoneFUNegative::TestUnit0013L()
|
|
326 |
{
|
|
327 |
|
|
328 |
TConfig config;
|
|
329 |
config.SetSupportedValue(MLtsyDispatchPhoneGetHspaStatus::KLtsyDispatchPhoneGetHspaStatusApiId, EFalse);
|
|
330 |
|
|
331 |
OpenEtelServerL(EUseExtendedError);
|
|
332 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
333 |
OpenPhoneL();
|
|
334 |
|
|
335 |
TRequestStatus requestStatus;
|
|
336 |
RMmCustomAPI customApi;
|
|
337 |
OpenCustomApiLC(customApi);
|
|
338 |
|
|
339 |
RMmCustomAPI::THSxPAStatus hspaStatus;
|
|
340 |
|
|
341 |
customApi.ReadHSxPAStatus(requestStatus, hspaStatus);
|
|
342 |
User::WaitForRequest(requestStatus);
|
|
343 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
344 |
|
|
345 |
AssertMockLtsyStatusL();
|
|
346 |
config.Reset();
|
|
347 |
CleanupStack::PopAndDestroy(2, this); // customApi, this
|
|
348 |
}
|
|
349 |
|
|
350 |
/**
|
|
351 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0014
|
|
352 |
@SYMComponent telephony_ctsy
|
|
353 |
@SYMTestCaseDesc Test returned value if ECustomWriteHSxPAStatusIPC is not supported by LTSY
|
|
354 |
@SYMTestPriority High
|
|
355 |
@SYMTestActions Invokes customApi::WriteHSxPAStatus()
|
|
356 |
@SYMTestExpectedResults Pass
|
|
357 |
@SYMTestType UT
|
|
358 |
*/
|
|
359 |
void CCTsyPhoneFUNegative::TestUnit0014L()
|
|
360 |
{
|
|
361 |
TConfig config;
|
|
362 |
config.SetSupportedValue(MLtsyDispatchPhoneSetHspaStatus::KLtsyDispatchPhoneSetHspaStatusApiId, EFalse);
|
|
363 |
|
|
364 |
OpenEtelServerL(EUseExtendedError);
|
|
365 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
366 |
OpenPhoneL();
|
|
367 |
|
|
368 |
TRequestStatus requestStatus;
|
|
369 |
RMmCustomAPI customApi;
|
|
370 |
OpenCustomApiLC(customApi);
|
|
371 |
|
|
372 |
RMmCustomAPI::THSxPAStatus hspaStatus = RMmCustomAPI::EHSxPAEnabled;
|
|
373 |
|
|
374 |
customApi.WriteHSxPAStatus(requestStatus, hspaStatus);
|
|
375 |
User::WaitForRequest(requestStatus);
|
|
376 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
377 |
|
|
378 |
AssertMockLtsyStatusL();
|
|
379 |
config.Reset();
|
|
380 |
CleanupStack::PopAndDestroy(2, this); // customApi, this
|
|
381 |
}
|
|
382 |
|
|
383 |
/**
|
|
384 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0015
|
|
385 |
@SYMComponent telephony_ctsy
|
|
386 |
@SYMTestCaseDesc Test returned value if ECustomGetNetworkProviderNameIPC is not supported by LTSY
|
|
387 |
@SYMTestPriority High
|
|
388 |
@SYMTestActions Invokes customApi::GetNetworkProviderName() (Sync and Async)
|
|
389 |
@SYMTestExpectedResults Pass
|
|
390 |
@SYMTestType UT
|
|
391 |
*/
|
|
392 |
void CCTsyPhoneFUNegative::TestUnit0015L()
|
|
393 |
{
|
|
394 |
TConfig config;
|
|
395 |
config.SetSupportedValue(MLtsyDispatchPhoneGetNetworkProviderName::KLtsyDispatchPhoneGetNetworkProviderNameApiId, EFalse);
|
|
396 |
|
|
397 |
OpenEtelServerL(EUseExtendedError);
|
|
398 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
399 |
OpenPhoneL();
|
|
400 |
|
|
401 |
TRequestStatus requestStatus;
|
|
402 |
RMmCustomAPI customApi;
|
|
403 |
OpenCustomApiLC(customApi);
|
|
404 |
|
|
405 |
RMobilePhone::TMobilePhoneNetworkLongName name;
|
|
406 |
|
|
407 |
// Check sync version of the API
|
|
408 |
TInt err = customApi.GetNetworkProviderName(name);
|
|
409 |
ASSERT_EQUALS(KErrNotSupported, err);
|
|
410 |
|
|
411 |
// Check async version of the API
|
|
412 |
customApi.GetNetworkProviderName(requestStatus, name);
|
|
413 |
User::WaitForRequest(requestStatus);
|
|
414 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
415 |
|
|
416 |
AssertMockLtsyStatusL();
|
|
417 |
config.Reset();
|
|
418 |
CleanupStack::PopAndDestroy(2, this); // customApi, this
|
|
419 |
}
|
|
420 |
|
|
421 |
/**
|
|
422 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0016
|
|
423 |
@SYMComponent telephony_ctsy
|
|
424 |
@SYMTestCaseDesc Test returned value if ECustomGetOperatorNameIPC is not supported by LTSY
|
|
425 |
@SYMTestPriority High
|
|
426 |
@SYMTestActions Invokes customApi::GetOperatorName()
|
|
427 |
@SYMTestExpectedResults Pass
|
|
428 |
@SYMTestType UT
|
|
429 |
*/
|
|
430 |
void CCTsyPhoneFUNegative::TestUnit0016L()
|
|
431 |
{
|
|
432 |
TConfig config;
|
|
433 |
config.SetSupportedValue(MLtsyDispatchPhoneGetOperatorName::KLtsyDispatchPhoneGetOperatorNameApiId, EFalse);
|
|
434 |
|
|
435 |
OpenEtelServerL(EUseExtendedError);
|
|
436 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
437 |
OpenPhoneL();
|
|
438 |
|
|
439 |
TRequestStatus requestStatus;
|
|
440 |
RMmCustomAPI customApi;
|
|
441 |
OpenCustomApiLC(customApi);
|
|
442 |
|
|
443 |
RMmCustomAPI::TOperatorNameInfo getNameInfo;
|
|
444 |
|
|
445 |
customApi.GetOperatorName(requestStatus, getNameInfo);
|
|
446 |
User::WaitForRequest(requestStatus);
|
|
447 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
448 |
|
|
449 |
AssertMockLtsyStatusL();
|
|
450 |
config.Reset();
|
|
451 |
CleanupStack::PopAndDestroy(2, this); // customApi, this
|
|
452 |
}
|
|
453 |
|
|
454 |
/**
|
|
455 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0017
|
|
456 |
@SYMComponent telephony_ctsy
|
|
457 |
@SYMTestCaseDesc Test returned value if ECustomGetCellInfoIPC is not supported by LTSY
|
|
458 |
@SYMTestPriority High
|
|
459 |
@SYMTestActions Invokes customApi::GetCellInfo()
|
|
460 |
@SYMTestExpectedResults Pass
|
|
461 |
@SYMTestType UT
|
|
462 |
*/
|
|
463 |
void CCTsyPhoneFUNegative::TestUnit0017L()
|
|
464 |
{
|
|
465 |
TConfig config;
|
|
466 |
config.SetSupportedValue(MLtsyDispatchPhoneGetCellInfo::KLtsyDispatchPhoneGetCellInfoApiId, EFalse);
|
|
467 |
|
|
468 |
OpenEtelServerL(EUseExtendedError);
|
|
469 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
470 |
OpenPhoneL();
|
|
471 |
|
|
472 |
TRequestStatus requestStatus;
|
|
473 |
RMmCustomAPI customApi;
|
|
474 |
OpenCustomApiLC(customApi);
|
|
475 |
|
|
476 |
RMmCustomAPI::TMmCellInfo* getInfo = new(ELeave) RMmCustomAPI::TMmCellInfo;
|
|
477 |
CleanupStack::PushL(getInfo);
|
|
478 |
RMmCustomAPI::TMmCellInfoPckg *getInfoPckg = new(ELeave) RMmCustomAPI::TMmCellInfoPckg(*getInfo);
|
|
479 |
CleanupStack::PushL(getInfoPckg);
|
|
480 |
|
|
481 |
customApi.GetCellInfo(requestStatus, *getInfoPckg);
|
|
482 |
User::WaitForRequest(requestStatus);
|
|
483 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
484 |
|
|
485 |
AssertMockLtsyStatusL();
|
|
486 |
config.Reset();
|
|
487 |
CleanupStack::PopAndDestroy(4, this); //getInfoPckg, getInfo, customApi, this
|
|
488 |
}
|
|
489 |
|
|
490 |
/**
|
|
491 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0018
|
|
492 |
@SYMComponent telephony_ctsy
|
|
493 |
@SYMTestCaseDesc Test returned value if ECtsyPhoneTerminateAllCallsReq is not supported by LTSY
|
|
494 |
@SYMTestPriority High
|
|
495 |
@SYMTestActions Invokes
|
|
496 |
@SYMTestExpectedResults Pass
|
|
497 |
@SYMTestType UT
|
|
498 |
*/
|
|
499 |
void CCTsyPhoneFUNegative::TestUnit0018L()
|
|
500 |
{
|
|
501 |
//
|
|
502 |
TConfig config;
|
|
503 |
config.SetSupportedValue(MLtsyDispatchPhoneTerminateAllCalls::KLtsyDispatchPhoneTerminateAllCallsApiId, EFalse);
|
|
504 |
|
|
505 |
OpenEtelServerL(EUseExtendedError);
|
|
506 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
507 |
OpenPhoneL();
|
|
508 |
|
|
509 |
TInt callId = 1;
|
|
510 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
511 |
DriverDialCallL(callId, mobileService);
|
|
512 |
|
|
513 |
RMobileLine mobileLine;
|
|
514 |
CleanupClosePushL(mobileLine);
|
|
515 |
|
|
516 |
RMobileCall mobileCall;
|
|
517 |
CleanupClosePushL(mobileCall);
|
|
518 |
|
|
519 |
ClientDialCallL(mobileLine, mobileCall, mobileService);
|
|
520 |
|
|
521 |
TRequestStatus requestStatus;
|
|
522 |
|
|
523 |
iPhone.TerminateAllCalls(requestStatus);
|
|
524 |
User::WaitForRequest(requestStatus);
|
|
525 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
526 |
|
|
527 |
TInt hangUpCause = KErrGsmCCNormalCallClearing; // Hang up cause for normal hang up
|
|
528 |
DriverHangUpCallL(callId, hangUpCause, ETrue);
|
|
529 |
|
|
530 |
TRequestStatus reqStatusTerminated;
|
|
531 |
iMockLTSY.NotifyTerminated(reqStatusTerminated);
|
|
532 |
|
|
533 |
ClientHangUpCallL(mobileCall);
|
|
534 |
|
|
535 |
User::WaitForRequest(reqStatusTerminated);
|
|
536 |
ASSERT_EQUALS(KErrNone, reqStatusTerminated.Int());
|
|
537 |
|
|
538 |
mobileCall.Close();
|
|
539 |
mobileLine.Close();
|
|
540 |
|
|
541 |
AssertMockLtsyStatusL();
|
|
542 |
config.Reset();
|
|
543 |
CleanupStack::PopAndDestroy(3, this); // mobileCall, mobileLine, this
|
|
544 |
}
|
|
545 |
|
|
546 |
/**
|
|
547 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0019
|
|
548 |
@SYMComponent telephony_ctsy
|
|
549 |
@SYMTestCaseDesc Test returned value if EMobilePhoneGetServiceProviderName is not supported by LTSY
|
|
550 |
@SYMTestPriority High
|
|
551 |
@SYMTestActions Invokes RMobilePhone::GetServiceProviderName()
|
|
552 |
@SYMTestExpectedResults Pass
|
|
553 |
@SYMTestType UT
|
|
554 |
*/
|
|
555 |
void CCTsyPhoneFUNegative::TestUnit0019L()
|
|
556 |
{
|
|
557 |
TConfig config;
|
|
558 |
config.SetSupportedValue(MLtsyDispatchPhoneGetServiceProviderName::KLtsyDispatchPhoneGetServiceProviderNameApiId, EFalse);
|
|
559 |
|
|
560 |
OpenEtelServerL(EUseExtendedError);
|
|
561 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
562 |
OpenPhoneL();
|
|
563 |
|
|
564 |
TRequestStatus requestStatus;
|
|
565 |
RMobilePhone::TMobilePhoneServiceProviderNameV2 spn;
|
|
566 |
RMobilePhone::TMobilePhoneServiceProviderNameV2Pckg spnPkg(spn);
|
|
567 |
|
|
568 |
iPhone.GetServiceProviderName(requestStatus, spnPkg);
|
|
569 |
User::WaitForRequest(requestStatus);
|
|
570 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
571 |
|
|
572 |
AssertMockLtsyStatusL();
|
|
573 |
config.Reset();
|
|
574 |
CleanupStack::PopAndDestroy(this); // this
|
|
575 |
}
|
|
576 |
|
|
577 |
/**
|
|
578 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0020
|
|
579 |
@SYMComponent telephony_ctsy
|
|
580 |
@SYMTestCaseDesc Test returned value if EMobilePhoneGetPhoneId is not supported by LTSY
|
|
581 |
@SYMTestPriority High
|
|
582 |
@SYMTestActions Invokes RMobilePhone::GetPhoneId()
|
|
583 |
@SYMTestExpectedResults Pass
|
|
584 |
@SYMTestType UT
|
|
585 |
*/
|
|
586 |
void CCTsyPhoneFUNegative::TestUnit0020L()
|
|
587 |
{
|
|
588 |
TConfig config;
|
|
589 |
config.SetSupportedValue(MLtsyDispatchPhoneGetPhoneId::KLtsyDispatchPhoneGetPhoneIdApiId, EFalse);
|
|
590 |
|
|
591 |
OpenEtelServerL(EUseExtendedError);
|
|
592 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
593 |
OpenPhoneL();
|
|
594 |
|
|
595 |
TRequestStatus requestStatus;
|
|
596 |
RMobilePhone::TMobilePhoneIdentityV1 id;
|
|
597 |
|
|
598 |
iPhone.GetPhoneId(requestStatus, id);
|
|
599 |
User::WaitForRequest(requestStatus);
|
|
600 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
601 |
|
|
602 |
AssertMockLtsyStatusL();
|
|
603 |
config.Reset();
|
|
604 |
CleanupStack::PopAndDestroy(this); // this
|
|
605 |
}
|
|
606 |
|
|
607 |
/**
|
|
608 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0021
|
|
609 |
@SYMComponent telephony_ctsy
|
|
610 |
@SYMTestCaseDesc Test returned value if EMobilePhoneGetDetectedNetworksV2Phase1 is not supported by LTSY
|
|
611 |
@SYMTestPriority High
|
|
612 |
@SYMTestActions Invokes RetrieveMobilePhoneDetectedNetworks::StartV2()
|
|
613 |
@SYMTestExpectedResults Pass
|
|
614 |
@SYMTestType UT
|
|
615 |
*/
|
|
616 |
void CCTsyPhoneFUNegative::TestUnit0021L()
|
|
617 |
{
|
|
618 |
TConfig config;
|
|
619 |
config.SetSupportedValue(MLtsyDispatchPhoneGetDetectedNetworks::KLtsyDispatchPhoneGetDetectedNetworksApiId, EFalse);
|
|
620 |
|
|
621 |
OpenEtelServerL(EUseExtendedError);
|
|
622 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
623 |
OpenPhoneL();
|
|
624 |
|
|
625 |
CGetDetectedNetworksAO* detAO = CGetDetectedNetworksAO::NewLC(iPhone,iMockLTSY);
|
|
626 |
|
|
627 |
detAO->TestRetrieveNegativeL();
|
|
628 |
ASSERT_EQUALS(KErrNotSupported, detAO->iStatus.Int());
|
|
629 |
|
|
630 |
AssertMockLtsyStatusL();
|
|
631 |
config.Reset();
|
|
632 |
CleanupStack::PopAndDestroy(2, this); // detAO, this
|
|
633 |
}
|
|
634 |
|
|
635 |
/**
|
|
636 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0022
|
|
637 |
@SYMComponent telephony_ctsy
|
|
638 |
@SYMTestCaseDesc Test returned value if EMobilePhoneGetDetectedNetworksCancel is not supported by LTSY
|
|
639 |
@SYMTestPriority High
|
|
640 |
@SYMTestActions Invokes CGetDetectedNetworksAO::Cancel()
|
|
641 |
@SYMTestExpectedResults Pass
|
|
642 |
@SYMTestType UT
|
|
643 |
*/
|
|
644 |
void CCTsyPhoneFUNegative::TestUnit0022L()
|
|
645 |
{
|
|
646 |
TConfig config;
|
|
647 |
config.SetSupportedValue(MLtsyDispatchPhoneGetDetectedNetworksCancel::KLtsyDispatchPhoneGetDetectedNetworksCancelApiId, EFalse);
|
|
648 |
|
|
649 |
OpenEtelServerL(EUseExtendedError);
|
|
650 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
651 |
OpenPhoneL();
|
|
652 |
|
|
653 |
CGetDetectedNetworksAO* detAO = CGetDetectedNetworksAO::NewLC(iPhone,iMockLTSY);
|
|
654 |
|
|
655 |
iMockLTSY.ExpectL(MLtsyDispatchPhoneGetDetectedNetworks::KLtsyDispatchPhoneGetDetectedNetworksApiId, KErrNone);
|
|
656 |
|
|
657 |
detAO->TestCancel();
|
|
658 |
ASSERT_EQUALS(KErrCancel, detAO->iStatus.Int());
|
|
659 |
|
|
660 |
AssertMockLtsyStatusL();
|
|
661 |
config.Reset();
|
|
662 |
CleanupStack::PopAndDestroy(detAO);
|
|
663 |
CleanupStack::PopAndDestroy(this); // , this
|
|
664 |
}
|
|
665 |
|
|
666 |
/**
|
|
667 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0023
|
|
668 |
@SYMComponent telephony_ctsy
|
|
669 |
@SYMTestCaseDesc Test returned value if EMobilePhoneSelectNetwork is not supported by LTSY
|
|
670 |
@SYMTestPriority High
|
|
671 |
@SYMTestActions Invokes RMobilePhone::SelectNetwork()
|
|
672 |
@SYMTestExpectedResults Pass
|
|
673 |
@SYMTestType UT
|
|
674 |
*/
|
|
675 |
void CCTsyPhoneFUNegative::TestUnit0023L()
|
|
676 |
{
|
|
677 |
TConfig config;
|
|
678 |
config.SetSupportedValue(MLtsyDispatchPhoneSelectNetwork::KLtsyDispatchPhoneSelectNetworkApiId, EFalse);
|
|
679 |
|
|
680 |
OpenEtelServerL(EUseExtendedError);
|
|
681 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
682 |
OpenPhoneL();
|
|
683 |
|
|
684 |
TRequestStatus requestStatus;
|
|
685 |
RMobilePhone::TMobilePhoneNetworkManualSelection selection;
|
|
686 |
TBool isManual = ETrue;
|
|
687 |
|
|
688 |
iPhone.SelectNetwork(requestStatus,isManual,selection);
|
|
689 |
User::WaitForRequest(requestStatus);
|
|
690 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
691 |
|
|
692 |
AssertMockLtsyStatusL();
|
|
693 |
config.Reset();
|
|
694 |
CleanupStack::PopAndDestroy(this); // this
|
|
695 |
}
|
|
696 |
|
|
697 |
/**
|
|
698 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0024
|
|
699 |
@SYMComponent telephony_ctsy
|
|
700 |
@SYMTestCaseDesc Test returned value if EMobilePhoneSelectNetworkCancel is not supported by LTSY
|
|
701 |
@SYMTestPriority High
|
|
702 |
@SYMTestActions Invokes RMobilePhone::CancelAsyncRequest()
|
|
703 |
@SYMTestExpectedResults Pass
|
|
704 |
@SYMTestType UT
|
|
705 |
*/
|
|
706 |
void CCTsyPhoneFUNegative::TestUnit0024L()
|
|
707 |
{
|
|
708 |
TConfig config;
|
|
709 |
config.SetSupportedValue(MLtsyDispatchPhoneSelectNetworkCancel::KLtsyDispatchPhoneSelectNetworkCancelApiId, EFalse);
|
|
710 |
|
|
711 |
OpenEtelServerL(EUseExtendedError);
|
|
712 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
713 |
OpenPhoneL();
|
|
714 |
|
|
715 |
RBuf8 data;
|
|
716 |
CleanupClosePushL(data);
|
|
717 |
|
|
718 |
//setup ETel required data
|
|
719 |
_LIT(KCountryCode, "1234");
|
|
720 |
_LIT(KNetworkId, "12345678");
|
|
721 |
|
|
722 |
RMobilePhone::TMobilePhoneNetworkManualSelection selection;
|
|
723 |
selection.iCountry = KCountryCode;
|
|
724 |
selection.iNetwork = KNetworkId;
|
|
725 |
|
|
726 |
TBool isManual = ETrue;
|
|
727 |
|
|
728 |
TMockLtsyData2<TBool,RMobilePhone::TMobilePhoneNetworkManualSelection> selectData(isManual,selection);
|
|
729 |
|
|
730 |
selectData.SerialiseL(data);
|
|
731 |
|
|
732 |
iMockLTSY.ExpectL(MLtsyDispatchPhoneSelectNetwork::KLtsyDispatchPhoneSelectNetworkApiId, data, KErrNone);
|
|
733 |
|
|
734 |
TRequestStatus requestStatus;
|
|
735 |
iPhone.SelectNetwork(requestStatus,isManual,selection);
|
|
736 |
|
|
737 |
iPhone.CancelAsyncRequest(EMobilePhoneSelectNetwork);
|
|
738 |
User::WaitForRequest(requestStatus);
|
|
739 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
740 |
|
|
741 |
AssertMockLtsyStatusL();
|
|
742 |
config.Reset();
|
|
743 |
CleanupStack::PopAndDestroy(2, this); // data, this
|
|
744 |
}
|
|
745 |
|
|
746 |
/**
|
|
747 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0025
|
|
748 |
@SYMComponent telephony_ctsy
|
|
749 |
@SYMTestCaseDesc Test returned value if EMobilePhoneSetNetworkSelectionSetting is not supported by LTSY
|
|
750 |
@SYMTestPriority High
|
|
751 |
@SYMTestActions Invokes RMobilePhone::SetNetworkSelectionSetting()
|
|
752 |
@SYMTestExpectedResults Pass
|
|
753 |
@SYMTestType UT
|
|
754 |
*/
|
|
755 |
void CCTsyPhoneFUNegative::TestUnit0025L()
|
|
756 |
{
|
|
757 |
TConfig config;
|
|
758 |
config.SetSupportedValue(MLtsyDispatchPhoneSetNetworkSelectionSetting::KLtsyDispatchPhoneSetNetworkSelectionSettingApiId, EFalse);
|
|
759 |
|
|
760 |
OpenEtelServerL(EUseExtendedError);
|
|
761 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
762 |
OpenPhoneL();
|
|
763 |
|
|
764 |
TRequestStatus requestStatus;
|
|
765 |
RMobilePhone::TMobilePhoneNetworkSelectionV1 phoneNetworkSelection;
|
|
766 |
phoneNetworkSelection.iMethod = RMobilePhone::ENetworkSelectionManual;
|
|
767 |
phoneNetworkSelection.iBandClass = RMobilePhone::ENetworkBandClassAOnly;
|
|
768 |
phoneNetworkSelection.iOperationMode = RMobilePhone::ENetworkOperationAnalogPreferred;
|
|
769 |
RMobilePhone::TMobilePhoneNetworkSelectionV1Pckg setPckg(phoneNetworkSelection);
|
|
770 |
|
|
771 |
iPhone.SetNetworkSelectionSetting(requestStatus,setPckg);
|
|
772 |
User::WaitForRequest(requestStatus);
|
|
773 |
ASSERT_EQUALS(requestStatus.Int(), KErrNotSupported);
|
|
774 |
|
|
775 |
AssertMockLtsyStatusL();
|
|
776 |
config.Reset();
|
|
777 |
CleanupStack::PopAndDestroy(this); // this
|
|
778 |
}
|
|
779 |
|
|
780 |
/**
|
|
781 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0026
|
|
782 |
@SYMComponent telephony_ctsy
|
|
783 |
@SYMTestCaseDesc Test returned value if ECtsyPhoneCellInfoIndReq is not supported by LTSY
|
|
784 |
@SYMTestPriority High
|
|
785 |
@SYMTestActions Invokes RMobilePhone::GetCellInfo()
|
|
786 |
@SYMTestExpectedResults Pass
|
|
787 |
@SYMTestType UT
|
|
788 |
*/
|
|
789 |
void CCTsyPhoneFUNegative::TestUnit0026L()
|
|
790 |
{
|
|
791 |
TConfig config;
|
|
792 |
config.SetSupportedValue(MLtsyDispatchPhoneRegisterCellInfoChangeNotification::KLtsyDispatchPhoneRegisterCellInfoChangeNotificationApiId, EFalse);
|
|
793 |
|
|
794 |
OpenEtelServerL(EUseExtendedError);
|
|
795 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
796 |
OpenPhoneL();
|
|
797 |
|
|
798 |
TRequestStatus requestStatus;
|
|
799 |
RMobilePhone::TMobilePhoneNetworkManualSelection selection;
|
|
800 |
|
|
801 |
RMobilePhone::TMobilePhoneCellInfoV9 cellInfo;
|
|
802 |
RMobilePhone::TMobilePhoneCellInfoV9Pckg cellInfoPckg(cellInfo);
|
|
803 |
|
|
804 |
iPhone.GetCellInfo(requestStatus,cellInfoPckg);
|
|
805 |
User::WaitForRequest(requestStatus);
|
|
806 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
807 |
|
|
808 |
AssertMockLtsyStatusL();
|
|
809 |
config.Reset();
|
|
810 |
CleanupStack::PopAndDestroy(this); // this
|
|
811 |
}
|
|
812 |
|
|
813 |
|
|
814 |
/**
|
|
815 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0027
|
|
816 |
@SYMComponent telephony_ctsy
|
|
817 |
@SYMTestCaseDesc Test returned value if ECtsyPhoneCellInfoReq is not supported by LTSY
|
|
818 |
@SYMTestPriority High
|
|
819 |
@SYMTestActions Invokes RMobilePhone::GetCellInfo()
|
|
820 |
@SYMTestExpectedResults Pass
|
|
821 |
@SYMTestType UT
|
|
822 |
*/
|
|
823 |
void CCTsyPhoneFUNegative::TestUnit0027L()
|
|
824 |
{
|
|
825 |
TConfig config;
|
|
826 |
config.SetSupportedValue(MLtsyDispatchPhoneGetPhoneCellInfo::KLtsyDispatchPhoneGetPhoneCellInfoApiId, EFalse);
|
|
827 |
|
|
828 |
OpenEtelServerL(EUseExtendedError);
|
|
829 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
830 |
OpenPhoneL();
|
|
831 |
|
|
832 |
RBuf8 data;
|
|
833 |
CleanupClosePushL(data);
|
|
834 |
|
|
835 |
iMockLTSY.ExpectL(MLtsyDispatchPhoneRegisterCellInfoChangeNotification::KLtsyDispatchPhoneRegisterCellInfoChangeNotificationApiId);
|
|
836 |
|
|
837 |
TRequestStatus getCellInfoReqStatus;
|
|
838 |
RMobilePhone::TMobilePhoneCellInfoV9 cellInfo2;
|
|
839 |
RMobilePhone::TMobilePhoneCellInfoV9Pckg cellInfoPckg2(cellInfo2);
|
|
840 |
|
|
841 |
// iLtsyDispatchPhoneGetPhoneCellInfo not NULL when disabling the IPC
|
|
842 |
iPhone.GetCellInfo(getCellInfoReqStatus,cellInfoPckg2);
|
|
843 |
|
|
844 |
User::WaitForRequest(getCellInfoReqStatus);
|
|
845 |
ASSERT_EQUALS(getCellInfoReqStatus.Int(),KErrNotSupported);
|
|
846 |
|
|
847 |
AssertMockLtsyStatusL();
|
|
848 |
config.Reset();
|
|
849 |
CleanupStack::PopAndDestroy(&data);
|
|
850 |
CleanupStack::PopAndDestroy(this); // this
|
|
851 |
}
|
|
852 |
|
|
853 |
/**
|
|
854 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0028
|
|
855 |
@SYMComponent telephony_ctsy
|
|
856 |
@SYMTestCaseDesc Test returned value if ECustomGetServiceTableSupportbyApplicationIPC is not supported by LTSY
|
|
857 |
@SYMTestPriority High
|
|
858 |
@SYMTestActions Invokes RMmCustomAPI::GetUSIMServiceSupport()
|
|
859 |
@SYMTestExpectedResults Pass
|
|
860 |
@SYMTestType UT
|
|
861 |
*/
|
|
862 |
void CCTsyPhoneFUNegative::TestUnit0028L()
|
|
863 |
{
|
|
864 |
TConfig config;
|
|
865 |
config.SetSupportedValue(MLtsyDispatchPhoneGetUsimServiceSupport::KLtsyDispatchPhoneGetUsimServiceSupportApiId, EFalse);
|
|
866 |
|
|
867 |
OpenEtelServerL(EUseExtendedError);
|
|
868 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
869 |
OpenPhoneL();
|
|
870 |
|
|
871 |
RMmCustomAPI customApi;
|
|
872 |
OpenCustomApiLC(customApi);
|
|
873 |
|
|
874 |
TRequestStatus requestStatus;
|
|
875 |
RMmCustomAPI::TAppSupport usimSupport;
|
|
876 |
|
|
877 |
customApi.GetUSIMServiceSupport(requestStatus, usimSupport);
|
|
878 |
User::WaitForRequest(requestStatus);
|
|
879 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
880 |
|
|
881 |
AssertMockLtsyStatusL();
|
|
882 |
config.Reset();
|
|
883 |
CleanupStack::PopAndDestroy(2, this); // customApi, this
|
|
884 |
}
|
|
885 |
|
|
886 |
/**
|
|
887 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0029
|
|
888 |
@SYMComponent telephony_ctsy
|
|
889 |
@SYMTestCaseDesc Test returned value if EMobilePhoneGetCurrentActiveUSimApplication is not supported by LTSY
|
|
890 |
@SYMTestPriority High
|
|
891 |
@SYMTestActions Invokes RMmCustomAPI::GetCurrentActiveUSimApplication()
|
|
892 |
@SYMTestExpectedResults Pass
|
|
893 |
@SYMTestType UT
|
|
894 |
*/
|
|
895 |
void CCTsyPhoneFUNegative::TestUnit0029L()
|
|
896 |
{
|
|
897 |
TConfig config;
|
|
898 |
config.SetSupportedValue(MLtsyDispatchPhoneGetCurrentActiveUsimApplication::KLtsyDispatchPhoneGetCurrentActiveUsimApplicationApiId, EFalse);
|
|
899 |
|
|
900 |
OpenEtelServerL(EUseExtendedError);
|
|
901 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
902 |
OpenPhoneL();
|
|
903 |
|
|
904 |
RMmCustomAPI customApi;
|
|
905 |
OpenCustomApiLC(customApi);
|
|
906 |
|
|
907 |
TRequestStatus requestStatus;
|
|
908 |
RMobilePhone::TAID aid;
|
|
909 |
|
|
910 |
iPhone.GetCurrentActiveUSimApplication(requestStatus, aid);
|
|
911 |
User::WaitForRequest(requestStatus);
|
|
912 |
ASSERT_EQUALS(requestStatus.Int(), KErrNotSupported);
|
|
913 |
|
|
914 |
AssertMockLtsyStatusL();
|
|
915 |
config.Reset();
|
|
916 |
CleanupStack::PopAndDestroy(2, this); // customApi, this
|
|
917 |
}
|
|
918 |
|
|
919 |
/**
|
|
920 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0030
|
|
921 |
@SYMComponent telephony_ctsy
|
|
922 |
@SYMTestCaseDesc Test returned value if ECustomGetBandSelectionIPC is not supported by LTSY
|
|
923 |
@SYMTestPriority High
|
|
924 |
@SYMTestActions Invokes RMmCustomAPI::GetSystemNetworkBand()
|
|
925 |
@SYMTestExpectedResults Pass
|
|
926 |
@SYMTestType UT
|
|
927 |
*/
|
|
928 |
void CCTsyPhoneFUNegative::TestUnit0030L()
|
|
929 |
{
|
|
930 |
TConfig config;
|
|
931 |
config.SetSupportedValue(MLtsyDispatchPhoneGetSystemNetworkBand::KLtsyDispatchPhoneGetSystemNetworkBandApiId, EFalse);
|
|
932 |
|
|
933 |
OpenEtelServerL(EUseExtendedError);
|
|
934 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
935 |
OpenPhoneL();
|
|
936 |
|
|
937 |
RMmCustomAPI customApi;
|
|
938 |
OpenCustomApiLC(customApi);
|
|
939 |
|
|
940 |
TRequestStatus requestStatus;
|
|
941 |
RMmCustomAPI::TBandSelection band;
|
|
942 |
RMmCustomAPI::TNetworkModeCaps mode;
|
|
943 |
|
|
944 |
customApi.GetSystemNetworkBand(requestStatus, band, mode);
|
|
945 |
User::WaitForRequest(requestStatus);
|
|
946 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
947 |
|
|
948 |
AssertMockLtsyStatusL();
|
|
949 |
config.Reset();
|
|
950 |
CleanupStack::PopAndDestroy(2, this); // customApi, this
|
|
951 |
}
|
|
952 |
|
|
953 |
/**
|
|
954 |
@SYMTestCaseID BA-CTSYD-DIS-PHONE-NEGATIVE-UN0031
|
|
955 |
@SYMComponent telephony_ctsy
|
|
956 |
@SYMTestCaseDesc Test returned value if ECustomSetBandSelectionIPC is not supported by LTSY
|
|
957 |
@SYMTestPriority High
|
|
958 |
@SYMTestActions Invokes RMmCustomAPI::SetSystemNetworkBand()
|
|
959 |
@SYMTestExpectedResults Pass
|
|
960 |
@SYMTestType UT
|
|
961 |
*/
|
|
962 |
void CCTsyPhoneFUNegative::TestUnit0031L()
|
|
963 |
{
|
|
964 |
TConfig config;
|
|
965 |
config.SetSupportedValue(MLtsyDispatchPhoneSetSystemNetworkBand::KLtsyDispatchPhoneSetSystemNetworkBandApiId, EFalse);
|
|
966 |
|
|
967 |
OpenEtelServerL(EUseExtendedError);
|
|
968 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
969 |
OpenPhoneL();
|
|
970 |
|
|
971 |
|
|
972 |
RMmCustomAPI customApi;
|
|
973 |
OpenCustomApiLC(customApi);
|
|
974 |
|
|
975 |
TRequestStatus requestStatus;
|
|
976 |
RMmCustomAPI::TBandSelection band=RMmCustomAPI::ENetworkBandAny;
|
|
977 |
RMmCustomAPI::TNetworkModeCaps mode=RMmCustomAPI::KCapsNetworkModeUmts;
|
|
978 |
|
|
979 |
customApi.SetSystemNetworkBand(requestStatus, band, mode);
|
|
980 |
User::WaitForRequest(requestStatus);
|
|
981 |
ASSERT_EQUALS(requestStatus.Int(), KErrNotSupported);
|
|
982 |
|
|
983 |
AssertMockLtsyStatusL();
|
|
984 |
config.Reset();
|
|
985 |
CleanupStack::PopAndDestroy(2, this); // customApi, this
|
|
986 |
}
|