|
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 036.XX |
|
15 // |
|
16 // |
|
17 |
|
18 // EPOC includes |
|
19 #include <e32base.h> |
|
20 #include <commdb.h> |
|
21 #include <d32comm.h> |
|
22 #include <cdbtemp.h> |
|
23 #include <etelmm.h> |
|
24 |
|
25 // Test system includes |
|
26 #include <networking/log.h> |
|
27 #include <networking/teststep.h> |
|
28 #include "Teststepcommdb.h" |
|
29 #include "TestSuiteCommdb.h" |
|
30 #include "Step_036_xx.h" |
|
31 |
|
32 |
|
33 CCommDbTest036_01::CCommDbTest036_01() |
|
34 { |
|
35 // store the name of this test case |
|
36 iTestStepName = _L("step_036_01"); |
|
37 } |
|
38 |
|
39 CCommDbTest036_01::~CCommDbTest036_01() |
|
40 {} |
|
41 |
|
42 TVerdict CCommDbTest036_01::doTestStepL( void ) |
|
43 { |
|
44 if(executeStepL()!=KErrNone) |
|
45 return EFail; |
|
46 return EPass; |
|
47 } |
|
48 |
|
49 TVerdict CCommDbTest036_01::doTestStepPreambleL() |
|
50 { |
|
51 iTheDb=CCommsDatabase::NewL(); |
|
52 |
|
53 return EPass; |
|
54 } |
|
55 |
|
56 TInt CCommDbTest036_01::executeStepL() |
|
57 { |
|
58 CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(MODEM_BEARER)); |
|
59 CleanupStack::PushL(templateRecord); |
|
60 |
|
61 User::LeaveIfError(templateRecord->Modify()); |
|
62 |
|
63 TBufC8<KCommsDbSvrMaxFieldLength> inputString = _L8("string"); |
|
64 templateRecord->WriteTextL(TPtrC(COMMDB_NAME), _L("DummyName")); |
|
65 templateRecord->WriteTextL(TPtrC(MODEM_FAX_INIT_STRING), inputString); |
|
66 User::LeaveIfError(templateRecord->StoreModifications()); |
|
67 |
|
68 CleanupStack::PopAndDestroy(templateRecord); |
|
69 |
|
70 //Create a new template record and check the value is the same as the one entered. |
|
71 CCommsDbTemplateRecord* checkRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(MODEM_BEARER)); |
|
72 CleanupStack::PushL(checkRecord); |
|
73 |
|
74 TBuf8<KCommsDbSvrMaxFieldLength> checkString; |
|
75 |
|
76 checkRecord->ReadTextL(TPtrC(MODEM_FAX_INIT_STRING), checkString); |
|
77 CleanupStack::PopAndDestroy(checkRecord); |
|
78 |
|
79 if(checkString!=inputString) |
|
80 return KErrGeneral; |
|
81 |
|
82 return KErrNone; |
|
83 } |
|
84 |
|
85 TVerdict CCommDbTest036_01::doTestStepPostambleL() |
|
86 { |
|
87 delete iTheDb; |
|
88 iTheDb=NULL; |
|
89 return EPass; |
|
90 } |
|
91 |
|
92 // |
|
93 |
|
94 CCommDbTest036_02::CCommDbTest036_02() |
|
95 { |
|
96 // store the name of this test case |
|
97 iTestStepName = _L("step_036_02"); |
|
98 } |
|
99 |
|
100 CCommDbTest036_02::~CCommDbTest036_02() |
|
101 {} |
|
102 |
|
103 TVerdict CCommDbTest036_02::doTestStepL( void ) |
|
104 { |
|
105 if(executeStepL()!=KErrNone) |
|
106 return EFail; |
|
107 return EPass; |
|
108 } |
|
109 |
|
110 TVerdict CCommDbTest036_02::doTestStepPreambleL() |
|
111 { |
|
112 iTheDb=CCommsDatabase::NewL(); |
|
113 |
|
114 return EPass; |
|
115 } |
|
116 |
|
117 TInt CCommDbTest036_02::executeStepL() |
|
118 { |
|
119 CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(MODEM_BEARER)); |
|
120 CleanupStack::PushL(templateRecord); |
|
121 |
|
122 User::LeaveIfError(templateRecord->Modify()); |
|
123 |
|
124 TBufC8<KCommsDbSvrMaxFieldLength> firstInputString = _L8("string"); |
|
125 templateRecord->WriteTextL(TPtrC(COMMDB_NAME), _L("DummyName")); |
|
126 templateRecord->WriteTextL(TPtrC(MODEM_FAX_INIT_STRING), firstInputString); |
|
127 User::LeaveIfError(templateRecord->StoreModifications()); |
|
128 |
|
129 CleanupStack::PopAndDestroy(templateRecord); |
|
130 |
|
131 //Create a view on the modem table, over write the template value previosly set and check it sticks |
|
132 |
|
133 CCommsDbTableView* tableView = iTheDb->OpenTableLC(TPtrC(MODEM_BEARER)); |
|
134 TUint32 dummyId; |
|
135 //Create a new record, so we can be sure it is the same as the templated one |
|
136 User::LeaveIfError(tableView->InsertRecord(dummyId)); |
|
137 tableView->WriteTextL(TPtrC(COMMDB_NAME), _L("NewModem")); |
|
138 //Do overwrite of setting |
|
139 TBufC8<KCommsDbSvrMaxFieldLength> overwriteString = _L8("different string"); |
|
140 tableView->WriteTextL(TPtrC(MODEM_FAX_INIT_STRING), overwriteString); |
|
141 User::LeaveIfError(tableView->PutRecordChanges()); |
|
142 |
|
143 TBuf8<KCommsDbSvrMaxFieldLength> retrievedString; |
|
144 tableView->ReadTextL(TPtrC(MODEM_FAX_INIT_STRING), retrievedString); |
|
145 CleanupStack::PopAndDestroy(tableView); |
|
146 |
|
147 if(retrievedString!=overwriteString) |
|
148 return KErrGeneral; |
|
149 |
|
150 return KErrNone; |
|
151 } |
|
152 |
|
153 TVerdict CCommDbTest036_02::doTestStepPostambleL() |
|
154 { |
|
155 delete iTheDb; |
|
156 iTheDb=NULL; |
|
157 return EPass; |
|
158 } |
|
159 |
|
160 // |
|
161 |
|
162 CCommDbTest036_03::CCommDbTest036_03() |
|
163 { |
|
164 // store the name of this test case |
|
165 iTestStepName = _L("step_036_03"); |
|
166 } |
|
167 |
|
168 CCommDbTest036_03::~CCommDbTest036_03() |
|
169 {} |
|
170 |
|
171 TVerdict CCommDbTest036_03::doTestStepL( void ) |
|
172 { |
|
173 if(executeStepL()!=KErrNone) |
|
174 return EFail; |
|
175 return EPass; |
|
176 } |
|
177 |
|
178 TVerdict CCommDbTest036_03::doTestStepPreambleL() |
|
179 { |
|
180 iTheDb=CCommsDatabase::NewL(); |
|
181 |
|
182 return EPass; |
|
183 } |
|
184 |
|
185 TInt CCommDbTest036_03::executeStepL() |
|
186 { |
|
187 CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(MODEM_BEARER)); |
|
188 CleanupStack::PushL(templateRecord); |
|
189 |
|
190 User::LeaveIfError(templateRecord->Modify()); |
|
191 |
|
192 TBufC<KCommsDbSvrMaxFieldLength> inputString = _L("string"); |
|
193 templateRecord->WriteTextL(TPtrC(COMMDB_NAME), _L("DummyName")); |
|
194 templateRecord->WriteTextL(TPtrC(MODEM_PORT_NAME), inputString); |
|
195 User::LeaveIfError(templateRecord->StoreModifications()); |
|
196 |
|
197 CleanupStack::PopAndDestroy(templateRecord); |
|
198 |
|
199 //Create a view on the modem table, make a new record and check the value is the one set for the template |
|
200 |
|
201 CCommsDbTableView* tableView = iTheDb->OpenTableLC(TPtrC(MODEM_BEARER)); |
|
202 TUint32 dummyId; |
|
203 //Create a new record, so we can be sure it is the same as the templated one |
|
204 User::LeaveIfError(tableView->InsertRecord(dummyId)); |
|
205 tableView->WriteTextL(TPtrC(COMMDB_NAME), _L("NewModem")); |
|
206 User::LeaveIfError(tableView->PutRecordChanges()); |
|
207 |
|
208 //Retrieve the string we set for the template |
|
209 TBuf<KCommsDbSvrMaxFieldLength> retrievedString; |
|
210 tableView->ReadTextL(TPtrC(MODEM_PORT_NAME), retrievedString); |
|
211 CleanupStack::PopAndDestroy(tableView); |
|
212 |
|
213 if(retrievedString!=inputString) |
|
214 return KErrGeneral; |
|
215 |
|
216 return KErrNone; |
|
217 } |
|
218 |
|
219 TVerdict CCommDbTest036_03::doTestStepPostambleL() |
|
220 { |
|
221 delete iTheDb; |
|
222 iTheDb=NULL; |
|
223 return EPass; |
|
224 } |
|
225 |
|
226 // |
|
227 |
|
228 CCommDbTest036_04::CCommDbTest036_04() |
|
229 { |
|
230 // store the name of this test case |
|
231 iTestStepName = _L("step_036_04"); |
|
232 } |
|
233 |
|
234 CCommDbTest036_04::~CCommDbTest036_04() |
|
235 {} |
|
236 |
|
237 TVerdict CCommDbTest036_04::doTestStepL( void ) |
|
238 { |
|
239 if(executeStepL()!=KErrNone) |
|
240 return EFail; |
|
241 return EPass; |
|
242 } |
|
243 |
|
244 TVerdict CCommDbTest036_04::doTestStepPreambleL() |
|
245 { |
|
246 iTheDb=CCommsDatabase::NewL(); |
|
247 |
|
248 return EPass; |
|
249 } |
|
250 |
|
251 TInt CCommDbTest036_04::executeStepL() |
|
252 { |
|
253 CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(MODEM_BEARER)); |
|
254 CleanupStack::PushL(templateRecord); |
|
255 |
|
256 User::LeaveIfError(templateRecord->Modify()); |
|
257 |
|
258 TBufC<KCommsDbSvrMaxFieldLength> inputString = _L("string"); |
|
259 templateRecord->WriteTextL(TPtrC(COMMDB_NAME), _L("DummyName")); |
|
260 templateRecord->WriteTextL(TPtrC(MODEM_PORT_NAME), inputString); |
|
261 User::LeaveIfError(templateRecord->StoreModifications()); |
|
262 |
|
263 CleanupStack::PopAndDestroy(templateRecord); |
|
264 |
|
265 //Create a view on the modem table, make a new record and overwrite the value set in the template |
|
266 |
|
267 CCommsDbTableView* tableView = iTheDb->OpenTableLC(TPtrC(MODEM_BEARER)); |
|
268 TUint32 dummyId; |
|
269 //Create a new record, so we can be sure it is the same as the templated one |
|
270 User::LeaveIfError(tableView->InsertRecord(dummyId)); |
|
271 tableView->WriteTextL(TPtrC(COMMDB_NAME), _L("NewModem")); |
|
272 //Do overwrite of setting |
|
273 TBufC<KCommsDbSvrMaxFieldLength> overwriteString = _L("different string"); |
|
274 tableView->WriteTextL(TPtrC(MODEM_PORT_NAME), overwriteString); |
|
275 User::LeaveIfError(tableView->PutRecordChanges()); |
|
276 |
|
277 //Retrieve the string we just set |
|
278 TBuf<KCommsDbSvrMaxFieldLength> retrievedString; |
|
279 tableView->ReadTextL(TPtrC(MODEM_PORT_NAME), retrievedString); |
|
280 CleanupStack::PopAndDestroy(tableView); |
|
281 |
|
282 if(retrievedString!=overwriteString) |
|
283 return KErrGeneral; |
|
284 |
|
285 return KErrNone; |
|
286 } |
|
287 |
|
288 TVerdict CCommDbTest036_04::doTestStepPostambleL() |
|
289 { |
|
290 delete iTheDb; |
|
291 iTheDb=NULL; |
|
292 return EPass; |
|
293 } |
|
294 |
|
295 // |
|
296 |
|
297 CCommDbTest036_05::CCommDbTest036_05() |
|
298 { |
|
299 // store the name of this test case |
|
300 iTestStepName = _L("step_036_05"); |
|
301 } |
|
302 |
|
303 CCommDbTest036_05::~CCommDbTest036_05() |
|
304 {} |
|
305 |
|
306 TVerdict CCommDbTest036_05::doTestStepL( void ) |
|
307 { |
|
308 if(executeStepL()!=KErrNone) |
|
309 return EFail; |
|
310 return EPass; |
|
311 } |
|
312 |
|
313 TVerdict CCommDbTest036_05::doTestStepPreambleL() |
|
314 { |
|
315 iTheDb=CCommsDatabase::NewL(); |
|
316 |
|
317 return EPass; |
|
318 } |
|
319 |
|
320 TInt CCommDbTest036_05::executeStepL() |
|
321 { |
|
322 CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(DIAL_IN_ISP)); |
|
323 CleanupStack::PushL(templateRecord); |
|
324 |
|
325 User::LeaveIfError(templateRecord->Modify()); |
|
326 |
|
327 TBufC<KCommsDbSvrMaxFieldLength> inputString = _L("test string"); |
|
328 templateRecord->WriteTextL(TPtrC(COMMDB_NAME), _L("Name")); |
|
329 // templateRecord->WriteTextL(TPtrC(ISP_IF_NAME), _L("SLIP")); |
|
330 templateRecord->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), ETrue); |
|
331 templateRecord->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), ETrue); |
|
332 templateRecord->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), ETrue); |
|
333 templateRecord->WriteLongTextL(TPtrC(ISP_LOGIN_SCRIPT), inputString); |
|
334 User::LeaveIfError(templateRecord->StoreModifications()); |
|
335 |
|
336 CleanupStack::PopAndDestroy(templateRecord); |
|
337 |
|
338 //Create a view on the DialInISP table, make a new record and check the value is the one set for the template |
|
339 |
|
340 CCommsDbTableView* tableView = iTheDb->OpenTableLC(TPtrC(DIAL_IN_ISP)); |
|
341 TUint32 dummyId; |
|
342 //Create a new record, so we can be sure it is the same as the templated one |
|
343 User::LeaveIfError(tableView->InsertRecord(dummyId)); |
|
344 tableView->WriteTextL(TPtrC(COMMDB_NAME), _L("Test ISP")); |
|
345 // tableView->WriteTextL(TPtrC(ISP_IF_NAME), _L("Test If")); |
|
346 tableView->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), EFalse); |
|
347 tableView->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), EFalse); |
|
348 tableView->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), EFalse); |
|
349 User::LeaveIfError(tableView->PutRecordChanges()); |
|
350 |
|
351 //Retrieve the string we set for the template |
|
352 HBufC* retrievedString = tableView->ReadLongTextLC(TPtrC(ISP_LOGIN_SCRIPT)); |
|
353 |
|
354 TInt ret(KErrNone); |
|
355 if(*retrievedString!=inputString) |
|
356 ret= KErrGeneral; |
|
357 |
|
358 CleanupStack::PopAndDestroy(); //retrievedString |
|
359 CleanupStack::PopAndDestroy(tableView); |
|
360 |
|
361 return ret; |
|
362 } |
|
363 |
|
364 TVerdict CCommDbTest036_05::doTestStepPostambleL() |
|
365 { |
|
366 delete iTheDb; |
|
367 iTheDb=NULL; |
|
368 return EPass; |
|
369 } |
|
370 |
|
371 // |
|
372 |
|
373 CCommDbTest036_06::CCommDbTest036_06() |
|
374 { |
|
375 // store the name of this test case |
|
376 iTestStepName = _L("step_036_06"); |
|
377 } |
|
378 |
|
379 CCommDbTest036_06::~CCommDbTest036_06() |
|
380 {} |
|
381 |
|
382 TVerdict CCommDbTest036_06::doTestStepL( void ) |
|
383 { |
|
384 if(executeStepL()!=KErrNone) |
|
385 return EFail; |
|
386 return EPass; |
|
387 } |
|
388 |
|
389 TVerdict CCommDbTest036_06::doTestStepPreambleL() |
|
390 { |
|
391 iTheDb=CCommsDatabase::NewL(); |
|
392 |
|
393 return EPass; |
|
394 } |
|
395 |
|
396 TInt CCommDbTest036_06::executeStepL() |
|
397 { |
|
398 CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(DIAL_IN_ISP)); |
|
399 CleanupStack::PushL(templateRecord); |
|
400 |
|
401 User::LeaveIfError(templateRecord->Modify()); |
|
402 |
|
403 TBufC<KCommsDbSvrMaxFieldLength> inputString = _L("test string"); |
|
404 templateRecord->WriteTextL(TPtrC(COMMDB_NAME), _L("Name")); |
|
405 // templateRecord->WriteTextL(TPtrC(ISP_IF_NAME), _L("SLIP")); |
|
406 templateRecord->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), ETrue); |
|
407 templateRecord->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), ETrue); |
|
408 templateRecord->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), ETrue); |
|
409 templateRecord->WriteLongTextL(TPtrC(ISP_LOGIN_SCRIPT), inputString); |
|
410 User::LeaveIfError(templateRecord->StoreModifications()); |
|
411 |
|
412 CleanupStack::PopAndDestroy(templateRecord); |
|
413 |
|
414 //Create a view on the DialInISP table, make a new record and change the value we set int he template |
|
415 |
|
416 CCommsDbTableView* tableView = iTheDb->OpenTableLC(TPtrC(DIAL_IN_ISP)); |
|
417 TUint32 dummyId; |
|
418 //Create a new record, so we can be sure it is the same as the templated one |
|
419 User::LeaveIfError(tableView->InsertRecord(dummyId)); |
|
420 tableView->WriteTextL(TPtrC(COMMDB_NAME), _L("Test ISP")); |
|
421 // tableView->WriteTextL(TPtrC(ISP_IF_NAME), _L("Test If")); |
|
422 tableView->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), EFalse); |
|
423 tableView->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), EFalse); |
|
424 tableView->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), EFalse); |
|
425 //Overwrite value set above in template |
|
426 TBufC<KCommsDbSvrMaxFieldLength> overwriteString = _L("new string"); |
|
427 tableView->WriteLongTextL(TPtrC(ISP_LOGIN_SCRIPT), overwriteString); |
|
428 User::LeaveIfError(tableView->PutRecordChanges()); |
|
429 |
|
430 //Retrieve the string we just set |
|
431 HBufC* retrievedString = tableView->ReadLongTextLC(TPtrC(ISP_LOGIN_SCRIPT)); |
|
432 |
|
433 TInt ret(KErrNone); |
|
434 if(*retrievedString!=overwriteString) |
|
435 ret= KErrGeneral; |
|
436 |
|
437 CleanupStack::PopAndDestroy(); //retrievedString |
|
438 CleanupStack::PopAndDestroy(tableView); |
|
439 |
|
440 return ret; |
|
441 } |
|
442 |
|
443 TVerdict CCommDbTest036_06::doTestStepPostambleL() |
|
444 { |
|
445 delete iTheDb; |
|
446 iTheDb=NULL; |
|
447 return EPass; |
|
448 } |
|
449 |
|
450 // |
|
451 |
|
452 CCommDbTest036_07::CCommDbTest036_07() |
|
453 { |
|
454 // store the name of this test case |
|
455 iTestStepName = _L("step_036_07"); |
|
456 } |
|
457 |
|
458 CCommDbTest036_07::~CCommDbTest036_07() |
|
459 {} |
|
460 |
|
461 TVerdict CCommDbTest036_07::doTestStepL( void ) |
|
462 { |
|
463 if(executeStepL()!=KErrNone) |
|
464 return EFail; |
|
465 return EPass; |
|
466 } |
|
467 |
|
468 TVerdict CCommDbTest036_07::doTestStepPreambleL() |
|
469 { |
|
470 iTheDb=CCommsDatabase::NewL(); |
|
471 |
|
472 return EPass; |
|
473 } |
|
474 |
|
475 TInt CCommDbTest036_07::executeStepL() |
|
476 { |
|
477 CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(DIAL_IN_ISP)); |
|
478 CleanupStack::PushL(templateRecord); |
|
479 |
|
480 User::LeaveIfError(templateRecord->Modify()); |
|
481 |
|
482 TBool inputBool = ETrue; |
|
483 templateRecord->WriteTextL(TPtrC(COMMDB_NAME), _L("Name")); |
|
484 // templateRecord->WriteTextL(TPtrC(ISP_IF_NAME), _L("SLIP")); |
|
485 templateRecord->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), ETrue); |
|
486 templateRecord->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), ETrue); |
|
487 templateRecord->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), ETrue); |
|
488 templateRecord->WriteBoolL(TPtrC(ISP_USE_LOGIN_SCRIPT), inputBool); //Set to ETrue, since EFalse is default |
|
489 User::LeaveIfError(templateRecord->StoreModifications()); |
|
490 |
|
491 CleanupStack::PopAndDestroy(templateRecord); |
|
492 |
|
493 //Create a view on the DialInISP table, make a new record and check the value is the one set for the template |
|
494 |
|
495 CCommsDbTableView* tableView = iTheDb->OpenTableLC(TPtrC(DIAL_IN_ISP)); |
|
496 TUint32 dummyId; |
|
497 //Create a new record, so we can be sure it is the same as the templated one |
|
498 User::LeaveIfError(tableView->InsertRecord(dummyId)); |
|
499 tableView->WriteTextL(TPtrC(COMMDB_NAME), _L("Test ISP")); |
|
500 // tableView->WriteTextL(TPtrC(ISP_IF_NAME), _L("Test If")); |
|
501 tableView->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), EFalse); |
|
502 tableView->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), EFalse); |
|
503 tableView->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), EFalse); |
|
504 User::LeaveIfError(tableView->PutRecordChanges()); |
|
505 |
|
506 //Retrieve the bool we set for the template |
|
507 TBool retrievedBool; |
|
508 tableView->ReadBoolL(TPtrC(ISP_USE_LOGIN_SCRIPT), retrievedBool); |
|
509 |
|
510 CleanupStack::PopAndDestroy(tableView); |
|
511 |
|
512 if(retrievedBool!=inputBool) |
|
513 return KErrGeneral; |
|
514 |
|
515 return KErrNone; |
|
516 } |
|
517 |
|
518 TVerdict CCommDbTest036_07::doTestStepPostambleL() |
|
519 { |
|
520 delete iTheDb; |
|
521 iTheDb=NULL; |
|
522 return EPass; |
|
523 } |
|
524 |
|
525 // |
|
526 |
|
527 CCommDbTest036_08::CCommDbTest036_08() |
|
528 { |
|
529 // store the name of this test case |
|
530 iTestStepName = _L("step_036_08"); |
|
531 } |
|
532 |
|
533 CCommDbTest036_08::~CCommDbTest036_08() |
|
534 {} |
|
535 |
|
536 TVerdict CCommDbTest036_08::doTestStepL( void ) |
|
537 { |
|
538 if(executeStepL()!=KErrNone) |
|
539 return EFail; |
|
540 return EPass; |
|
541 } |
|
542 |
|
543 TVerdict CCommDbTest036_08::doTestStepPreambleL() |
|
544 { |
|
545 iTheDb=CCommsDatabase::NewL(); |
|
546 |
|
547 return EPass; |
|
548 } |
|
549 |
|
550 TInt CCommDbTest036_08::executeStepL() |
|
551 { |
|
552 CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(DIAL_IN_ISP)); |
|
553 CleanupStack::PushL(templateRecord); |
|
554 |
|
555 User::LeaveIfError(templateRecord->Modify()); |
|
556 |
|
557 TBool inputBool = ETrue; |
|
558 templateRecord->WriteTextL(TPtrC(COMMDB_NAME), _L("Name")); |
|
559 // templateRecord->WriteTextL(TPtrC(ISP_IF_NAME), _L("SLIP")); |
|
560 templateRecord->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), ETrue); |
|
561 templateRecord->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), ETrue); |
|
562 templateRecord->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), ETrue); |
|
563 templateRecord->WriteBoolL(TPtrC(ISP_USE_LOGIN_SCRIPT), inputBool); //Set to ETrue, since EFalse is default |
|
564 User::LeaveIfError(templateRecord->StoreModifications()); |
|
565 |
|
566 CleanupStack::PopAndDestroy(templateRecord); |
|
567 |
|
568 //Create a view on the DialInISP table, make a new record and change the value we set in the template |
|
569 |
|
570 CCommsDbTableView* tableView = iTheDb->OpenTableLC(TPtrC(DIAL_IN_ISP)); |
|
571 TUint32 dummyId; |
|
572 //Create a new record, so we can be sure it is the same as the templated one |
|
573 User::LeaveIfError(tableView->InsertRecord(dummyId)); |
|
574 tableView->WriteTextL(TPtrC(COMMDB_NAME), _L("Test ISP")); |
|
575 // tableView->WriteTextL(TPtrC(ISP_IF_NAME), _L("Test If")); |
|
576 tableView->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), EFalse); |
|
577 tableView->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), EFalse); |
|
578 tableView->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), EFalse); |
|
579 //Overwrite the value set in the template |
|
580 TBool overwriteBool = EFalse; |
|
581 tableView->WriteBoolL(TPtrC(ISP_USE_LOGIN_SCRIPT), overwriteBool); |
|
582 User::LeaveIfError(tableView->PutRecordChanges()); |
|
583 |
|
584 //Retrieve the bool we just set for the record |
|
585 TBool retrievedBool; |
|
586 tableView->ReadBoolL(TPtrC(ISP_USE_LOGIN_SCRIPT), retrievedBool); |
|
587 |
|
588 CleanupStack::PopAndDestroy(tableView); |
|
589 |
|
590 if(retrievedBool!=overwriteBool) |
|
591 return KErrGeneral; |
|
592 |
|
593 return KErrNone; |
|
594 } |
|
595 |
|
596 TVerdict CCommDbTest036_08::doTestStepPostambleL() |
|
597 { |
|
598 delete iTheDb; |
|
599 iTheDb=NULL; |
|
600 return EPass; |
|
601 } |
|
602 |
|
603 // |
|
604 |
|
605 CCommDbTest036_09::CCommDbTest036_09() |
|
606 { |
|
607 // store the name of this test case |
|
608 iTestStepName = _L("step_036_09"); |
|
609 } |
|
610 |
|
611 CCommDbTest036_09::~CCommDbTest036_09() |
|
612 {} |
|
613 |
|
614 TVerdict CCommDbTest036_09::doTestStepL( void ) |
|
615 { |
|
616 if(executeStepL()!=KErrNone) |
|
617 return EFail; |
|
618 return EPass; |
|
619 } |
|
620 |
|
621 TVerdict CCommDbTest036_09::doTestStepPreambleL() |
|
622 { |
|
623 iTheDb=CCommsDatabase::NewL(); |
|
624 |
|
625 return EPass; |
|
626 } |
|
627 |
|
628 TInt CCommDbTest036_09::executeStepL() |
|
629 { |
|
630 CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(DIAL_IN_ISP)); |
|
631 CleanupStack::PushL(templateRecord); |
|
632 User::LeaveIfError(templateRecord->Modify()); |
|
633 |
|
634 TUint32 inputInt = RMobileCall::KCapsSpeed32000; |
|
635 templateRecord->WriteTextL(TPtrC(COMMDB_NAME), _L("Name")); |
|
636 templateRecord->WriteTextL(TPtrC(ISP_IP_NAME_SERVER1),_L("MyDnsServer")); |
|
637 templateRecord->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), ETrue); |
|
638 templateRecord->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), ETrue); |
|
639 templateRecord->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), ETrue); |
|
640 templateRecord->WriteUintL(TPtrC(ISP_BEARER_SPEED), inputInt); |
|
641 User::LeaveIfError(templateRecord->StoreModifications()); |
|
642 |
|
643 CleanupStack::PopAndDestroy(templateRecord); |
|
644 |
|
645 //Create a view on the DialInISP table, make a new record and check the value is the one set for the template |
|
646 |
|
647 CCommsDbTableView* tableView = iTheDb->OpenTableLC(TPtrC(DIAL_IN_ISP)); |
|
648 TUint32 dummyId; |
|
649 //Create a new record, so we can be sure it is the same as the templated one |
|
650 User::LeaveIfError(tableView->InsertRecord(dummyId)); |
|
651 tableView->WriteTextL(TPtrC(COMMDB_NAME), _L("Test ISP")); |
|
652 tableView->WriteTextL(TPtrC(ISP_IP_NAME_SERVER1),_L("NotMyDnsServer")); |
|
653 tableView->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), EFalse); |
|
654 tableView->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), EFalse); |
|
655 tableView->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), EFalse); |
|
656 User::LeaveIfError(tableView->PutRecordChanges()); |
|
657 |
|
658 //Retrieve the TUint32 we set for the template |
|
659 TUint32 retrievedInt; |
|
660 tableView->ReadUintL(TPtrC(ISP_BEARER_SPEED), retrievedInt); |
|
661 // And now check that we retrieve the text from the template |
|
662 |
|
663 TBuf16<KCommsDbSvrMaxFieldLength> ifAuthName(_L16("Invalid")); |
|
664 tableView->ReadTextL(TPtrC(ISP_IP_NAME_SERVER1), ifAuthName); |
|
665 if(ifAuthName.Compare(_L16("NotMyDnsServer"))) |
|
666 { |
|
667 User::Leave(KErrGeneral); |
|
668 } |
|
669 |
|
670 CleanupStack::PopAndDestroy(tableView); |
|
671 |
|
672 if(retrievedInt!=inputInt) |
|
673 return KErrGeneral; |
|
674 |
|
675 return KErrNone; |
|
676 } |
|
677 |
|
678 TVerdict CCommDbTest036_09::doTestStepPostambleL() |
|
679 { |
|
680 delete iTheDb; |
|
681 iTheDb=NULL; |
|
682 return EPass; |
|
683 } |
|
684 |
|
685 // |
|
686 |
|
687 CCommDbTest036_10::CCommDbTest036_10() |
|
688 { |
|
689 // store the name of this test case |
|
690 iTestStepName = _L("step_036_10"); |
|
691 } |
|
692 |
|
693 CCommDbTest036_10::~CCommDbTest036_10() |
|
694 {} |
|
695 |
|
696 TVerdict CCommDbTest036_10::doTestStepL( void ) |
|
697 { |
|
698 if(executeStepL()!=KErrNone) |
|
699 return EFail; |
|
700 return EPass; |
|
701 } |
|
702 |
|
703 TVerdict CCommDbTest036_10::doTestStepPreambleL() |
|
704 { |
|
705 iTheDb=CCommsDatabase::NewL(); |
|
706 |
|
707 return EPass; |
|
708 } |
|
709 |
|
710 TInt CCommDbTest036_10::executeStepL() |
|
711 { |
|
712 CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(DIAL_IN_ISP)); |
|
713 CleanupStack::PushL(templateRecord); |
|
714 |
|
715 User::LeaveIfError(templateRecord->Modify()); |
|
716 |
|
717 TUint32 inputInt = RMobileCall::KCapsSpeed32000; |
|
718 templateRecord->WriteTextL(TPtrC(COMMDB_NAME), _L("Name")); |
|
719 templateRecord->WriteTextL(TPtrC(ISP_IP_NAME_SERVER1),_L("MyDnsServer")); |
|
720 templateRecord->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), ETrue); |
|
721 templateRecord->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), ETrue); |
|
722 templateRecord->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), ETrue); |
|
723 templateRecord->WriteUintL(TPtrC(ISP_BEARER_SPEED), inputInt); |
|
724 User::LeaveIfError(templateRecord->StoreModifications()); |
|
725 |
|
726 CleanupStack::PopAndDestroy(templateRecord); |
|
727 |
|
728 //Create a view on the DialInISP table, make a new record and change the value we set in the template |
|
729 CCommsDbTableView* tableView = iTheDb->OpenTableLC(TPtrC(DIAL_IN_ISP)); |
|
730 TUint32 dummyId; |
|
731 //Create a new record, so we can be sure it is the same as the templated one |
|
732 User::LeaveIfError(tableView->InsertRecord(dummyId)); |
|
733 tableView->WriteTextL(TPtrC(COMMDB_NAME), _L("Test ISP")); |
|
734 tableView->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), EFalse); |
|
735 tableView->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), EFalse); |
|
736 tableView->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), EFalse); |
|
737 //Overwrite value we set in the template |
|
738 TUint32 overwriteInt = RMobileCall::KCapsSpeed64000; |
|
739 tableView->WriteUintL(TPtrC(ISP_BEARER_SPEED), overwriteInt); |
|
740 User::LeaveIfError(tableView->PutRecordChanges()); |
|
741 |
|
742 //Retrieve the TUint32 we just set |
|
743 TUint32 retrievedInt; |
|
744 tableView->ReadUintL(TPtrC(ISP_BEARER_SPEED), retrievedInt); |
|
745 |
|
746 TBuf16<KCommsDbSvrMaxFieldLength> ifAuthName(_L16("Invalid")); |
|
747 tableView->ReadTextL(TPtrC(ISP_IP_NAME_SERVER1), ifAuthName); |
|
748 if(ifAuthName.Compare(_L16("MyDnsServer"))) |
|
749 { |
|
750 User::Leave(KErrGeneral); |
|
751 } |
|
752 |
|
753 CleanupStack::PopAndDestroy(tableView); |
|
754 |
|
755 if(retrievedInt!=overwriteInt) |
|
756 return KErrGeneral; |
|
757 |
|
758 return KErrNone; |
|
759 } |
|
760 |
|
761 TVerdict CCommDbTest036_10::doTestStepPostambleL() |
|
762 { |
|
763 delete iTheDb; |
|
764 iTheDb=NULL; |
|
765 return EPass; |
|
766 } |
|
767 |
|
768 // |
|
769 |
|
770 CCommDbTest036_11::CCommDbTest036_11() |
|
771 { |
|
772 // store the name of this test case |
|
773 iTestStepName = _L("step_036_11"); |
|
774 } |
|
775 |
|
776 CCommDbTest036_11::~CCommDbTest036_11() |
|
777 {} |
|
778 |
|
779 TVerdict CCommDbTest036_11::doTestStepL( void ) |
|
780 { |
|
781 executeStepL(); |
|
782 return EFail; //Test is supposed to panic, so if we get here we've failed |
|
783 } |
|
784 |
|
785 TVerdict CCommDbTest036_11::doTestStepPreambleL() |
|
786 { |
|
787 iTheDb=CCommsDatabase::NewL(); |
|
788 |
|
789 return EPass; |
|
790 } |
|
791 |
|
792 TInt CCommDbTest036_11::executeStepL() |
|
793 { |
|
794 CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(DIAL_IN_ISP)); |
|
795 CleanupStack::PushL(templateRecord); |
|
796 |
|
797 templateRecord->StoreModifications(); |
|
798 |
|
799 CleanupStack::PopAndDestroy(templateRecord); |
|
800 |
|
801 return KErrGeneral; |
|
802 } |
|
803 |
|
804 TVerdict CCommDbTest036_11::doTestStepPostambleL() |
|
805 { |
|
806 delete iTheDb; |
|
807 iTheDb=NULL; |
|
808 return EPass; |
|
809 } |
|
810 |
|
811 // |
|
812 |
|
813 CCommDbTest036_12::CCommDbTest036_12() |
|
814 { |
|
815 // store the name of this test case |
|
816 iTestStepName = _L("step_036_12"); |
|
817 } |
|
818 |
|
819 CCommDbTest036_12::~CCommDbTest036_12() |
|
820 {} |
|
821 |
|
822 TVerdict CCommDbTest036_12::doTestStepL( void ) |
|
823 { |
|
824 executeStepL(); |
|
825 return EFail; //Test should panic, so if we get here something's wrong |
|
826 } |
|
827 |
|
828 TVerdict CCommDbTest036_12::doTestStepPreambleL() |
|
829 { |
|
830 iTheDb=CCommsDatabase::NewL(); |
|
831 |
|
832 return EPass; |
|
833 } |
|
834 |
|
835 TInt CCommDbTest036_12::executeStepL() |
|
836 { |
|
837 CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(DIAL_IN_ISP)); |
|
838 CleanupStack::PushL(templateRecord); |
|
839 |
|
840 templateRecord->WriteBoolL(TPtrC(ISP_USE_LOGIN_SCRIPT), ETrue); |
|
841 |
|
842 CleanupStack::PopAndDestroy(templateRecord); |
|
843 return KErrGeneral; |
|
844 } |
|
845 |
|
846 TVerdict CCommDbTest036_12::doTestStepPostambleL() |
|
847 { |
|
848 delete iTheDb; |
|
849 iTheDb=NULL; |
|
850 return EPass; |
|
851 } |
|
852 |
|
853 // |
|
854 |
|
855 CCommDbTest036_13::CCommDbTest036_13() |
|
856 { |
|
857 // store the name of this test case |
|
858 iTestStepName = _L("step_036_13"); |
|
859 } |
|
860 |
|
861 CCommDbTest036_13::~CCommDbTest036_13() |
|
862 {} |
|
863 |
|
864 TVerdict CCommDbTest036_13::doTestStepL( void ) |
|
865 { |
|
866 if (executeStepL()!=KErrNotFound) |
|
867 return EFail; |
|
868 return EPass; |
|
869 } |
|
870 |
|
871 TVerdict CCommDbTest036_13::doTestStepPreambleL() |
|
872 { |
|
873 iTheDb=CCommsDatabase::NewL(); |
|
874 |
|
875 return EPass; |
|
876 } |
|
877 |
|
878 TInt CCommDbTest036_13::executeStepL() |
|
879 { |
|
880 CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(DIAL_IN_ISP)); |
|
881 CleanupStack::PushL(templateRecord); |
|
882 |
|
883 User::LeaveIfError(templateRecord->Modify()); |
|
884 TRAPD(err, templateRecord->WriteBoolL(_L("Invalid"), ETrue)); |
|
885 |
|
886 CleanupStack::PopAndDestroy(templateRecord); |
|
887 return err; |
|
888 } |
|
889 |
|
890 TVerdict CCommDbTest036_13::doTestStepPostambleL() |
|
891 { |
|
892 delete iTheDb; |
|
893 iTheDb=NULL; |
|
894 return EPass; |
|
895 } |
|
896 |
|
897 // |
|
898 |
|
899 CCommDbTest036_14::CCommDbTest036_14() |
|
900 { |
|
901 // store the name of this test case |
|
902 iTestStepName = _L("step_036_14"); |
|
903 } |
|
904 |
|
905 CCommDbTest036_14::~CCommDbTest036_14() |
|
906 {} |
|
907 |
|
908 TVerdict CCommDbTest036_14::doTestStepL( void ) |
|
909 { |
|
910 if (executeStepL()!=KErrNotFound) |
|
911 return EFail; |
|
912 return EPass; |
|
913 } |
|
914 |
|
915 TVerdict CCommDbTest036_14::doTestStepPreambleL() |
|
916 { |
|
917 iTheDb=CCommsDatabase::NewL(); |
|
918 |
|
919 return EPass; |
|
920 } |
|
921 |
|
922 TInt CCommDbTest036_14::executeStepL() |
|
923 { |
|
924 CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(DIAL_IN_ISP)); |
|
925 CleanupStack::PushL(templateRecord); |
|
926 |
|
927 User::LeaveIfError(templateRecord->Modify()); |
|
928 TRAPD(err, templateRecord->WriteBoolL(_L(""), ETrue)); |
|
929 |
|
930 CleanupStack::PopAndDestroy(templateRecord); |
|
931 return err; |
|
932 } |
|
933 |
|
934 TVerdict CCommDbTest036_14::doTestStepPostambleL() |
|
935 { |
|
936 delete iTheDb; |
|
937 iTheDb=NULL; |
|
938 return EPass; |
|
939 } |
|
940 |
|
941 // |
|
942 |
|
943 CCommDbTest036_15::CCommDbTest036_15() |
|
944 { |
|
945 // store the name of this test case |
|
946 iTestStepName = _L("step_036_15"); |
|
947 } |
|
948 |
|
949 CCommDbTest036_15::~CCommDbTest036_15() |
|
950 {} |
|
951 |
|
952 TVerdict CCommDbTest036_15::doTestStepL( void ) |
|
953 { |
|
954 if (executeStepL()!=KErrNotFound) |
|
955 return EFail; |
|
956 return EPass; |
|
957 } |
|
958 |
|
959 TVerdict CCommDbTest036_15::doTestStepPreambleL() |
|
960 { |
|
961 iTheDb=CCommsDatabase::NewL(); |
|
962 |
|
963 return EPass; |
|
964 } |
|
965 |
|
966 TInt CCommDbTest036_15::executeStepL() |
|
967 { |
|
968 CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(DIAL_IN_ISP)); |
|
969 CleanupStack::PushL(templateRecord); |
|
970 |
|
971 TBool dummyBool; |
|
972 TRAPD(err, templateRecord->ReadBoolL(_L("Invalid"), dummyBool)); |
|
973 |
|
974 CleanupStack::PopAndDestroy(templateRecord); |
|
975 return err; |
|
976 } |
|
977 |
|
978 TVerdict CCommDbTest036_15::doTestStepPostambleL() |
|
979 { |
|
980 delete iTheDb; |
|
981 iTheDb=NULL; |
|
982 return EPass; |
|
983 } |
|
984 |
|
985 // |
|
986 |
|
987 CCommDbTest036_16::CCommDbTest036_16() |
|
988 { |
|
989 // store the name of this test case |
|
990 iTestStepName = _L("step_036_16"); |
|
991 } |
|
992 |
|
993 CCommDbTest036_16::~CCommDbTest036_16() |
|
994 {} |
|
995 |
|
996 TVerdict CCommDbTest036_16::doTestStepL( void ) |
|
997 { |
|
998 Log(_L("Step 036.16 called ")); |
|
999 |
|
1000 iTestStepResult = EPass; |
|
1001 |
|
1002 CCommDbTest036_01* step036_01 = new(ELeave) CCommDbTest036_01; |
|
1003 CleanupStack::PushL(step036_01); |
|
1004 step036_01->iSuite = iSuite; |
|
1005 doTestStepWithHeapFailureL( *step036_01, KErrNone); |
|
1006 CleanupStack::PopAndDestroy(step036_01); |
|
1007 |
|
1008 CCommDbTest036_02* step036_02 = new(ELeave) CCommDbTest036_02; |
|
1009 CleanupStack::PushL(step036_02); |
|
1010 step036_02->iSuite = iSuite; |
|
1011 doTestStepWithHeapFailureL( *step036_02, KErrNone); |
|
1012 CleanupStack::PopAndDestroy(step036_02); |
|
1013 |
|
1014 CCommDbTest036_03* step036_03 = new(ELeave) CCommDbTest036_03; |
|
1015 CleanupStack::PushL(step036_03); |
|
1016 step036_03->iSuite = iSuite; |
|
1017 doTestStepWithHeapFailureL( *step036_03, KErrNone); |
|
1018 CleanupStack::PopAndDestroy(step036_03); |
|
1019 |
|
1020 CCommDbTest036_04* step036_04 = new(ELeave) CCommDbTest036_04; |
|
1021 CleanupStack::PushL(step036_04); |
|
1022 step036_04->iSuite = iSuite; |
|
1023 doTestStepWithHeapFailureL( *step036_04, KErrNone); |
|
1024 CleanupStack::PopAndDestroy(step036_04); |
|
1025 |
|
1026 CCommDbTest036_05* step036_05 = new(ELeave) CCommDbTest036_05; |
|
1027 CleanupStack::PushL(step036_05); |
|
1028 step036_05->iSuite = iSuite; |
|
1029 doTestStepWithHeapFailureL( *step036_05, KErrNone); |
|
1030 CleanupStack::PopAndDestroy(step036_05); |
|
1031 |
|
1032 CCommDbTest036_06* step036_06 = new(ELeave) CCommDbTest036_06; |
|
1033 CleanupStack::PushL(step036_06); |
|
1034 step036_06->iSuite = iSuite; |
|
1035 doTestStepWithHeapFailureL( *step036_06, KErrNone); |
|
1036 CleanupStack::PopAndDestroy(step036_06); |
|
1037 |
|
1038 CCommDbTest036_07* step036_07 = new(ELeave) CCommDbTest036_07; |
|
1039 CleanupStack::PushL(step036_07); |
|
1040 step036_07->iSuite = iSuite; |
|
1041 doTestStepWithHeapFailureL( *step036_07, KErrNone); |
|
1042 CleanupStack::PopAndDestroy(step036_07); |
|
1043 |
|
1044 CCommDbTest036_08* step036_08 = new(ELeave) CCommDbTest036_08; |
|
1045 CleanupStack::PushL(step036_08); |
|
1046 step036_08->iSuite = iSuite; |
|
1047 doTestStepWithHeapFailureL( *step036_08, KErrNone); |
|
1048 CleanupStack::PopAndDestroy(step036_08); |
|
1049 |
|
1050 CCommDbTest036_09* step036_09 = new(ELeave) CCommDbTest036_09; |
|
1051 CleanupStack::PushL(step036_09); |
|
1052 step036_09->iSuite = iSuite; |
|
1053 doTestStepWithHeapFailureL( *step036_09, KErrNone); |
|
1054 CleanupStack::PopAndDestroy(step036_09); |
|
1055 |
|
1056 CCommDbTest036_10* step036_10 = new(ELeave) CCommDbTest036_10; |
|
1057 CleanupStack::PushL(step036_10); |
|
1058 step036_10->iSuite = iSuite; |
|
1059 doTestStepWithHeapFailureL( *step036_10, KErrNone); |
|
1060 CleanupStack::PopAndDestroy(step036_10); |
|
1061 |
|
1062 CCommDbTest036_13* step036_13 = new(ELeave) CCommDbTest036_13; |
|
1063 CleanupStack::PushL(step036_13); |
|
1064 step036_13->iSuite = iSuite; |
|
1065 doTestStepWithHeapFailureL( *step036_13, KErrNotFound); |
|
1066 CleanupStack::PopAndDestroy(step036_13); |
|
1067 |
|
1068 CCommDbTest036_14* step036_14 = new(ELeave) CCommDbTest036_14; |
|
1069 CleanupStack::PushL(step036_14); |
|
1070 step036_14->iSuite = iSuite; |
|
1071 doTestStepWithHeapFailureL( *step036_14, KErrNotFound); |
|
1072 CleanupStack::PopAndDestroy(step036_14); |
|
1073 |
|
1074 CCommDbTest036_15* step036_15 = new(ELeave) CCommDbTest036_15; |
|
1075 CleanupStack::PushL(step036_15); |
|
1076 step036_15->iSuite = iSuite; |
|
1077 doTestStepWithHeapFailureL( *step036_15, KErrNotFound); |
|
1078 CleanupStack::PopAndDestroy(step036_15); |
|
1079 |
|
1080 return iTestStepResult; |
|
1081 } |
|
1082 |
|
1083 // |
|
1084 |
|
1085 CCommDbTest036_17::CCommDbTest036_17() |
|
1086 { |
|
1087 // store the name of this test case |
|
1088 iTestStepName = _L("step_036_17"); |
|
1089 } |
|
1090 |
|
1091 CCommDbTest036_17::~CCommDbTest036_17() |
|
1092 {} |
|
1093 |
|
1094 TVerdict CCommDbTest036_17::doTestStepL( void ) |
|
1095 { |
|
1096 |
|
1097 iTestStepResult = EPass; |
|
1098 |
|
1099 CCommDbTest036_11* step036_11 = new(ELeave) CCommDbTest036_11; |
|
1100 CleanupStack::PushL(step036_11); |
|
1101 step036_11->iSuite = iSuite; |
|
1102 doTestStepWithHeapFailureL( *step036_11, KErrNone); |
|
1103 CleanupStack::PopAndDestroy(step036_11); |
|
1104 |
|
1105 return iTestStepResult; |
|
1106 } |
|
1107 |
|
1108 // |
|
1109 |
|
1110 CCommDbTest036_18::CCommDbTest036_18() |
|
1111 { |
|
1112 // store the name of this test case |
|
1113 iTestStepName = _L("step_036_18"); |
|
1114 } |
|
1115 |
|
1116 CCommDbTest036_18::~CCommDbTest036_18() |
|
1117 {} |
|
1118 |
|
1119 TVerdict CCommDbTest036_18::doTestStepL( void ) |
|
1120 { |
|
1121 |
|
1122 iTestStepResult = EPass; |
|
1123 |
|
1124 CCommDbTest036_12* step036_12 = new(ELeave) CCommDbTest036_12; |
|
1125 CleanupStack::PushL(step036_12); |
|
1126 step036_12->iSuite = iSuite; |
|
1127 doTestStepWithHeapFailureL( *step036_12, KErrNone); |
|
1128 CleanupStack::PopAndDestroy(step036_12); |
|
1129 |
|
1130 return iTestStepResult; |
|
1131 } |