|
1 // Copyright (c) 2001-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 // This contains CommDb Unit Test Cases 033.XX |
|
15 // |
|
16 // |
|
17 |
|
18 // EPOC includes |
|
19 #include <e32base.h> |
|
20 #include <commdb.h> |
|
21 #include <d32comm.h> |
|
22 |
|
23 // Test system includes |
|
24 #include <networking/log.h> |
|
25 #include <networking/teststep.h> |
|
26 #include "Teststepcommdb.h" |
|
27 #include "TestSuiteCommdb.h" |
|
28 #include "Step_033_xx.h" |
|
29 |
|
30 |
|
31 CCommDbTest033_01::CCommDbTest033_01() |
|
32 { |
|
33 // store the name of this test case |
|
34 iTestStepName = _L("step_033_01"); |
|
35 } |
|
36 |
|
37 CCommDbTest033_01::~CCommDbTest033_01() |
|
38 {} |
|
39 |
|
40 TVerdict CCommDbTest033_01::doTestStepL( void ) |
|
41 { |
|
42 if(executeStepL()!=KErrNone) |
|
43 return EFail; |
|
44 return EPass; //If we've got this far we've passed |
|
45 } |
|
46 |
|
47 TVerdict CCommDbTest033_01::doTestStepPreambleL() |
|
48 { |
|
49 iTheDb=CCommsDatabase::NewL(); |
|
50 |
|
51 iPrefView = iTheDb->OpenConnectionPrefTableLC(); |
|
52 CleanupStack::Pop(); |
|
53 |
|
54 return EPass; |
|
55 } |
|
56 |
|
57 TInt CCommDbTest033_01::executeStepL() |
|
58 { |
|
59 CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref1; |
|
60 pref1.iRanking = 1; |
|
61 pref1.iDirection = ECommDbConnectionDirectionOutgoing; |
|
62 pref1.iDialogPref = ECommDbDialogPrefPrompt; |
|
63 pref1.iBearer.iBearerSet = KCommDbBearerCSD; |
|
64 pref1.iBearer.iIapId = 1; |
|
65 |
|
66 iPrefView->InsertConnectionPreferenceL(pref1, EFalse); |
|
67 |
|
68 CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref2; |
|
69 pref2.iRanking = 2; |
|
70 pref2.iDirection = ECommDbConnectionDirectionOutgoing; |
|
71 pref2.iDialogPref = ECommDbDialogPrefPrompt; |
|
72 pref2.iBearer.iBearerSet = KCommDbBearerCSD; |
|
73 pref2.iBearer.iIapId = 2; |
|
74 |
|
75 iPrefView->InsertConnectionPreferenceL(pref2, EFalse); |
|
76 |
|
77 iPrefView->SwapConnectionPreferencesL(ECommDbConnectionDirectionOutgoing, 1, 2); |
|
78 |
|
79 User::LeaveIfError(iPrefView->GotoFirstRecord()); |
|
80 |
|
81 CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref retrievedPref; |
|
82 iPrefView->ReadConnectionPreferenceL(retrievedPref); |
|
83 |
|
84 TBool rank1Found=EFalse; |
|
85 if(retrievedPref.iRanking==1) //should be pref2 with new ranking |
|
86 { |
|
87 rank1Found=ETrue; |
|
88 if(pref2.iBearer.iIapId!=retrievedPref.iBearer.iIapId) |
|
89 return KErrGeneral; //something has gone wrong with the swap |
|
90 } |
|
91 else if(retrievedPref.iRanking==2) //should be pref1 with new ranking |
|
92 { |
|
93 if(pref1.iBearer.iIapId!=retrievedPref.iBearer.iIapId) |
|
94 return KErrGeneral; //something has gone wrong with the swap |
|
95 } |
|
96 else |
|
97 return KErrGeneral; //We've got a rank other that 1&2 which is wrong. |
|
98 |
|
99 User::LeaveIfError(iPrefView->GotoNextRecord()); |
|
100 iPrefView->ReadConnectionPreferenceL(retrievedPref); |
|
101 |
|
102 if(retrievedPref.iRanking==1) |
|
103 { |
|
104 if(rank1Found) |
|
105 return KErrGeneral; //we've found 2 rank 1 records which is wrong. |
|
106 if(pref2.iBearer.iIapId!=retrievedPref.iBearer.iIapId) |
|
107 return KErrGeneral; //something has gone wrong with the swap |
|
108 } |
|
109 else if (retrievedPref.iRanking==2) |
|
110 { |
|
111 if(!rank1Found) |
|
112 return KErrGeneral; //we've found 2 rank 2 records which is wrong. |
|
113 if(pref1.iBearer.iIapId!=retrievedPref.iBearer.iIapId) |
|
114 return KErrGeneral; //something has gone wrong with the swap |
|
115 } |
|
116 else |
|
117 return KErrGeneral; |
|
118 |
|
119 return KErrNone; |
|
120 } |
|
121 |
|
122 TVerdict CCommDbTest033_01::doTestStepPostambleL() |
|
123 { |
|
124 //Get rid of our view |
|
125 if(iPrefView) |
|
126 { |
|
127 delete iPrefView; |
|
128 } |
|
129 iPrefView=0; |
|
130 |
|
131 //Create a new view that should have the record that was added in executeStepL and |
|
132 // may have been left in by a leave condition |
|
133 iPrefView = iTheDb->OpenConnectionPrefTableLC(); |
|
134 CleanupStack::Pop(); |
|
135 |
|
136 if(iPrefView->GotoFirstRecord() == KErrNone) |
|
137 { |
|
138 iPrefView->DeleteConnectionPreferenceL(); |
|
139 } |
|
140 if(iPrefView->GotoFirstRecord() == KErrNone) |
|
141 { |
|
142 iPrefView->DeleteConnectionPreferenceL(); |
|
143 } |
|
144 |
|
145 // Cleanup after test run |
|
146 CTestStepCommDb::doTestStepPostambleL(); |
|
147 return EPass; |
|
148 } |
|
149 |
|
150 // |
|
151 |
|
152 CCommDbTest033_02::CCommDbTest033_02() |
|
153 { |
|
154 // store the name of this test case |
|
155 iTestStepName = _L("step_033_02"); |
|
156 } |
|
157 |
|
158 CCommDbTest033_02::~CCommDbTest033_02() |
|
159 {} |
|
160 |
|
161 TVerdict CCommDbTest033_02::doTestStepL( void ) |
|
162 { |
|
163 if(executeStepL()!=KErrNone) |
|
164 return EFail; |
|
165 return EPass; //If we've got this far we've passed |
|
166 } |
|
167 |
|
168 TVerdict CCommDbTest033_02::doTestStepPreambleL() |
|
169 { |
|
170 iTheDb=CCommsDatabase::NewL(); |
|
171 |
|
172 iPrefView = iTheDb->OpenConnectionPrefTableLC(); |
|
173 CleanupStack::Pop(); |
|
174 |
|
175 return EPass; |
|
176 } |
|
177 |
|
178 TInt CCommDbTest033_02::executeStepL() |
|
179 { |
|
180 CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref1; |
|
181 pref1.iRanking = 1; |
|
182 pref1.iDirection = ECommDbConnectionDirectionOutgoing; |
|
183 pref1.iDialogPref = ECommDbDialogPrefPrompt; |
|
184 pref1.iBearer.iBearerSet = KCommDbBearerCSD; |
|
185 pref1.iBearer.iIapId = 1; |
|
186 |
|
187 iPrefView->InsertConnectionPreferenceL(pref1, EFalse); |
|
188 |
|
189 CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref2; |
|
190 pref2.iRanking = 0; |
|
191 pref2.iDirection = ECommDbConnectionDirectionOutgoing; |
|
192 pref2.iDialogPref = ECommDbDialogPrefPrompt; |
|
193 pref2.iBearer.iBearerSet = KCommDbBearerCSD; |
|
194 pref2.iBearer.iIapId = 2; |
|
195 |
|
196 iPrefView->InsertConnectionPreferenceL(pref2, EFalse); |
|
197 |
|
198 iPrefView->SwapConnectionPreferencesL(ECommDbConnectionDirectionOutgoing, 1, 0); |
|
199 |
|
200 User::LeaveIfError(iPrefView->GotoFirstRecord()); |
|
201 |
|
202 CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref retrievedPref; |
|
203 iPrefView->ReadConnectionPreferenceL(retrievedPref); |
|
204 |
|
205 TBool rank1Found=EFalse; |
|
206 if(retrievedPref.iRanking==1) //should be pref2 with new ranking |
|
207 { |
|
208 rank1Found=ETrue; |
|
209 if(pref2.iBearer.iIapId!=retrievedPref.iBearer.iIapId) |
|
210 return KErrGeneral; //something has gone wrong with the swap |
|
211 } |
|
212 else if(retrievedPref.iRanking==0) //should be pref1 with new ranking |
|
213 { |
|
214 if(pref1.iBearer.iIapId!=retrievedPref.iBearer.iIapId) |
|
215 return KErrGeneral; //something has gone wrong with the swap |
|
216 } |
|
217 else |
|
218 return KErrGeneral; //We've got a rank other that 1&0 which is wrong. |
|
219 |
|
220 User::LeaveIfError(iPrefView->GotoNextRecord()); |
|
221 iPrefView->ReadConnectionPreferenceL(retrievedPref); |
|
222 |
|
223 if(retrievedPref.iRanking==1) |
|
224 { |
|
225 if(rank1Found) |
|
226 return KErrGeneral; //we've found 2 rank 1 records which is wrong. |
|
227 if(pref2.iBearer.iIapId!=retrievedPref.iBearer.iIapId) |
|
228 return KErrGeneral; //something has gone wrong with the swap |
|
229 } |
|
230 else if (retrievedPref.iRanking==0) |
|
231 { |
|
232 if(!rank1Found) |
|
233 return KErrGeneral; //we've found 2 rank 0 records which is wrong. |
|
234 if(pref1.iBearer.iIapId!=retrievedPref.iBearer.iIapId) |
|
235 return KErrGeneral; //something has gone wrong with the swap |
|
236 } |
|
237 else |
|
238 return KErrGeneral; |
|
239 |
|
240 return KErrNone; |
|
241 } |
|
242 |
|
243 TVerdict CCommDbTest033_02::doTestStepPostambleL() |
|
244 { |
|
245 //Get rid of our view |
|
246 if(iPrefView) |
|
247 { |
|
248 delete iPrefView; |
|
249 } |
|
250 iPrefView=0; |
|
251 |
|
252 //Create a new view that should have the record that was added in executeStepL and |
|
253 // may have been left in by a leave condition |
|
254 iPrefView = iTheDb->OpenConnectionPrefTableLC(); |
|
255 CleanupStack::Pop(); |
|
256 |
|
257 if(iPrefView->GotoFirstRecord() == KErrNone) |
|
258 { |
|
259 iPrefView->DeleteConnectionPreferenceL(); |
|
260 } |
|
261 if(iPrefView->GotoFirstRecord() == KErrNone) |
|
262 { |
|
263 iPrefView->DeleteConnectionPreferenceL(); |
|
264 } |
|
265 |
|
266 // Cleanup after test run |
|
267 CTestStepCommDb::doTestStepPostambleL(); |
|
268 return EPass; |
|
269 } |
|
270 |
|
271 // |
|
272 |
|
273 CCommDbTest033_03::CCommDbTest033_03() |
|
274 { |
|
275 // store the name of this test case |
|
276 iTestStepName = _L("step_033_03"); |
|
277 } |
|
278 |
|
279 CCommDbTest033_03::~CCommDbTest033_03() |
|
280 {} |
|
281 |
|
282 TVerdict CCommDbTest033_03::doTestStepL( void ) |
|
283 { |
|
284 if (executeStepL()!=KErrNotFound) |
|
285 return EFail; |
|
286 return EPass; //If we've got this far we've passed |
|
287 } |
|
288 |
|
289 TVerdict CCommDbTest033_03::doTestStepPreambleL() |
|
290 { |
|
291 iTheDb=CCommsDatabase::NewL(); |
|
292 |
|
293 iPrefView = iTheDb->OpenConnectionPrefTableLC(); |
|
294 CleanupStack::Pop(); |
|
295 |
|
296 return EPass; |
|
297 } |
|
298 |
|
299 TInt CCommDbTest033_03::executeStepL() |
|
300 { |
|
301 CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref1; |
|
302 pref1.iRanking = 1; |
|
303 pref1.iDirection = ECommDbConnectionDirectionOutgoing; |
|
304 pref1.iDialogPref = ECommDbDialogPrefPrompt; |
|
305 pref1.iBearer.iBearerSet = KCommDbBearerCSD; |
|
306 pref1.iBearer.iIapId = 1; |
|
307 |
|
308 iPrefView->InsertConnectionPreferenceL(pref1, EFalse); |
|
309 |
|
310 TRAPD(err, iPrefView->SwapConnectionPreferencesL(ECommDbConnectionDirectionOutgoing, 1, 2)); |
|
311 |
|
312 return err; |
|
313 } |
|
314 |
|
315 TVerdict CCommDbTest033_03::doTestStepPostambleL() |
|
316 { |
|
317 //Get rid of our view |
|
318 if(iPrefView) |
|
319 { |
|
320 delete iPrefView; |
|
321 } |
|
322 iPrefView=0; |
|
323 |
|
324 //Create a new view that should have the record that was added in executeStepL and |
|
325 // may have been left in by a leave condition |
|
326 iPrefView = iTheDb->OpenConnectionPrefTableLC(); |
|
327 CleanupStack::Pop(); |
|
328 |
|
329 if(iPrefView->GotoFirstRecord() == KErrNone) |
|
330 { |
|
331 iPrefView->DeleteConnectionPreferenceL(); |
|
332 } |
|
333 if(iPrefView->GotoFirstRecord() == KErrNone) |
|
334 { |
|
335 iPrefView->DeleteConnectionPreferenceL(); |
|
336 } |
|
337 |
|
338 // Cleanup after test run |
|
339 CTestStepCommDb::doTestStepPostambleL(); |
|
340 return EPass; |
|
341 } |
|
342 |
|
343 // |
|
344 |
|
345 CCommDbTest033_04::CCommDbTest033_04() |
|
346 { |
|
347 // store the name of this test case |
|
348 iTestStepName = _L("step_033_04"); |
|
349 } |
|
350 |
|
351 CCommDbTest033_04::~CCommDbTest033_04() |
|
352 {} |
|
353 |
|
354 TVerdict CCommDbTest033_04::doTestStepL( void ) |
|
355 { |
|
356 if (executeStepL()!=KErrAccessDenied) |
|
357 return EFail; |
|
358 return EPass; //If we've got this far we've passed |
|
359 } |
|
360 |
|
361 TVerdict CCommDbTest033_04::doTestStepPreambleL() |
|
362 { |
|
363 iTheDb=CCommsDatabase::NewL(); |
|
364 |
|
365 iPrefView = iTheDb->OpenConnectionPrefTableLC(); |
|
366 CleanupStack::Pop(); |
|
367 |
|
368 return EPass; |
|
369 } |
|
370 |
|
371 TInt CCommDbTest033_04::executeStepL() |
|
372 { |
|
373 CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref1; |
|
374 pref1.iRanking = 1; |
|
375 pref1.iDirection = ECommDbConnectionDirectionOutgoing; |
|
376 pref1.iDialogPref = ECommDbDialogPrefPrompt; |
|
377 pref1.iBearer.iBearerSet = KCommDbBearerCSD; |
|
378 pref1.iBearer.iIapId = 1; |
|
379 |
|
380 iPrefView->InsertConnectionPreferenceL(pref1, ETrue); //Make this entry read only |
|
381 |
|
382 CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref2; |
|
383 pref2.iRanking = 2; |
|
384 pref2.iDirection = ECommDbConnectionDirectionOutgoing; |
|
385 pref2.iDialogPref = ECommDbDialogPrefPrompt; |
|
386 pref2.iBearer.iBearerSet = KCommDbBearerCSD; |
|
387 pref2.iBearer.iIapId = 2; |
|
388 |
|
389 iPrefView->InsertConnectionPreferenceL(pref2, EFalse); |
|
390 |
|
391 TRAPD(err, iPrefView->SwapConnectionPreferencesL(ECommDbConnectionDirectionOutgoing, 1, 2)); |
|
392 |
|
393 return err; |
|
394 } |
|
395 |
|
396 TVerdict CCommDbTest033_04::doTestStepPostambleL() |
|
397 { |
|
398 //Get rid of our view |
|
399 if(iPrefView) |
|
400 { |
|
401 delete iPrefView; |
|
402 } |
|
403 iPrefView=0; |
|
404 |
|
405 //Create a new view that should have the record that was added in executeStepL and |
|
406 // may have been left in by a leave condition |
|
407 iPrefView = iTheDb->OpenConnectionPrefTableLC(); |
|
408 CleanupStack::Pop(); |
|
409 |
|
410 if(iPrefView->GotoFirstRecord() == KErrNone) |
|
411 { |
|
412 iPrefView->DeleteConnectionPreferenceL(); |
|
413 } |
|
414 if(iPrefView->GotoFirstRecord() == KErrNone) |
|
415 { |
|
416 iPrefView->DeleteConnectionPreferenceL(); |
|
417 } |
|
418 |
|
419 // Cleanup after test run |
|
420 CTestStepCommDb::doTestStepPostambleL(); |
|
421 return EPass; |
|
422 } |
|
423 |
|
424 // |
|
425 |
|
426 CCommDbTest033_05::CCommDbTest033_05() |
|
427 { |
|
428 // store the name of this test case |
|
429 iTestStepName = _L("step_033_05"); |
|
430 } |
|
431 |
|
432 CCommDbTest033_05::~CCommDbTest033_05() |
|
433 {} |
|
434 |
|
435 TVerdict CCommDbTest033_05::doTestStepL( void ) |
|
436 { |
|
437 Log(_L("Step 033.05 called ")); |
|
438 |
|
439 iTestStepResult = EPass; |
|
440 |
|
441 CCommDbTest033_01* step033_01 = new(ELeave) CCommDbTest033_01; |
|
442 CleanupStack::PushL(step033_01); |
|
443 step033_01->iSuite = iSuite; |
|
444 doTestStepWithHeapFailureL( *step033_01, KErrNone); |
|
445 CleanupStack::PopAndDestroy(step033_01); |
|
446 |
|
447 |
|
448 return iTestStepResult; |
|
449 } |
|
450 |
|
451 |
|
452 // |
|
453 |
|
454 CCommDbTest033_06::CCommDbTest033_06() |
|
455 { |
|
456 // store the name of this test case |
|
457 iTestStepName = _L("step_033_06"); |
|
458 } |
|
459 |
|
460 CCommDbTest033_06::~CCommDbTest033_06() |
|
461 {} |
|
462 |
|
463 TVerdict CCommDbTest033_06::doTestStepL( void ) |
|
464 { |
|
465 Log(_L("Step 033.06 called ")); |
|
466 |
|
467 iTestStepResult = EPass; |
|
468 |
|
469 CCommDbTest033_02* step033_02 = new(ELeave) CCommDbTest033_02; |
|
470 CleanupStack::PushL(step033_02); |
|
471 step033_02->iSuite = iSuite; |
|
472 doTestStepWithHeapFailureL( *step033_02, KErrNone); |
|
473 CleanupStack::PopAndDestroy(step033_02); |
|
474 |
|
475 return iTestStepResult; |
|
476 } |
|
477 |
|
478 // |
|
479 |
|
480 CCommDbTest033_07::CCommDbTest033_07() |
|
481 { |
|
482 // store the name of this test case |
|
483 iTestStepName = _L("step_033_07"); |
|
484 } |
|
485 |
|
486 CCommDbTest033_07::~CCommDbTest033_07() |
|
487 {} |
|
488 |
|
489 TVerdict CCommDbTest033_07::doTestStepL( void ) |
|
490 { |
|
491 Log(_L("Step 033.07 called ")); |
|
492 |
|
493 iTestStepResult = EPass; |
|
494 |
|
495 CCommDbTest033_03* step033_03 = new(ELeave) CCommDbTest033_03; |
|
496 CleanupStack::PushL(step033_03); |
|
497 step033_03->iSuite = iSuite; |
|
498 doTestStepWithHeapFailureL( *step033_03, KErrNotFound); |
|
499 CleanupStack::PopAndDestroy(step033_03); |
|
500 |
|
501 return iTestStepResult; |
|
502 } |
|
503 |
|
504 // |
|
505 |
|
506 CCommDbTest033_08::CCommDbTest033_08() |
|
507 { |
|
508 // store the name of this test case |
|
509 iTestStepName = _L("step_033_08"); |
|
510 } |
|
511 |
|
512 CCommDbTest033_08::~CCommDbTest033_08() |
|
513 {} |
|
514 |
|
515 TVerdict CCommDbTest033_08::doTestStepL( void ) |
|
516 { |
|
517 Log(_L("Step 033.08 called ")); |
|
518 |
|
519 iTestStepResult = EPass; |
|
520 |
|
521 CCommDbTest033_04* step033_04 = new(ELeave) CCommDbTest033_04; |
|
522 CleanupStack::PushL(step033_04); |
|
523 step033_04->iSuite = iSuite; |
|
524 doTestStepWithHeapFailureL( *step033_04, KErrAccessDenied); |
|
525 CleanupStack::PopAndDestroy(step033_04); |
|
526 |
|
527 return iTestStepResult; |
|
528 } |
|
529 |
|
530 // |
|
531 |
|
532 CCommDbTest033_09::CCommDbTest033_09() |
|
533 { |
|
534 // store the name of this test case |
|
535 iTestStepName = _L("step_033_09"); |
|
536 } |
|
537 |
|
538 TVerdict CCommDbTest033_09::doTestStepL() |
|
539 { |
|
540 if (executeStepL() != KErrNone) |
|
541 { |
|
542 return EFail; |
|
543 } |
|
544 |
|
545 return iTestStepResult; |
|
546 } |
|
547 |
|
548 TVerdict CCommDbTest033_09::doTestStepPreambleL() |
|
549 { |
|
550 iTheDb = CCommsDatabase::NewL(); |
|
551 |
|
552 iPrefView = iTheDb->OpenConnectionPrefTableLC(); |
|
553 CleanupStack::Pop(); |
|
554 |
|
555 return iTestStepResult; |
|
556 } |
|
557 |
|
558 TInt CCommDbTest033_09::executeStepL() |
|
559 { |
|
560 CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref1; |
|
561 pref1.iRanking = 0; |
|
562 pref1.iDirection = ECommDbConnectionDirectionOutgoing; |
|
563 pref1.iDialogPref = ECommDbDialogPrefPrompt; |
|
564 pref1.iBearer.iBearerSet = KCommDbBearerCSD; |
|
565 pref1.iBearer.iIapId = 1; |
|
566 |
|
567 iPrefView->InsertConnectionPreferenceL(pref1, EFalse); |
|
568 |
|
569 CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref2; |
|
570 pref2.iRanking = 0; |
|
571 pref2.iDirection = ECommDbConnectionDirectionOutgoing; |
|
572 pref2.iDialogPref = ECommDbDialogPrefPrompt; |
|
573 pref2.iBearer.iBearerSet = KCommDbBearerCSD; |
|
574 pref2.iBearer.iIapId = 2; |
|
575 |
|
576 iPrefView->InsertConnectionPreferenceL(pref2, EFalse); |
|
577 |
|
578 TRAPD(leaveCode, iPrefView->SwapConnectionPreferencesL(ECommDbConnectionDirectionOutgoing, 1, 0)); |
|
579 if (leaveCode != KErrArgument) |
|
580 { |
|
581 return KErrGeneral; |
|
582 } |
|
583 |
|
584 return KErrNone; |
|
585 } |
|
586 |
|
587 TVerdict CCommDbTest033_09::doTestStepPostambleL() |
|
588 { |
|
589 // |
|
590 // Get rid of our view |
|
591 // |
|
592 if(iPrefView) |
|
593 { |
|
594 delete iPrefView; |
|
595 iPrefView = NULL; |
|
596 } |
|
597 |
|
598 // |
|
599 // Create a new view that should have the record that was added in executeStepL and |
|
600 // may have been left in by a leave condition |
|
601 // |
|
602 iPrefView = iTheDb->OpenConnectionPrefTableLC(); |
|
603 CleanupStack::Pop(); |
|
604 |
|
605 if(iPrefView->GotoFirstRecord() == KErrNone) |
|
606 { |
|
607 iPrefView->DeleteConnectionPreferenceL(); |
|
608 } |
|
609 if(iPrefView->GotoFirstRecord() == KErrNone) |
|
610 { |
|
611 iPrefView->DeleteConnectionPreferenceL(); |
|
612 } |
|
613 |
|
614 // Cleanup after test run |
|
615 CTestStepCommDb::doTestStepPostambleL(); |
|
616 |
|
617 return iTestStepResult; |
|
618 } |
|
619 |
|
620 //EOF |