|
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 |
// ctsyphonebookonfunegative.cpp
|
|
|
15 |
//
|
|
|
16 |
|
|
|
17 |
#include "cctsyphonebookonfunegative.h"
|
|
|
18 |
|
|
|
19 |
#include <etelmm.h>
|
|
|
20 |
#include <mmlist.h>
|
|
|
21 |
#include <mmretrieve.h>
|
|
|
22 |
#include "config.h"
|
|
|
23 |
#include <ctsy/ltsy/mltsydispatchphonebookoninterface.h>
|
|
|
24 |
#include <test/tmockltsydata.h>
|
|
|
25 |
#include "cctsyphonebookonfu.h"
|
|
|
26 |
#include "listretrieverao.h"
|
|
|
27 |
|
|
|
28 |
/* static */
|
|
|
29 |
CTestSuite* CCTsyPhonebookOnFUNegative::CreateSuiteL(const TDesC& aName)
|
|
|
30 |
{
|
|
|
31 |
SUB_SUITE;
|
|
|
32 |
|
|
|
33 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhonebookOnFUNegative, TestGetInfoIpcL);
|
|
|
34 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhonebookOnFUNegative, TestWriteIpcL);
|
|
|
35 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhonebookOnFUNegative, TestReadIpcL);
|
|
|
36 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhonebookOnFUNegative, TestDeleteEntryIpcL);
|
|
|
37 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhonebookOnFUNegative, TestWriteEntryIpcL);
|
|
|
38 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhonebookOnFUNegative, TestDeleteAllIpcL);
|
|
|
39 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhonebookOnFUNegative, TestReadEntryIpcL);
|
|
|
40 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhonebookOnFUNegative, TestReadSizeIpcL);
|
|
|
41 |
ADD_TEST_STEP_ISO_CPP(CCTsyPhonebookOnFUNegative, TestWriteSizeIpcL);
|
|
|
42 |
|
|
|
43 |
END_SUITE;
|
|
|
44 |
}
|
|
|
45 |
|
|
|
46 |
/**
|
|
|
47 |
* Cleanup
|
|
|
48 |
*/
|
|
|
49 |
void CCTsyPhonebookOnFUNegative::DoCleanup()
|
|
|
50 |
{
|
|
|
51 |
iAdnPhoneBookStore.Close();
|
|
|
52 |
CCTsyPhonebookFU::DoCleanup();
|
|
|
53 |
}
|
|
|
54 |
|
|
|
55 |
/**
|
|
|
56 |
* Wraps up boilerplate code for starting tests with a clean RPhone session and RMobileONStore
|
|
|
57 |
* initialised. On return this and aONStore have been pushed to the CleanupStack
|
|
|
58 |
*/
|
|
|
59 |
void CCTsyPhonebookOnFUNegative::OpenAndPushEtelAndPhoneONStoreL(RMobileONStore& aONStore)
|
|
|
60 |
{
|
|
|
61 |
OpenEtelServerL(EUseExtendedError);
|
|
|
62 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
|
63 |
OpenPhoneL();
|
|
|
64 |
|
|
|
65 |
OpenCachingPhoneBookL(DispatcherPhonebook::EIccAdn,iAdnPhoneBookStore,KErrNone);
|
|
|
66 |
|
|
|
67 |
TInt ret = aONStore.Open(iPhone);
|
|
|
68 |
ASSERT_EQUALS(ret, KErrNone);
|
|
|
69 |
CleanupClosePushL(aONStore);
|
|
|
70 |
}
|
|
|
71 |
|
|
|
72 |
|
|
|
73 |
/**
|
|
|
74 |
* @SYMTestCaseID BA-CTSYD-DIS-PHONEBOOKON-NEGATIVE-UN0001
|
|
|
75 |
* @SYMComponent telephony_ctsy
|
|
|
76 |
* @SYMTestCaseDesc Test support in CTSY for RMobileONStore::GetInfo() when associated PhonebookOn FU isn't supported
|
|
|
77 |
* @SYMTestPriority High
|
|
|
78 |
* @SYMTestActions Disables associated PhonebookOn Api, invokes RMobileONStore::GetInfo()
|
|
|
79 |
* @SYMTestExpectedResults Pass
|
|
|
80 |
* @SYMTestType UT
|
|
|
81 |
*/
|
|
|
82 |
void CCTsyPhonebookOnFUNegative::TestGetInfoIpcL()
|
|
|
83 |
{
|
|
|
84 |
TConfig config;
|
|
|
85 |
config.SetSupportedValue(MLtsyDispatchPhonebookOnStoreGetInfo::KLtsyDispatchPhonebookOnStoreGetInfoApiId, EFalse);
|
|
|
86 |
|
|
|
87 |
RMobileONStore onStore;
|
|
|
88 |
OpenAndPushEtelAndPhoneONStoreL(onStore);
|
|
|
89 |
|
|
|
90 |
TRequestStatus status;
|
|
|
91 |
|
|
|
92 |
RMobileONStore::TMobileONStoreInfoV1 onStoreInfoV1;
|
|
|
93 |
TPckg<RMobileONStore::TMobileONStoreInfoV1> pckgInfoV1(onStoreInfoV1);
|
|
|
94 |
|
|
|
95 |
onStore.GetInfo(status, pckgInfoV1);
|
|
|
96 |
User::WaitForRequest(status);
|
|
|
97 |
|
|
|
98 |
ASSERT_EQUALS(KErrNotSupported, status.Int());
|
|
|
99 |
|
|
|
100 |
AssertMockLtsyStatusL();
|
|
|
101 |
config.Reset();
|
|
|
102 |
|
|
|
103 |
CleanupStack::PopAndDestroy(2, this); // onStore, this
|
|
|
104 |
}
|
|
|
105 |
|
|
|
106 |
/**
|
|
|
107 |
* @SYMTestCaseID BA-CTSYD-DIS-PHONEBOOKON-NEGATIVE-UN0002
|
|
|
108 |
* @SYMComponent telephony_ctsy
|
|
|
109 |
* @SYMTestCaseDesc Test support in CTSY for RMobileONStore::Read() when associated PhonebookOn FU isn't supported
|
|
|
110 |
* @SYMTestPriority High
|
|
|
111 |
* @SYMTestActions Disables associated PhonebookOn Api, invokes RMobileONStore::Write()
|
|
|
112 |
* @SYMTestExpectedResults Pass
|
|
|
113 |
* @SYMTestType UT
|
|
|
114 |
*/
|
|
|
115 |
void CCTsyPhonebookOnFUNegative::TestWriteIpcL()
|
|
|
116 |
{
|
|
|
117 |
TConfig config;
|
|
|
118 |
config.SetSupportedValue(MLtsyDispatchPhonebookOnStoreWrite::KLtsyDispatchPhonebookOnStoreWriteApiId, EFalse);
|
|
|
119 |
|
|
|
120 |
RMobileONStore onStore;
|
|
|
121 |
OpenAndPushEtelAndPhoneONStoreL(onStore);
|
|
|
122 |
|
|
|
123 |
_LIT(KText1, "Number1");
|
|
|
124 |
_LIT(KNumber1, "11111111");
|
|
|
125 |
RMobileONStore::TMobileONEntryV1 writeEntry1;
|
|
|
126 |
writeEntry1.iMode = RMobilePhone::ENetworkModeGsm;
|
|
|
127 |
writeEntry1.iService = RMobilePhone::ETelephony;
|
|
|
128 |
writeEntry1.iNumber.iTypeOfNumber = RMobilePhone::EAlphanumericNumber;
|
|
|
129 |
writeEntry1.iNumber.iNumberPlan = RMobilePhone::EDataNumberPlan;
|
|
|
130 |
writeEntry1.iNumber.iTelNumber.Copy(KNumber1);
|
|
|
131 |
writeEntry1.iText.Copy(KText1);
|
|
|
132 |
writeEntry1.iIndex = 1;
|
|
|
133 |
|
|
|
134 |
TPckg<RMobileONStore::TMobileONEntryV1> pckgWriteEntry1(writeEntry1);
|
|
|
135 |
|
|
|
136 |
TRequestStatus status;
|
|
|
137 |
onStore.Write(status, pckgWriteEntry1);
|
|
|
138 |
User::WaitForRequest(status);
|
|
|
139 |
|
|
|
140 |
ASSERT_EQUALS(KErrNotSupported, status.Int());
|
|
|
141 |
|
|
|
142 |
AssertMockLtsyStatusL();
|
|
|
143 |
config.Reset();
|
|
|
144 |
|
|
|
145 |
CleanupStack::PopAndDestroy(2, this); // onStore, this
|
|
|
146 |
}
|
|
|
147 |
|
|
|
148 |
|
|
|
149 |
/**
|
|
|
150 |
* @SYMTestCaseID BA-CTSYD-DIS-PHONEBOOKON-NEGATIVE-UN0003
|
|
|
151 |
* @SYMComponent telephony_ctsy
|
|
|
152 |
* @SYMTestCaseDesc Test support in CTSY for RMobileONStore::Read() when associated PhonebookOn FU isn't supported
|
|
|
153 |
* @SYMTestPriority High
|
|
|
154 |
* @SYMTestActions Disables associated PhonebookOn Api, invokes RMobileONStore::Read()
|
|
|
155 |
* @SYMTestExpectedResults Pass
|
|
|
156 |
* @SYMTestType UT
|
|
|
157 |
*/
|
|
|
158 |
void CCTsyPhonebookOnFUNegative::TestReadIpcL()
|
|
|
159 |
{
|
|
|
160 |
TConfig config;
|
|
|
161 |
config.SetSupportedValue(MLtsyDispatchPhonebookOnStoreRead::KLtsyDispatchPhonebookOnStoreReadApiId, EFalse);
|
|
|
162 |
|
|
|
163 |
RMobileONStore onStore;
|
|
|
164 |
OpenAndPushEtelAndPhoneONStoreL(onStore);
|
|
|
165 |
|
|
|
166 |
TInt location = 1;
|
|
|
167 |
RMobileONStore::TMobileONEntryV1 readEntry;
|
|
|
168 |
readEntry.iIndex = location;
|
|
|
169 |
TPckg<RMobileONStore::TMobileONEntryV1> pckgReadEntry(readEntry);
|
|
|
170 |
|
|
|
171 |
TRequestStatus status;
|
|
|
172 |
onStore.Read(status, pckgReadEntry);
|
|
|
173 |
User::WaitForRequest(status);
|
|
|
174 |
|
|
|
175 |
ASSERT_EQUALS(KErrNotSupported, status.Int());
|
|
|
176 |
|
|
|
177 |
AssertMockLtsyStatusL();
|
|
|
178 |
config.Reset();
|
|
|
179 |
|
|
|
180 |
CleanupStack::PopAndDestroy(2, this); // onStore, this
|
|
|
181 |
}
|
|
|
182 |
|
|
|
183 |
|
|
|
184 |
/**
|
|
|
185 |
* @SYMTestCaseID BA-CTSYD-DIS-PHONEBOOKON-NEGATIVE-UN0004
|
|
|
186 |
* @SYMComponent telephony_ctsy
|
|
|
187 |
* @SYMTestCaseDesc Test support in CTSY for RMobileONStore::Read() when associated PhonebookOn FU isn't supported
|
|
|
188 |
* @SYMTestPriority High
|
|
|
189 |
* @SYMTestActions Disables associated PhonebookOn Api, invokes RMobileONStore::Read()
|
|
|
190 |
* @SYMTestExpectedResults Pass
|
|
|
191 |
* @SYMTestType UT
|
|
|
192 |
*/
|
|
|
193 |
void CCTsyPhonebookOnFUNegative::TestDeleteEntryIpcL()
|
|
|
194 |
{
|
|
|
195 |
TConfig config;
|
|
|
196 |
config.SetSupportedValue(MLtsyDispatchPhonebookOnStoreDeleteEntry::KLtsyDispatchPhonebookOnStoreDeleteEntryApiId, EFalse);
|
|
|
197 |
|
|
|
198 |
RMobileONStore onStore;
|
|
|
199 |
OpenAndPushEtelAndPhoneONStoreL(onStore);
|
|
|
200 |
|
|
|
201 |
TRequestStatus status;
|
|
|
202 |
onStore.Delete(status, 1);
|
|
|
203 |
User::WaitForRequest(status);
|
|
|
204 |
|
|
|
205 |
ASSERT_EQUALS(KErrNotSupported, status.Int());
|
|
|
206 |
|
|
|
207 |
AssertMockLtsyStatusL();
|
|
|
208 |
config.Reset();
|
|
|
209 |
|
|
|
210 |
CleanupStack::PopAndDestroy(2, this); // onStore, this
|
|
|
211 |
}
|
|
|
212 |
|
|
|
213 |
|
|
|
214 |
/**
|
|
|
215 |
* @SYMTestCaseID BA-CTSYD-DIS-PHONEBOOKON-NEGATIVE-UN0005
|
|
|
216 |
* @SYMComponent telephony_ctsy
|
|
|
217 |
* @SYMTestCaseDesc Test support in CTSY for RMobileONStore::StoreAll() when associated PhonebookOn FU isn't supported
|
|
|
218 |
* @SYMTestPriority High
|
|
|
219 |
* @SYMTestActions Disables associated PhonebookOn Api, invokes RMobileONStore::StoreAllL()
|
|
|
220 |
* @SYMTestExpectedResults Pass
|
|
|
221 |
* @SYMTestType UT
|
|
|
222 |
*/
|
|
|
223 |
void CCTsyPhonebookOnFUNegative::TestWriteEntryIpcL()
|
|
|
224 |
{
|
|
|
225 |
TConfig config;
|
|
|
226 |
config.SetSupportedValue(MLtsyDispatchPhonebookOnStoreWriteEntry::KLtsyDispatchPhonebookOnStoreWriteEntryApiId, EFalse);
|
|
|
227 |
|
|
|
228 |
RMobileONStore onStore;
|
|
|
229 |
OpenAndPushEtelAndPhoneONStoreL(onStore);
|
|
|
230 |
|
|
|
231 |
CMobilePhoneONList* onList = CMobilePhoneONList::NewL();
|
|
|
232 |
CleanupStack::PushL(onList);
|
|
|
233 |
|
|
|
234 |
RMobileONStore::TMobileONEntryV1 writeEntry;
|
|
|
235 |
onList->AddEntryL(writeEntry); // writeEntry not initialised, not checked
|
|
|
236 |
|
|
|
237 |
TInt size = onList->Enumerate();
|
|
|
238 |
|
|
|
239 |
RBuf8 completeData;
|
|
|
240 |
CleanupClosePushL(completeData);
|
|
|
241 |
TMockLtsyData1<TInt> sizeLTsyData(size);
|
|
|
242 |
completeData.Close();
|
|
|
243 |
sizeLTsyData.SerialiseL(completeData);
|
|
|
244 |
|
|
|
245 |
iMockLTSY.ExpectL(MLtsyDispatchPhonebookOnStoreDeleteAll::KLtsyDispatchPhonebookOnStoreDeleteAllApiId);
|
|
|
246 |
iMockLTSY.CompleteL(MLtsyDispatchPhonebookOnStoreDeleteAll::KLtsyDispatchPhonebookOnStoreDeleteAllApiId, KErrNone);
|
|
|
247 |
|
|
|
248 |
iMockLTSY.ExpectL(MLtsyDispatchPhonebookOnStoreGetStoreSize::KLtsyDispatchPhonebookOnStoreGetStoreSizeApiId);
|
|
|
249 |
iMockLTSY.CompleteL(MLtsyDispatchPhonebookOnStoreGetStoreSize::KLtsyDispatchPhonebookOnStoreGetStoreSizeApiId, KErrNone, completeData);
|
|
|
250 |
|
|
|
251 |
TRequestStatus status;
|
|
|
252 |
onStore.StoreAllL(status, onList);
|
|
|
253 |
User::WaitForRequest(status);
|
|
|
254 |
|
|
|
255 |
ASSERT_EQUALS(KErrNotSupported, status.Int());
|
|
|
256 |
|
|
|
257 |
AssertMockLtsyStatusL();
|
|
|
258 |
config.Reset();
|
|
|
259 |
|
|
|
260 |
CleanupStack::PopAndDestroy(4, this); // completeData, onList, onStore, this
|
|
|
261 |
}
|
|
|
262 |
|
|
|
263 |
|
|
|
264 |
/**
|
|
|
265 |
* @SYMTestCaseID BA-CTSYD-DIS-PHONEBOOKON-NEGATIVE-UN0006
|
|
|
266 |
* @SYMComponent telephony_ctsy
|
|
|
267 |
* @SYMTestCaseDesc Test support in CTSY for RMobileONStore::DeleteAll() when associated PhonebookOn FU isn't supported
|
|
|
268 |
* @SYMTestPriority High
|
|
|
269 |
* @SYMTestActions Disables associated PhonebookOn Api, invokes RMobileONStore::DeleteAllL()
|
|
|
270 |
* @SYMTestExpectedResults Pass
|
|
|
271 |
* @SYMTestType UT
|
|
|
272 |
*/
|
|
|
273 |
void CCTsyPhonebookOnFUNegative::TestDeleteAllIpcL()
|
|
|
274 |
{
|
|
|
275 |
TConfig config;
|
|
|
276 |
config.SetSupportedValue(MLtsyDispatchPhonebookOnStoreDeleteAll::KLtsyDispatchPhonebookOnStoreDeleteAllApiId, EFalse);
|
|
|
277 |
|
|
|
278 |
RMobileONStore onStore;
|
|
|
279 |
OpenAndPushEtelAndPhoneONStoreL(onStore);
|
|
|
280 |
|
|
|
281 |
TRequestStatus status;
|
|
|
282 |
onStore.DeleteAll(status);
|
|
|
283 |
User::WaitForRequest(status);
|
|
|
284 |
|
|
|
285 |
ASSERT_EQUALS(KErrNotSupported, status.Int());
|
|
|
286 |
|
|
|
287 |
AssertMockLtsyStatusL();
|
|
|
288 |
config.Reset();
|
|
|
289 |
|
|
|
290 |
CleanupStack::PopAndDestroy(2, this); // onStore, this
|
|
|
291 |
}
|
|
|
292 |
|
|
|
293 |
|
|
|
294 |
/**
|
|
|
295 |
* @SYMTestCaseID BA-CTSYD-DIS-PHONEBOOKON-NEGATIVE-UN0007
|
|
|
296 |
* @SYMComponent telephony_ctsy
|
|
|
297 |
* @SYMTestCaseDesc Test support in CTSY for RMobileONStore::ReadAll() when associated PhonebookOn FU isn't supported
|
|
|
298 |
* @SYMTestPriority High
|
|
|
299 |
* @SYMTestActions Disables associated PhonebookOn Api, invokes CRetrieveMobilePhoneONList
|
|
|
300 |
* @SYMTestExpectedResults Pass
|
|
|
301 |
* @SYMTestType UT
|
|
|
302 |
*/
|
|
|
303 |
void CCTsyPhonebookOnFUNegative::TestReadEntryIpcL()
|
|
|
304 |
{
|
|
|
305 |
TConfig config;
|
|
|
306 |
config.SetSupportedValue(MLtsyDispatchPhonebookOnStoreReadEntry::KLtsyDispatchPhonebookOnStoreReadEntryApiId, EFalse);
|
|
|
307 |
|
|
|
308 |
RMobileONStore onStore;
|
|
|
309 |
OpenAndPushEtelAndPhoneONStoreL(onStore);
|
|
|
310 |
|
|
|
311 |
//CActiveScheduler* activeScheduler = new (ELeave) CActiveScheduler();
|
|
|
312 |
//CleanupStack::PushL(activeScheduler);
|
|
|
313 |
//CActiveScheduler::Install(activeScheduler);
|
|
|
314 |
|
|
|
315 |
RBuf8 completeData;
|
|
|
316 |
CleanupClosePushL(completeData);
|
|
|
317 |
TInt size = 1;
|
|
|
318 |
TMockLtsyData1<TInt> sizeLTsyData(size);
|
|
|
319 |
completeData.Close();
|
|
|
320 |
sizeLTsyData.SerialiseL(completeData);
|
|
|
321 |
|
|
|
322 |
iMockLTSY.ExpectL(MLtsyDispatchPhonebookOnStoreGetReadStoreSize::KLtsyDispatchPhonebookOnStoreGetReadStoreSizeApiId);
|
|
|
323 |
iMockLTSY.CompleteL(MLtsyDispatchPhonebookOnStoreGetReadStoreSize::KLtsyDispatchPhonebookOnStoreGetReadStoreSizeApiId, KErrNone, completeData);
|
|
|
324 |
//
|
|
|
325 |
// _LIT(KText, "Number%d");
|
|
|
326 |
// _LIT(KNumber, "0000000%d");
|
|
|
327 |
// TInt location[1];
|
|
|
328 |
// TBuf<RMobileONStore::KOwnNumberTextSize> name[1];
|
|
|
329 |
// TBuf<KPBStoreNumSize> telNumber[1];
|
|
|
330 |
// TInt index = 1;
|
|
|
331 |
// location[0] = index;
|
|
|
332 |
// name[0].Format(KText,index);
|
|
|
333 |
// telNumber[0].Format(KNumber,index);
|
|
|
334 |
//
|
|
|
335 |
// RBuf8 expectReadData;
|
|
|
336 |
// CleanupClosePushL(expectReadData);
|
|
|
337 |
// TMockLtsyData1<TInt> locationLTsyData(location[0]);
|
|
|
338 |
// expectReadData.Close();
|
|
|
339 |
// locationLTsyData.SerialiseL(expectReadData);
|
|
|
340 |
//
|
|
|
341 |
// TMockLtsyData3< TInt, TBuf<RMobileONStore::KOwnNumberTextSize>, TBuf<KPBStoreNumSize> > readLTsyDataComplete(location[0], name[0], telNumber[0]);
|
|
|
342 |
// completeData.Close();
|
|
|
343 |
// readLTsyDataComplete.SerialiseL(completeData);
|
|
|
344 |
// iMockLTSY.ExpectL(MLtsyDispatchPhonebookOnStoreReadEntry::KLtsyDispatchPhonebookOnStoreReadEntryApiId, expectReadData);
|
|
|
345 |
// iMockLTSY.CompleteL(MLtsyDispatchPhonebookOnStoreReadEntry::KLtsyDispatchPhonebookOnStoreReadEntryApiId, KErrNone, completeData);
|
|
|
346 |
|
|
|
347 |
// CRetrieveMobilePhoneONList* onListRetriever = CRetrieveMobilePhoneONList::NewL(onStore);
|
|
|
348 |
// CleanupStack::PushL(onListRetriever);
|
|
|
349 |
TRequestStatus status;
|
|
|
350 |
//onListRetriever->Start(status);
|
|
|
351 |
//TBool test = onListRetriever->IsActive();
|
|
|
352 |
//onListRetriever->RetrieveListL();
|
|
|
353 |
//CActiveScheduler::Start();
|
|
|
354 |
|
|
|
355 |
CGetONListAO* getOnListAO = CGetONListAO::NewLC(onStore);
|
|
|
356 |
getOnListAO->TestRetrieveL();
|
|
|
357 |
ASSERT_EQUALS(KErrNotSupported, getOnListAO->RetrieveLastError());
|
|
|
358 |
|
|
|
359 |
//User::WaitForRequest(status);
|
|
|
360 |
|
|
|
361 |
//ASSERT_EQUALS(KErrNotSupported, status.Int());
|
|
|
362 |
|
|
|
363 |
AssertMockLtsyStatusL();
|
|
|
364 |
|
|
|
365 |
config.Reset();
|
|
|
366 |
|
|
|
367 |
//CActiveScheduler::Stop();
|
|
|
368 |
CleanupStack::PopAndDestroy(4, this); // getOnListAO, completeData, onStore, this
|
|
|
369 |
}
|
|
|
370 |
|
|
|
371 |
|
|
|
372 |
/**
|
|
|
373 |
* @SYMTestCaseID BA-CTSYD-DIS-PHONEBOOKON-NEGATIVE-UN0008
|
|
|
374 |
* @SYMComponent telephony_ctsy
|
|
|
375 |
* @SYMTestCaseDesc Test support in CTSY for RMobileONStore::ReadAll() when associated PhonebookOn FU isn't supported
|
|
|
376 |
* @SYMTestPriority High
|
|
|
377 |
* @SYMTestActions Disables associated PhonebookOn Api, invokes CRetrieveMobilePhoneONList
|
|
|
378 |
* @SYMTestExpectedResults Pass
|
|
|
379 |
* @SYMTestType UT
|
|
|
380 |
*/
|
|
|
381 |
void CCTsyPhonebookOnFUNegative::TestReadSizeIpcL()
|
|
|
382 |
{
|
|
|
383 |
TConfig config;
|
|
|
384 |
config.SetSupportedValue(MLtsyDispatchPhonebookOnStoreGetReadStoreSize::KLtsyDispatchPhonebookOnStoreGetReadStoreSizeApiId, EFalse);
|
|
|
385 |
|
|
|
386 |
RMobileONStore onStore;
|
|
|
387 |
OpenAndPushEtelAndPhoneONStoreL(onStore);
|
|
|
388 |
|
|
|
389 |
TRequestStatus status;
|
|
|
390 |
CGetONListAO* getOnListAO = CGetONListAO::NewLC(onStore);
|
|
|
391 |
getOnListAO->TestRetrieveL();
|
|
|
392 |
ASSERT_EQUALS(KErrNotSupported, getOnListAO->RetrieveLastError());
|
|
|
393 |
|
|
|
394 |
AssertMockLtsyStatusL();
|
|
|
395 |
|
|
|
396 |
config.Reset();
|
|
|
397 |
|
|
|
398 |
CleanupStack::PopAndDestroy(3, this); // getOnListAO, onStore, this
|
|
|
399 |
}
|
|
|
400 |
|
|
|
401 |
|
|
|
402 |
/**
|
|
|
403 |
* @SYMTestCaseID BA-CTSYD-DIS-PHONEBOOKON-NEGATIVE-UN0009
|
|
|
404 |
* @SYMComponent telephony_ctsy
|
|
|
405 |
* @SYMTestCaseDesc Test support in CTSY for RMobileONStore::StoreAll() when associated PhonebookOn FU isn't supported
|
|
|
406 |
* @SYMTestPriority High
|
|
|
407 |
* @SYMTestActions Disables associated PhonebookOn Api, invokes RMobileONStore::StoreAllL()
|
|
|
408 |
* @SYMTestExpectedResults Pass
|
|
|
409 |
* @SYMTestType UT
|
|
|
410 |
*/
|
|
|
411 |
void CCTsyPhonebookOnFUNegative::TestWriteSizeIpcL()
|
|
|
412 |
{
|
|
|
413 |
TConfig config;
|
|
|
414 |
config.SetSupportedValue(MLtsyDispatchPhonebookOnStoreGetStoreSize::KLtsyDispatchPhonebookOnStoreGetStoreSizeApiId, EFalse);
|
|
|
415 |
|
|
|
416 |
RMobileONStore onStore;
|
|
|
417 |
OpenAndPushEtelAndPhoneONStoreL(onStore);
|
|
|
418 |
|
|
|
419 |
CMobilePhoneONList* onList = CMobilePhoneONList::NewL();
|
|
|
420 |
CleanupStack::PushL(onList);
|
|
|
421 |
|
|
|
422 |
iMockLTSY.ExpectL(MLtsyDispatchPhonebookOnStoreDeleteAll::KLtsyDispatchPhonebookOnStoreDeleteAllApiId);
|
|
|
423 |
iMockLTSY.CompleteL(MLtsyDispatchPhonebookOnStoreDeleteAll::KLtsyDispatchPhonebookOnStoreDeleteAllApiId, KErrNone);
|
|
|
424 |
|
|
|
425 |
TRequestStatus status;
|
|
|
426 |
onStore.StoreAllL(status, onList);
|
|
|
427 |
User::WaitForRequest(status);
|
|
|
428 |
|
|
|
429 |
ASSERT_EQUALS(KErrNotSupported, status.Int());
|
|
|
430 |
|
|
|
431 |
AssertMockLtsyStatusL();
|
|
|
432 |
config.Reset();
|
|
|
433 |
|
|
|
434 |
CleanupStack::PopAndDestroy(3, this); // onList, onStore, this
|
|
|
435 |
}
|