72
|
1 |
//
|
|
2 |
// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
// All rights reserved.
|
|
4 |
// This component and the accompanying materials are made available
|
|
5 |
// under the terms of "Eclipse Public License v1.0"
|
|
6 |
// which accompanies this distribution, and is available
|
|
7 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
//
|
|
9 |
// Initial Contributors:
|
|
10 |
// Nokia Corporation - initial contribution.
|
|
11 |
//
|
|
12 |
// Contributors:
|
|
13 |
//
|
|
14 |
// Description:
|
|
15 |
//
|
|
16 |
//
|
|
17 |
//
|
|
18 |
// This contains CommDb Unit Test Cases 022.XX
|
|
19 |
|
|
20 |
// EPOC includes
|
|
21 |
#include <e32base.h>
|
|
22 |
#include <commdb.h>
|
|
23 |
#include <d32comm.h>
|
|
24 |
|
|
25 |
// Test system includes
|
|
26 |
#include "Teststepcommdb.h"
|
|
27 |
#include "Step_022_xx.h"
|
|
28 |
|
|
29 |
|
|
30 |
/////////////////////
|
|
31 |
// Test step 022.01
|
|
32 |
/////////////////////
|
|
33 |
|
|
34 |
// constructor
|
|
35 |
CCommDbTest022_01::CCommDbTest022_01()
|
|
36 |
{
|
|
37 |
// store the name of this test case
|
|
38 |
SetTestStepName(_L("step_022_01"));
|
|
39 |
}
|
|
40 |
|
|
41 |
// destructor
|
|
42 |
CCommDbTest022_01::~CCommDbTest022_01()
|
|
43 |
{
|
|
44 |
}
|
|
45 |
|
|
46 |
|
|
47 |
TVerdict CCommDbTest022_01::doTestStepPreambleL()
|
|
48 |
{
|
|
49 |
openDbL();
|
|
50 |
SetTestStepResult(EPass); return TestStepResult();
|
|
51 |
}
|
|
52 |
|
|
53 |
TInt CCommDbTest022_01::executeStepL()
|
|
54 |
{
|
|
55 |
TInt ret=KErrGeneral;
|
|
56 |
|
|
57 |
//Open a view on the IAP table, then check the records returned
|
|
58 |
iTheView = iTheDb->OpenIAPTableViewMatchingBearerSetLC( KCommDbBearerCSD, ECommDbConnectionDirectionOutgoing);
|
|
59 |
CleanupStack::Pop();
|
|
60 |
|
|
61 |
CDBLEAVE( iTheView->GotoFirstRecord(), KErrNone );
|
|
62 |
TBuf<KCommsDbSvrMaxFieldLength> value;
|
|
63 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value );
|
|
64 |
if( !value.Compare(_L("Record #1")) )
|
|
65 |
{
|
|
66 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNone );
|
|
67 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value);
|
|
68 |
if ( !value.Compare(_L("Record #2")) )
|
|
69 |
{
|
|
70 |
//There should be no more records
|
|
71 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNotFound );
|
|
72 |
ret = KErrNone;
|
|
73 |
}
|
|
74 |
}
|
|
75 |
|
|
76 |
return ret;
|
|
77 |
}
|
|
78 |
|
|
79 |
|
|
80 |
TVerdict CCommDbTest022_01::doTestStepL( )
|
|
81 |
{
|
|
82 |
INFO_PRINTF1(_L("Step 022.01 called "));
|
|
83 |
|
|
84 |
|
|
85 |
if ( executeStepL() == KErrNone )
|
|
86 |
SetTestStepResult(EPass); else
|
|
87 |
SetTestStepResult(EFail);
|
|
88 |
return TestStepResult();
|
|
89 |
}
|
|
90 |
|
|
91 |
|
|
92 |
|
|
93 |
|
|
94 |
/////////////////////
|
|
95 |
// Test step 022.02
|
|
96 |
/////////////////////
|
|
97 |
|
|
98 |
// constructor
|
|
99 |
CCommDbTest022_02::CCommDbTest022_02()
|
|
100 |
{
|
|
101 |
// store the name of this test case
|
|
102 |
SetTestStepName(_L("step_022_02"));
|
|
103 |
}
|
|
104 |
|
|
105 |
// destructor
|
|
106 |
CCommDbTest022_02::~CCommDbTest022_02()
|
|
107 |
{
|
|
108 |
}
|
|
109 |
|
|
110 |
|
|
111 |
TVerdict CCommDbTest022_02::doTestStepPreambleL()
|
|
112 |
{
|
|
113 |
openDbL();
|
|
114 |
SetTestStepResult(EPass); return TestStepResult();
|
|
115 |
}
|
|
116 |
|
|
117 |
TInt CCommDbTest022_02::executeStepL()
|
|
118 |
{
|
|
119 |
TInt ret=KErrGeneral;
|
|
120 |
|
|
121 |
//Open a view on the IAP table, then check the records returned
|
|
122 |
iTheView = iTheDb->OpenIAPTableViewMatchingBearerSetLC( KCommDbBearerCSD, ECommDbConnectionDirectionIncoming);
|
|
123 |
CleanupStack::Pop();
|
|
124 |
|
|
125 |
CDBLEAVE( iTheView->GotoFirstRecord(), KErrNone );
|
|
126 |
TBuf<KCommsDbSvrMaxFieldLength> value;
|
|
127 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value );
|
|
128 |
if( !value.Compare(_L("Record #3")) )
|
|
129 |
{
|
|
130 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNone );
|
|
131 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value);
|
|
132 |
if ( !value.Compare(_L("Record #4")) )
|
|
133 |
{
|
|
134 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNone );
|
|
135 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value);
|
|
136 |
if ( !value.Compare(_L("Record #6")) )
|
|
137 |
{
|
|
138 |
//There should be no more records
|
|
139 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNotFound );
|
|
140 |
ret = KErrNone;
|
|
141 |
}
|
|
142 |
}
|
|
143 |
}
|
|
144 |
|
|
145 |
return ret;
|
|
146 |
}
|
|
147 |
|
|
148 |
|
|
149 |
TVerdict CCommDbTest022_02::doTestStepL( )
|
|
150 |
{
|
|
151 |
INFO_PRINTF1(_L("Step 022.02 called "));
|
|
152 |
|
|
153 |
|
|
154 |
if ( executeStepL() == KErrNone )
|
|
155 |
SetTestStepResult(EPass); else
|
|
156 |
SetTestStepResult(EFail);
|
|
157 |
return TestStepResult();
|
|
158 |
}
|
|
159 |
|
|
160 |
|
|
161 |
|
|
162 |
/////////////////////
|
|
163 |
// Test step 022.03
|
|
164 |
/////////////////////
|
|
165 |
|
|
166 |
// constructor
|
|
167 |
CCommDbTest022_03::CCommDbTest022_03()
|
|
168 |
{
|
|
169 |
// store the name of this test case
|
|
170 |
SetTestStepName(_L("step_022_03"));
|
|
171 |
}
|
|
172 |
|
|
173 |
// destructor
|
|
174 |
CCommDbTest022_03::~CCommDbTest022_03()
|
|
175 |
{
|
|
176 |
}
|
|
177 |
|
|
178 |
|
|
179 |
TVerdict CCommDbTest022_03::doTestStepPreambleL()
|
|
180 |
{
|
|
181 |
openDbL();
|
|
182 |
SetTestStepResult(EPass); return TestStepResult();
|
|
183 |
}
|
|
184 |
|
|
185 |
TInt CCommDbTest022_03::executeStepL()
|
|
186 |
{
|
|
187 |
TInt ret=KErrGeneral;
|
|
188 |
|
|
189 |
//Open a view on the IAP table, then check the records returned
|
|
190 |
iTheView = iTheDb->OpenIAPTableViewMatchingBearerSetLC( KCommDbBearerWcdma, ECommDbConnectionDirectionOutgoing);
|
|
191 |
CleanupStack::Pop();
|
|
192 |
|
|
193 |
CDBLEAVE( iTheView->GotoFirstRecord(), KErrNone );
|
|
194 |
TBuf<KCommsDbSvrMaxFieldLength> value;
|
|
195 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value );
|
|
196 |
if( !value.Compare(_L("Record #5")) )
|
|
197 |
{
|
|
198 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNone );
|
|
199 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value);
|
|
200 |
if ( !value.Compare(_L("Record #7")) )
|
|
201 |
{
|
|
202 |
//There should be no more records
|
|
203 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNotFound );
|
|
204 |
ret = KErrNone;
|
|
205 |
}
|
|
206 |
}
|
|
207 |
|
|
208 |
return ret;
|
|
209 |
}
|
|
210 |
|
|
211 |
|
|
212 |
TVerdict CCommDbTest022_03::doTestStepL( )
|
|
213 |
{
|
|
214 |
INFO_PRINTF1(_L("Step 022.03 called "));
|
|
215 |
|
|
216 |
|
|
217 |
if ( executeStepL() == KErrNone )
|
|
218 |
SetTestStepResult(EPass); else
|
|
219 |
SetTestStepResult(EFail);
|
|
220 |
return TestStepResult();
|
|
221 |
}
|
|
222 |
|
|
223 |
|
|
224 |
|
|
225 |
/////////////////////
|
|
226 |
// Test step 022.04
|
|
227 |
/////////////////////
|
|
228 |
|
|
229 |
// constructor
|
|
230 |
CCommDbTest022_04::CCommDbTest022_04()
|
|
231 |
{
|
|
232 |
// store the name of this test case
|
|
233 |
SetTestStepName(_L("step_022_04"));
|
|
234 |
}
|
|
235 |
|
|
236 |
// destructor
|
|
237 |
CCommDbTest022_04::~CCommDbTest022_04()
|
|
238 |
{
|
|
239 |
}
|
|
240 |
|
|
241 |
|
|
242 |
TVerdict CCommDbTest022_04::doTestStepPreambleL()
|
|
243 |
{
|
|
244 |
openDbL();
|
|
245 |
SetTestStepResult(EPass); return TestStepResult();
|
|
246 |
}
|
|
247 |
|
|
248 |
TInt CCommDbTest022_04::executeStepL()
|
|
249 |
{
|
|
250 |
TInt ret=KErrGeneral;
|
|
251 |
|
|
252 |
//Open a view on the IAP table, then check the records returned
|
|
253 |
iTheView = iTheDb->OpenIAPTableViewMatchingBearerSetLC( KCommDbBearerCSD, ECommDbConnectionDirectionOutgoing);
|
|
254 |
CleanupStack::Pop();
|
|
255 |
|
|
256 |
CDBLEAVE( iTheView->GotoFirstRecord(), KErrNone );
|
|
257 |
TBuf<KCommsDbSvrMaxFieldLength> value;
|
|
258 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value );
|
|
259 |
if( !value.Compare(_L("Record #1")) )
|
|
260 |
{
|
|
261 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNone );
|
|
262 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value);
|
|
263 |
if ( !value.Compare(_L("Record #2")) )
|
|
264 |
{
|
|
265 |
//There should be no more records
|
|
266 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNotFound );
|
|
267 |
ret = KErrNone;
|
|
268 |
}
|
|
269 |
}
|
|
270 |
|
|
271 |
return ret;
|
|
272 |
}
|
|
273 |
|
|
274 |
|
|
275 |
TVerdict CCommDbTest022_04::doTestStepL( )
|
|
276 |
{
|
|
277 |
INFO_PRINTF1(_L("Step 022.04 called "));
|
|
278 |
|
|
279 |
|
|
280 |
if ( executeStepL() == KErrNone )
|
|
281 |
SetTestStepResult(EPass); else
|
|
282 |
SetTestStepResult(EFail);
|
|
283 |
return TestStepResult();
|
|
284 |
}
|
|
285 |
|
|
286 |
|
|
287 |
|
|
288 |
|
|
289 |
/////////////////////
|
|
290 |
// Test step 022.05
|
|
291 |
/////////////////////
|
|
292 |
|
|
293 |
// constructor
|
|
294 |
CCommDbTest022_05::CCommDbTest022_05()
|
|
295 |
{
|
|
296 |
// store the name of this test case
|
|
297 |
SetTestStepName(_L("step_022_05"));
|
|
298 |
}
|
|
299 |
|
|
300 |
// destructor
|
|
301 |
CCommDbTest022_05::~CCommDbTest022_05()
|
|
302 |
{
|
|
303 |
}
|
|
304 |
|
|
305 |
|
|
306 |
TVerdict CCommDbTest022_05::doTestStepPreambleL()
|
|
307 |
{
|
|
308 |
openDbL();
|
|
309 |
SetTestStepResult(EPass); return TestStepResult();
|
|
310 |
}
|
|
311 |
|
|
312 |
TInt CCommDbTest022_05::executeStepL()
|
|
313 |
{
|
|
314 |
TInt ret=KErrGeneral;
|
|
315 |
|
|
316 |
//Open a view on the IAP table, then check the records returned
|
|
317 |
iTheView = iTheDb->OpenIAPTableViewMatchingBearerSetLC( KCommDbBearerWcdma, ECommDbConnectionDirectionIncoming);
|
|
318 |
CleanupStack::Pop();
|
|
319 |
|
|
320 |
CDBLEAVE( iTheView->GotoFirstRecord(), KErrNone );
|
|
321 |
TBuf<KCommsDbSvrMaxFieldLength> value;
|
|
322 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value );
|
|
323 |
if( !value.Compare(_L("Record #9")) )
|
|
324 |
{
|
|
325 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNone );
|
|
326 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value);
|
|
327 |
if ( !value.Compare(_L("Record #10")) )
|
|
328 |
{
|
|
329 |
//There should be no more records
|
|
330 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNotFound );
|
|
331 |
ret = KErrNone;
|
|
332 |
}
|
|
333 |
}
|
|
334 |
|
|
335 |
return ret;
|
|
336 |
}
|
|
337 |
|
|
338 |
|
|
339 |
TVerdict CCommDbTest022_05::doTestStepL( )
|
|
340 |
{
|
|
341 |
INFO_PRINTF1(_L("Step 022.05 called "));
|
|
342 |
|
|
343 |
|
|
344 |
if ( executeStepL() == KErrNone )
|
|
345 |
SetTestStepResult(EPass); else
|
|
346 |
SetTestStepResult(EFail);
|
|
347 |
return TestStepResult();
|
|
348 |
}
|
|
349 |
|
|
350 |
|
|
351 |
|
|
352 |
/////////////////////
|
|
353 |
// Test step 022.06
|
|
354 |
/////////////////////
|
|
355 |
|
|
356 |
// constructor
|
|
357 |
CCommDbTest022_06::CCommDbTest022_06()
|
|
358 |
{
|
|
359 |
// store the name of this test case
|
|
360 |
SetTestStepName(_L("step_022_06"));
|
|
361 |
}
|
|
362 |
|
|
363 |
// destructor
|
|
364 |
CCommDbTest022_06::~CCommDbTest022_06()
|
|
365 |
{
|
|
366 |
}
|
|
367 |
|
|
368 |
|
|
369 |
TVerdict CCommDbTest022_06::doTestStepPreambleL()
|
|
370 |
{
|
|
371 |
openDbL();
|
|
372 |
SetTestStepResult(EPass); return TestStepResult();
|
|
373 |
}
|
|
374 |
|
|
375 |
TInt CCommDbTest022_06::executeStepL()
|
|
376 |
{
|
|
377 |
TInt ret=KErrGeneral;
|
|
378 |
|
|
379 |
//Open a view on the IAP table, then check the records returned
|
|
380 |
iTheView = iTheDb->OpenIAPTableViewMatchingBearerSetLC( KCommDbBearerWcdma, ECommDbConnectionDirectionIncoming);
|
|
381 |
CleanupStack::Pop();
|
|
382 |
|
|
383 |
CDBLEAVE( iTheView->GotoFirstRecord(), KErrNone );
|
|
384 |
TBuf<KCommsDbSvrMaxFieldLength> value;
|
|
385 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value );
|
|
386 |
if( !value.Compare(_L("Record #9")) )
|
|
387 |
{
|
|
388 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNone );
|
|
389 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value);
|
|
390 |
if ( !value.Compare(_L("Record #10")) )
|
|
391 |
{
|
|
392 |
//There should be no more records
|
|
393 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNotFound );
|
|
394 |
ret = KErrNone;
|
|
395 |
}
|
|
396 |
}
|
|
397 |
|
|
398 |
return ret;
|
|
399 |
}
|
|
400 |
|
|
401 |
|
|
402 |
TVerdict CCommDbTest022_06::doTestStepL( )
|
|
403 |
{
|
|
404 |
INFO_PRINTF1(_L("Step 022.06 called "));
|
|
405 |
|
|
406 |
|
|
407 |
if ( executeStepL() == KErrNone )
|
|
408 |
SetTestStepResult(EPass); else
|
|
409 |
SetTestStepResult(EFail);
|
|
410 |
return TestStepResult();
|
|
411 |
}
|
|
412 |
|
|
413 |
|
|
414 |
/////////////////////
|
|
415 |
// Test step 022.07
|
|
416 |
/////////////////////
|
|
417 |
|
|
418 |
// constructor
|
|
419 |
CCommDbTest022_07::CCommDbTest022_07()
|
|
420 |
{
|
|
421 |
// store the name of this test case
|
|
422 |
SetTestStepName(_L("step_022_07"));
|
|
423 |
}
|
|
424 |
|
|
425 |
// destructor
|
|
426 |
CCommDbTest022_07::~CCommDbTest022_07()
|
|
427 |
{
|
|
428 |
}
|
|
429 |
|
|
430 |
|
|
431 |
TVerdict CCommDbTest022_07::doTestStepPreambleL()
|
|
432 |
{
|
|
433 |
openDbL();
|
|
434 |
SetTestStepResult(EPass); return TestStepResult();
|
|
435 |
}
|
|
436 |
|
|
437 |
TInt CCommDbTest022_07::executeStepL()
|
|
438 |
{
|
|
439 |
TInt ret=KErrGeneral;
|
|
440 |
|
|
441 |
//Open a view on the IAP table, then check the records returned
|
|
442 |
iTheView = iTheDb->OpenIAPTableViewMatchingBearerSetLC( KCommDbBearerCSD, ECommDbConnectionDirectionIncoming);
|
|
443 |
CleanupStack::Pop();
|
|
444 |
|
|
445 |
CDBLEAVE( iTheView->GotoFirstRecord(), KErrNone );
|
|
446 |
TBuf<KCommsDbSvrMaxFieldLength> value;
|
|
447 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value );
|
|
448 |
if( !value.Compare(_L("Record #3")) )
|
|
449 |
{
|
|
450 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNone );
|
|
451 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value);
|
|
452 |
if ( !value.Compare(_L("Record #4")) )
|
|
453 |
{
|
|
454 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNone );
|
|
455 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value);
|
|
456 |
if ( !value.Compare(_L("Record #6")) )
|
|
457 |
{
|
|
458 |
//There should be no more records
|
|
459 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNotFound );
|
|
460 |
ret = KErrNone;
|
|
461 |
}
|
|
462 |
}
|
|
463 |
}
|
|
464 |
|
|
465 |
return ret;
|
|
466 |
}
|
|
467 |
|
|
468 |
|
|
469 |
TVerdict CCommDbTest022_07::doTestStepL( )
|
|
470 |
{
|
|
471 |
INFO_PRINTF1(_L("Step 022.07 called "));
|
|
472 |
|
|
473 |
|
|
474 |
if ( executeStepL() == KErrNone )
|
|
475 |
SetTestStepResult(EPass); else
|
|
476 |
SetTestStepResult(EFail);
|
|
477 |
return TestStepResult();
|
|
478 |
}
|
|
479 |
|
|
480 |
|
|
481 |
/////////////////////
|
|
482 |
// Test step 022.08
|
|
483 |
/////////////////////
|
|
484 |
|
|
485 |
// constructor
|
|
486 |
CCommDbTest022_08::CCommDbTest022_08()
|
|
487 |
{
|
|
488 |
// store the name of this test case
|
|
489 |
SetTestStepName(_L("step_022_08"));
|
|
490 |
}
|
|
491 |
|
|
492 |
// destructor
|
|
493 |
CCommDbTest022_08::~CCommDbTest022_08()
|
|
494 |
{
|
|
495 |
}
|
|
496 |
|
|
497 |
|
|
498 |
TVerdict CCommDbTest022_08::doTestStepPreambleL()
|
|
499 |
{
|
|
500 |
openDbL();
|
|
501 |
SetTestStepResult(EPass); return TestStepResult();
|
|
502 |
}
|
|
503 |
|
|
504 |
TInt CCommDbTest022_08::executeStepL()
|
|
505 |
{
|
|
506 |
TInt ret=KErrGeneral;
|
|
507 |
|
|
508 |
//Open a view on the IAP table, then check the records returned
|
|
509 |
iTheView = iTheDb->OpenIAPTableViewMatchingBearerSetLC( KCommDbBearerLAN, ECommDbConnectionDirectionIncoming);
|
|
510 |
CleanupStack::Pop();
|
|
511 |
|
|
512 |
CDBLEAVE( iTheView->GotoFirstRecord(), KErrNone );
|
|
513 |
TBuf<KCommsDbSvrMaxFieldLength> value;
|
|
514 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value );
|
|
515 |
if( !value.Compare(_L("Record #11")) )
|
|
516 |
{
|
|
517 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNone );
|
|
518 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value);
|
|
519 |
if ( !value.Compare(_L("Record #12")) )
|
|
520 |
{
|
|
521 |
//There should be no more records
|
|
522 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNotFound );
|
|
523 |
ret = KErrNone;
|
|
524 |
}
|
|
525 |
}
|
|
526 |
|
|
527 |
return ret;
|
|
528 |
}
|
|
529 |
|
|
530 |
|
|
531 |
TVerdict CCommDbTest022_08::doTestStepL( )
|
|
532 |
{
|
|
533 |
INFO_PRINTF1(_L("Step 022.08 called "));
|
|
534 |
|
|
535 |
|
|
536 |
if ( executeStepL() == KErrNone )
|
|
537 |
SetTestStepResult(EPass); else
|
|
538 |
SetTestStepResult(EFail);
|
|
539 |
return TestStepResult();
|
|
540 |
}
|
|
541 |
|
|
542 |
/////////////////////
|
|
543 |
// Test step 022.09
|
|
544 |
/////////////////////
|
|
545 |
|
|
546 |
// constructor
|
|
547 |
CCommDbTest022_09::CCommDbTest022_09()
|
|
548 |
{
|
|
549 |
// store the name of this test case
|
|
550 |
SetTestStepName(_L("step_022_09"));
|
|
551 |
}
|
|
552 |
|
|
553 |
// destructor
|
|
554 |
CCommDbTest022_09::~CCommDbTest022_09()
|
|
555 |
{
|
|
556 |
}
|
|
557 |
|
|
558 |
|
|
559 |
TVerdict CCommDbTest022_09::doTestStepPreambleL()
|
|
560 |
{
|
|
561 |
openDbL();
|
|
562 |
SetTestStepResult(EPass); return TestStepResult();
|
|
563 |
}
|
|
564 |
|
|
565 |
TInt CCommDbTest022_09::executeStepL()
|
|
566 |
{
|
|
567 |
TInt ret=KErrGeneral;
|
|
568 |
|
|
569 |
//Open a view on the IAP table, then check the records returned
|
|
570 |
iTheView = iTheDb->OpenIAPTableViewMatchingBearerSetLC( KCommDbBearerLAN, ECommDbConnectionDirectionOutgoing);
|
|
571 |
CleanupStack::Pop();
|
|
572 |
|
|
573 |
CDBLEAVE( iTheView->GotoFirstRecord(), KErrNone );
|
|
574 |
TBuf<KCommsDbSvrMaxFieldLength> value;
|
|
575 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value );
|
|
576 |
if( !value.Compare(_L("Record #11")) )
|
|
577 |
{
|
|
578 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNone );
|
|
579 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value);
|
|
580 |
if ( !value.Compare(_L("Record #12")) )
|
|
581 |
{
|
|
582 |
//There should be no more records
|
|
583 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNotFound );
|
|
584 |
ret = KErrNone;
|
|
585 |
}
|
|
586 |
}
|
|
587 |
|
|
588 |
return ret;
|
|
589 |
}
|
|
590 |
|
|
591 |
|
|
592 |
TVerdict CCommDbTest022_09::doTestStepL( )
|
|
593 |
{
|
|
594 |
INFO_PRINTF1(_L("Step 022.09 called "));
|
|
595 |
|
|
596 |
|
|
597 |
if ( executeStepL() == KErrNone )
|
|
598 |
SetTestStepResult(EPass); else
|
|
599 |
SetTestStepResult(EFail);
|
|
600 |
return TestStepResult();
|
|
601 |
}
|
|
602 |
|
|
603 |
|
|
604 |
|
|
605 |
/////////////////////
|
|
606 |
// Test step 022.10
|
|
607 |
/////////////////////
|
|
608 |
|
|
609 |
// constructor
|
|
610 |
CCommDbTest022_10::CCommDbTest022_10()
|
|
611 |
{
|
|
612 |
// store the name of this test case
|
|
613 |
SetTestStepName(_L("step_022_10"));
|
|
614 |
}
|
|
615 |
|
|
616 |
// destructor
|
|
617 |
CCommDbTest022_10::~CCommDbTest022_10()
|
|
618 |
{
|
|
619 |
}
|
|
620 |
|
|
621 |
|
|
622 |
TVerdict CCommDbTest022_10::doTestStepPreambleL()
|
|
623 |
{
|
|
624 |
openDbL();
|
|
625 |
SetTestStepResult(EPass); return TestStepResult();
|
|
626 |
}
|
|
627 |
|
|
628 |
TInt CCommDbTest022_10::executeStepL()
|
|
629 |
{
|
|
630 |
TInt ret=KErrNone;
|
|
631 |
|
|
632 |
//Open a view with multiple bearers on the IAP table, then check the records returned
|
|
633 |
iTheView = iTheDb->OpenIAPTableViewMatchingBearerSetLC( KCommDbBearerCSD | KCommDbBearerLAN, ECommDbConnectionDirectionOutgoing);
|
|
634 |
CleanupStack::Pop();
|
|
635 |
|
|
636 |
CDBLEAVE( iTheView->GotoFirstRecord(), KErrNone );
|
|
637 |
TBuf<KCommsDbSvrMaxFieldLength> value;
|
|
638 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value );
|
|
639 |
if( value.Compare(_L("Record #1")) && ret == KErrNone)
|
|
640 |
{
|
|
641 |
ret = KErrGeneral;
|
|
642 |
}
|
|
643 |
else
|
|
644 |
{
|
|
645 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNone );
|
|
646 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value);
|
|
647 |
}
|
|
648 |
|
|
649 |
if ( value.Compare(_L("Record #2")) && ret == KErrNone )
|
|
650 |
{
|
|
651 |
ret = KErrGeneral;
|
|
652 |
}
|
|
653 |
else
|
|
654 |
{
|
|
655 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNone );
|
|
656 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value);
|
|
657 |
}
|
|
658 |
|
|
659 |
if ( value.Compare(_L("Record #11")) && ret == KErrNone )
|
|
660 |
{
|
|
661 |
ret = KErrGeneral;
|
|
662 |
}
|
|
663 |
else
|
|
664 |
{
|
|
665 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNone );
|
|
666 |
iTheView->ReadTextL( TPtrC(COMMDB_NAME), value);
|
|
667 |
}
|
|
668 |
|
|
669 |
if ( value.Compare(_L("Record #12")) && ret == KErrNone )
|
|
670 |
{
|
|
671 |
ret = KErrGeneral;
|
|
672 |
}
|
|
673 |
else
|
|
674 |
{
|
|
675 |
CDBLEAVE( iTheView->GotoNextRecord(), KErrNotFound );
|
|
676 |
}
|
|
677 |
|
|
678 |
|
|
679 |
return ret;
|
|
680 |
}
|
|
681 |
|
|
682 |
|
|
683 |
TVerdict CCommDbTest022_10::doTestStepL( )
|
|
684 |
{
|
|
685 |
INFO_PRINTF1(_L("Step 022.10 called "));
|
|
686 |
|
|
687 |
|
|
688 |
if ( executeStepL() == KErrNone )
|
|
689 |
SetTestStepResult(EPass); else
|
|
690 |
SetTestStepResult(EFail);
|
|
691 |
return TestStepResult();
|
|
692 |
}
|
|
693 |
|
|
694 |
|
|
695 |
/////////////////////
|
|
696 |
// Test step 022.11
|
|
697 |
/////////////////////
|
|
698 |
|
|
699 |
// constructor
|
|
700 |
CCommDbTest022_11::CCommDbTest022_11()
|
|
701 |
{
|
|
702 |
// store the name of this test case
|
|
703 |
SetTestStepName(_L("step_022_11"));
|
|
704 |
}
|
|
705 |
|
|
706 |
// destructor
|
|
707 |
CCommDbTest022_11::~CCommDbTest022_11()
|
|
708 |
{
|
|
709 |
}
|
|
710 |
|
|
711 |
|
|
712 |
TVerdict CCommDbTest022_11::doTestStepPreambleL()
|
|
713 |
{
|
|
714 |
openDbL();
|
|
715 |
SetTestStepResult(EPass); return TestStepResult();
|
|
716 |
}
|
|
717 |
|
|
718 |
|
|
719 |
#define INVALID_BEARER 0x200
|
|
720 |
|
|
721 |
TInt CCommDbTest022_11::executeStepL()
|
|
722 |
{
|
|
723 |
TInt ret=KErrGeneral;
|
|
724 |
|
|
725 |
|
|
726 |
TRAPD( r, iTheView = iTheDb->OpenIAPTableViewMatchingBearerSetLC( INVALID_BEARER , ECommDbConnectionDirectionOutgoing) );
|
|
727 |
if ( r!=KErrNone )
|
|
728 |
{
|
|
729 |
ret = r;
|
|
730 |
}
|
|
731 |
else
|
|
732 |
{
|
|
733 |
//Shouldnt get here, but just in case ....
|
|
734 |
CleanupStack::Pop();
|
|
735 |
}
|
|
736 |
|
|
737 |
return ret;
|
|
738 |
}
|
|
739 |
|
|
740 |
|
|
741 |
TVerdict CCommDbTest022_11::doTestStepL( )
|
|
742 |
{
|
|
743 |
INFO_PRINTF1(_L("Step 022.11 called "));
|
|
744 |
|
|
745 |
|
|
746 |
if ( executeStepL() == KErrArgument )
|
|
747 |
SetTestStepResult(EPass); else
|
|
748 |
SetTestStepResult(EFail);
|
|
749 |
return TestStepResult();
|
|
750 |
}
|
|
751 |
|
|
752 |
|
|
753 |
|
|
754 |
|
|
755 |
/////////////////////
|
|
756 |
// Test step 022.12
|
|
757 |
/////////////////////
|
|
758 |
|
|
759 |
// constructor
|
|
760 |
CCommDbTest022_12::CCommDbTest022_12()
|
|
761 |
{
|
|
762 |
// store the name of this test case
|
|
763 |
SetTestStepName(_L("step_022_12"));
|
|
764 |
}
|
|
765 |
|
|
766 |
// destructor
|
|
767 |
CCommDbTest022_12::~CCommDbTest022_12()
|
|
768 |
{
|
|
769 |
}
|
|
770 |
|
|
771 |
|
|
772 |
TVerdict CCommDbTest022_12::doTestStepPreambleL()
|
|
773 |
{
|
|
774 |
openDbL();
|
|
775 |
SetTestStepResult(EPass); return TestStepResult();
|
|
776 |
}
|
|
777 |
|
|
778 |
|
|
779 |
#define INVALID_DIRECTION 0xF
|
|
780 |
|
|
781 |
TInt CCommDbTest022_12::executeStepL()
|
|
782 |
{
|
|
783 |
TInt ret=KErrGeneral;
|
|
784 |
|
|
785 |
//Due to the strong type checking in C++, this test step is not particularly valid
|
|
786 |
TRAPD( r, iTheView = iTheDb->OpenIAPTableViewMatchingBearerSetLC( KCommDbBearerCSD , (TCommDbConnectionDirection)INVALID_DIRECTION ) );
|
|
787 |
if ( r!=KErrNone )
|
|
788 |
{
|
|
789 |
ret = r;
|
|
790 |
}
|
|
791 |
else
|
|
792 |
{
|
|
793 |
//Shouldnt get here, but just in case ....
|
|
794 |
CleanupStack::Pop();
|
|
795 |
}
|
|
796 |
|
|
797 |
return ret;
|
|
798 |
}
|
|
799 |
|
|
800 |
|
|
801 |
TVerdict CCommDbTest022_12::doTestStepL( )
|
|
802 |
{
|
|
803 |
INFO_PRINTF1(_L("Step 022.12 called "));
|
|
804 |
|
|
805 |
|
|
806 |
if ( executeStepL() == KErrArgument )
|
|
807 |
SetTestStepResult(EPass); else
|
|
808 |
SetTestStepResult(EFail);
|
|
809 |
return TestStepResult();
|
|
810 |
}
|
|
811 |
|
|
812 |
|
|
813 |
|
|
814 |
/////////////////////
|
|
815 |
// Test step 022.13
|
|
816 |
/////////////////////
|
|
817 |
|
|
818 |
// constructor
|
|
819 |
CCommDbTest022_13::CCommDbTest022_13()
|
|
820 |
{
|
|
821 |
// store the name of this test case
|
|
822 |
SetTestStepName(_L("step_022_13"));
|
|
823 |
}
|
|
824 |
|
|
825 |
// destructor
|
|
826 |
CCommDbTest022_13::~CCommDbTest022_13()
|
|
827 |
{
|
|
828 |
}
|
|
829 |
|
|
830 |
|
|
831 |
TVerdict CCommDbTest022_13::doTestStepPreambleL()
|
|
832 |
{
|
|
833 |
openDbL();
|
|
834 |
SetTestStepResult(EPass); return TestStepResult();
|
|
835 |
}
|
|
836 |
|
|
837 |
|
|
838 |
TInt CCommDbTest022_13::executeStepL()
|
|
839 |
{
|
|
840 |
TInt ret=KErrGeneral;
|
|
841 |
|
|
842 |
//Due to the strong type checking in C++, this test step is not particularly valid
|
|
843 |
TRAPD( r, iTheView = iTheDb->OpenIAPTableViewMatchingBearerSetLC( KCommDbBearerCSD , (TCommDbConnectionDirection)5 ) );
|
|
844 |
if ( r!=KErrNone )
|
|
845 |
{
|
|
846 |
ret = r;
|
|
847 |
}
|
|
848 |
else
|
|
849 |
{
|
|
850 |
//Shouldnt get here, but just in case ....
|
|
851 |
CleanupStack::Pop();
|
|
852 |
}
|
|
853 |
|
|
854 |
return ret;
|
|
855 |
}
|
|
856 |
|
|
857 |
|
|
858 |
TVerdict CCommDbTest022_13::doTestStepL( )
|
|
859 |
{
|
|
860 |
INFO_PRINTF1(_L("Step 022.13 called "));
|
|
861 |
|
|
862 |
|
|
863 |
if ( executeStepL() == KErrArgument )
|
|
864 |
SetTestStepResult(EPass); else
|
|
865 |
SetTestStepResult(EFail);
|
|
866 |
return TestStepResult();
|
|
867 |
}
|
|
868 |
|
|
869 |
|
|
870 |
/////////////////////
|
|
871 |
// Test step 022.14
|
|
872 |
/////////////////////
|
|
873 |
|
|
874 |
// constructor
|
|
875 |
CCommDbTest022_14::CCommDbTest022_14()
|
|
876 |
{
|
|
877 |
// store the name of this test case
|
|
878 |
SetTestStepName(_L("step_022_14"));
|
|
879 |
}
|
|
880 |
|
|
881 |
// destructor
|
|
882 |
CCommDbTest022_14::~CCommDbTest022_14()
|
|
883 |
{
|
|
884 |
}
|
|
885 |
|
|
886 |
|
|
887 |
TVerdict CCommDbTest022_14::doTestStepPreambleL()
|
|
888 |
{
|
|
889 |
openDbL();
|
|
890 |
SetTestStepResult(EPass); return TestStepResult();
|
|
891 |
}
|
|
892 |
|
|
893 |
|
|
894 |
#define INVALID_DIRECTION2 0xffffffff
|
|
895 |
|
|
896 |
TInt CCommDbTest022_14::executeStepL()
|
|
897 |
{
|
|
898 |
TInt ret=KErrGeneral;
|
|
899 |
|
|
900 |
//Due to the strong type checking in C++, this test step is not particularly valid
|
|
901 |
TRAPD( r, iTheView = iTheDb->OpenIAPTableViewMatchingBearerSetLC( KCommDbBearerCSD , (TCommDbConnectionDirection)INVALID_DIRECTION2 ) );
|
|
902 |
if ( r!=KErrNone )
|
|
903 |
{
|
|
904 |
ret = r;
|
|
905 |
}
|
|
906 |
else
|
|
907 |
{
|
|
908 |
//Shouldnt get here, but just in case ....
|
|
909 |
CleanupStack::Pop();
|
|
910 |
}
|
|
911 |
|
|
912 |
return ret;
|
|
913 |
}
|
|
914 |
|
|
915 |
|
|
916 |
TVerdict CCommDbTest022_14::doTestStepL( )
|
|
917 |
{
|
|
918 |
INFO_PRINTF1(_L("Step 022.14 called "));
|
|
919 |
|
|
920 |
|
|
921 |
if ( executeStepL() == KErrArgument )
|
|
922 |
SetTestStepResult(EPass); else
|
|
923 |
SetTestStepResult(EFail);
|
|
924 |
return TestStepResult();
|
|
925 |
}
|
|
926 |
|
|
927 |
|
|
928 |
/////////////////////
|
|
929 |
// Test step 022.15
|
|
930 |
/////////////////////
|
|
931 |
|
|
932 |
// constructor
|
|
933 |
CCommDbTest022_15::CCommDbTest022_15()
|
|
934 |
{
|
|
935 |
// store the name of this test case
|
|
936 |
SetTestStepName(_L("step_022_15"));
|
|
937 |
}
|
|
938 |
|
|
939 |
// destructor
|
|
940 |
CCommDbTest022_15::~CCommDbTest022_15()
|
|
941 |
{
|
|
942 |
}
|
|
943 |
|
|
944 |
|
|
945 |
TVerdict CCommDbTest022_15::doTestStepPreambleL()
|
|
946 |
{
|
|
947 |
openDbL();
|
|
948 |
SetTestStepResult(EPass); return TestStepResult();
|
|
949 |
}
|
|
950 |
|
|
951 |
|
|
952 |
#define UNSUPPORTED_BEARER 0x30
|
|
953 |
|
|
954 |
TInt CCommDbTest022_15::executeStepL()
|
|
955 |
{
|
|
956 |
TInt ret=KErrGeneral;
|
|
957 |
// Similar to test 022_11, but with direction incoming...
|
|
958 |
|
|
959 |
TRAPD( r, iTheView = iTheDb->OpenIAPTableViewMatchingBearerSetLC( UNSUPPORTED_BEARER , ECommDbConnectionDirectionIncoming) );
|
|
960 |
if ( r!=KErrNone )
|
|
961 |
{
|
|
962 |
ret = r;
|
|
963 |
}
|
|
964 |
else
|
|
965 |
{
|
|
966 |
//Shouldnt get here, but just in case ....
|
|
967 |
CleanupStack::Pop();
|
|
968 |
}
|
|
969 |
|
|
970 |
return ret;
|
|
971 |
}
|
|
972 |
|
|
973 |
|
|
974 |
TVerdict CCommDbTest022_15::doTestStepL( )
|
|
975 |
{
|
|
976 |
INFO_PRINTF1(_L("Step 022.15 called "));
|
|
977 |
|
|
978 |
|
|
979 |
if ( executeStepL() == KErrArgument )
|
|
980 |
SetTestStepResult(EPass); else
|
|
981 |
SetTestStepResult(EFail);
|
|
982 |
return TestStepResult();
|
|
983 |
}
|
|
984 |
|
|
985 |
|
|
986 |
/////////////////////
|
|
987 |
// Test step 022.16
|
|
988 |
/////////////////////
|
|
989 |
|
|
990 |
// constructor
|
|
991 |
CCommDbTest022_16::CCommDbTest022_16()
|
|
992 |
{
|
|
993 |
// store the name of this test case
|
|
994 |
SetTestStepName(_L("step_022_16"));
|
|
995 |
}
|
|
996 |
|
|
997 |
// destructor
|
|
998 |
CCommDbTest022_16::~CCommDbTest022_16()
|
|
999 |
{
|
|
1000 |
}
|
|
1001 |
|
|
1002 |
TVerdict CCommDbTest022_16::doTestStepL( )
|
|
1003 |
{
|
|
1004 |
INFO_PRINTF1(_L("Step 022.16 called "));
|
|
1005 |
|
|
1006 |
SetTestStepResult(EPass);
|
|
1007 |
// Heap test for 022.01
|
|
1008 |
|
|
1009 |
CCommDbTest022_01* step022_01 = new(ELeave) CCommDbTest022_01;
|
|
1010 |
CleanupStack::PushL(step022_01);
|
|
1011 |
if ( doTestStepWithHeapFailureL( *step022_01, KErrNone) == EFail )
|
|
1012 |
SetTestStepResult(EFail); CleanupStack::PopAndDestroy(step022_01);
|
|
1013 |
|
|
1014 |
|
|
1015 |
|
|
1016 |
return TestStepResult();
|
|
1017 |
|
|
1018 |
}
|
|
1019 |
|
|
1020 |
|
|
1021 |
/////////////////////
|
|
1022 |
// Test step 022.17
|
|
1023 |
/////////////////////
|
|
1024 |
|
|
1025 |
// constructor
|
|
1026 |
CCommDbTest022_17::CCommDbTest022_17()
|
|
1027 |
{
|
|
1028 |
// store the name of this test case
|
|
1029 |
SetTestStepName(_L("step_022_17"));
|
|
1030 |
}
|
|
1031 |
|
|
1032 |
// destructor
|
|
1033 |
CCommDbTest022_17::~CCommDbTest022_17()
|
|
1034 |
{
|
|
1035 |
}
|
|
1036 |
|
|
1037 |
TVerdict CCommDbTest022_17::doTestStepL( )
|
|
1038 |
{
|
|
1039 |
INFO_PRINTF1(_L("Step 022.17 called "));
|
|
1040 |
|
|
1041 |
SetTestStepResult(EPass);
|
|
1042 |
// Heap test for 022.02
|
|
1043 |
|
|
1044 |
CCommDbTest022_02* step022_02 = new CCommDbTest022_02;
|
|
1045 |
CleanupStack::PushL(step022_02);
|
|
1046 |
if ( doTestStepWithHeapFailureL( *step022_02, KErrNone) == EFail )
|
|
1047 |
SetTestStepResult(EFail); CleanupStack::PopAndDestroy(step022_02);
|
|
1048 |
|
|
1049 |
return TestStepResult();
|
|
1050 |
|
|
1051 |
}
|
|
1052 |
|
|
1053 |
/////////////////////
|
|
1054 |
// Test step 022.18
|
|
1055 |
/////////////////////
|
|
1056 |
|
|
1057 |
// constructor
|
|
1058 |
CCommDbTest022_18::CCommDbTest022_18()
|
|
1059 |
{
|
|
1060 |
// store the name of this test case
|
|
1061 |
SetTestStepName(_L("step_022_18"));
|
|
1062 |
}
|
|
1063 |
|
|
1064 |
// destructor
|
|
1065 |
CCommDbTest022_18::~CCommDbTest022_18()
|
|
1066 |
{
|
|
1067 |
}
|
|
1068 |
|
|
1069 |
TVerdict CCommDbTest022_18::doTestStepL( )
|
|
1070 |
{
|
|
1071 |
INFO_PRINTF1(_L("Step 022.18 called "));
|
|
1072 |
|
|
1073 |
SetTestStepResult(EPass);
|
|
1074 |
// Heap test for 022.03
|
|
1075 |
|
|
1076 |
CCommDbTest022_03* step022_03 = new CCommDbTest022_03;
|
|
1077 |
CleanupStack::PushL(step022_03);
|
|
1078 |
if ( doTestStepWithHeapFailureL( *step022_03, KErrNone) == EFail )
|
|
1079 |
SetTestStepResult(EFail); CleanupStack::PopAndDestroy(step022_03);
|
|
1080 |
|
|
1081 |
return TestStepResult();
|
|
1082 |
|
|
1083 |
}
|
|
1084 |
|
|
1085 |
/////////////////////
|
|
1086 |
// Test step 022.19
|
|
1087 |
/////////////////////
|
|
1088 |
|
|
1089 |
// constructor
|
|
1090 |
CCommDbTest022_19::CCommDbTest022_19()
|
|
1091 |
{
|
|
1092 |
// store the name of this test case
|
|
1093 |
SetTestStepName(_L("step_022_19"));
|
|
1094 |
}
|
|
1095 |
|
|
1096 |
// destructor
|
|
1097 |
CCommDbTest022_19::~CCommDbTest022_19()
|
|
1098 |
{
|
|
1099 |
}
|
|
1100 |
|
|
1101 |
TVerdict CCommDbTest022_19::doTestStepL( )
|
|
1102 |
{
|
|
1103 |
INFO_PRINTF1(_L("Step 022.19 called "));
|
|
1104 |
|
|
1105 |
SetTestStepResult(EPass);
|
|
1106 |
// Heap test for 022.04
|
|
1107 |
|
|
1108 |
CCommDbTest022_04* step022_04 = new CCommDbTest022_04;
|
|
1109 |
CleanupStack::PushL(step022_04);
|
|
1110 |
if ( doTestStepWithHeapFailureL( *step022_04, KErrNone) == EFail )
|
|
1111 |
SetTestStepResult(EFail); CleanupStack::PopAndDestroy(step022_04);
|
|
1112 |
|
|
1113 |
return TestStepResult();
|
|
1114 |
|
|
1115 |
}
|
|
1116 |
|
|
1117 |
/////////////////////
|
|
1118 |
// Test step 022.20
|
|
1119 |
/////////////////////
|
|
1120 |
|
|
1121 |
// constructor
|
|
1122 |
CCommDbTest022_20::CCommDbTest022_20()
|
|
1123 |
{
|
|
1124 |
// store the name of this test case
|
|
1125 |
SetTestStepName(_L("step_022_20"));
|
|
1126 |
}
|
|
1127 |
|
|
1128 |
// destructor
|
|
1129 |
CCommDbTest022_20::~CCommDbTest022_20()
|
|
1130 |
{
|
|
1131 |
}
|
|
1132 |
|
|
1133 |
TVerdict CCommDbTest022_20::doTestStepL( )
|
|
1134 |
{
|
|
1135 |
INFO_PRINTF1(_L("Step 022.20 called "));
|
|
1136 |
|
|
1137 |
SetTestStepResult(EPass);
|
|
1138 |
// Heap test for 022.05
|
|
1139 |
|
|
1140 |
CCommDbTest022_05* step022_05 = new CCommDbTest022_05;
|
|
1141 |
CleanupStack::PushL(step022_05);
|
|
1142 |
if ( doTestStepWithHeapFailureL( *step022_05, KErrNone) == EFail )
|
|
1143 |
SetTestStepResult(EFail); CleanupStack::PopAndDestroy(step022_05);
|
|
1144 |
|
|
1145 |
return TestStepResult();
|
|
1146 |
|
|
1147 |
}
|
|
1148 |
|
|
1149 |
/////////////////////
|
|
1150 |
// Test step 022.21
|
|
1151 |
/////////////////////
|
|
1152 |
|
|
1153 |
// constructor
|
|
1154 |
CCommDbTest022_21::CCommDbTest022_21()
|
|
1155 |
{
|
|
1156 |
// store the name of this test case
|
|
1157 |
SetTestStepName(_L("step_022_21"));
|
|
1158 |
}
|
|
1159 |
|
|
1160 |
// destructor
|
|
1161 |
CCommDbTest022_21::~CCommDbTest022_21()
|
|
1162 |
{
|
|
1163 |
}
|
|
1164 |
|
|
1165 |
TVerdict CCommDbTest022_21::doTestStepL( )
|
|
1166 |
{
|
|
1167 |
INFO_PRINTF1(_L("Step 022.21 called "));
|
|
1168 |
|
|
1169 |
SetTestStepResult(EPass);
|
|
1170 |
// Heap test for 022.06
|
|
1171 |
|
|
1172 |
CCommDbTest022_06* step022_06 = new CCommDbTest022_06;
|
|
1173 |
CleanupStack::PushL(step022_06);
|
|
1174 |
if ( doTestStepWithHeapFailureL( *step022_06, KErrNone) == EFail )
|
|
1175 |
SetTestStepResult(EFail); CleanupStack::PopAndDestroy(step022_06);
|
|
1176 |
|
|
1177 |
return TestStepResult();
|
|
1178 |
|
|
1179 |
}
|
|
1180 |
|
|
1181 |
/////////////////////
|
|
1182 |
// Test step 022.22
|
|
1183 |
/////////////////////
|
|
1184 |
|
|
1185 |
// constructor
|
|
1186 |
CCommDbTest022_22::CCommDbTest022_22()
|
|
1187 |
{
|
|
1188 |
// store the name of this test case
|
|
1189 |
SetTestStepName(_L("step_022_22"));
|
|
1190 |
}
|
|
1191 |
|
|
1192 |
// destructor
|
|
1193 |
CCommDbTest022_22::~CCommDbTest022_22()
|
|
1194 |
{
|
|
1195 |
}
|
|
1196 |
|
|
1197 |
TVerdict CCommDbTest022_22::doTestStepL( )
|
|
1198 |
{
|
|
1199 |
INFO_PRINTF1(_L("Step 022.22 called "));
|
|
1200 |
|
|
1201 |
SetTestStepResult(EPass);
|
|
1202 |
// Heap test for 022.07
|
|
1203 |
|
|
1204 |
CCommDbTest022_07* step022_07 = new CCommDbTest022_07;
|
|
1205 |
CleanupStack::PushL(step022_07);
|
|
1206 |
if ( doTestStepWithHeapFailureL( *step022_07, KErrNone) == EFail )
|
|
1207 |
SetTestStepResult(EFail); CleanupStack::PopAndDestroy(step022_07);
|
|
1208 |
|
|
1209 |
return TestStepResult();
|
|
1210 |
|
|
1211 |
}
|
|
1212 |
|
|
1213 |
/////////////////////
|
|
1214 |
// Test step 022.23
|
|
1215 |
/////////////////////
|
|
1216 |
|
|
1217 |
// constructor
|
|
1218 |
CCommDbTest022_23::CCommDbTest022_23()
|
|
1219 |
{
|
|
1220 |
// store the name of this test case
|
|
1221 |
SetTestStepName(_L("step_022_23"));
|
|
1222 |
}
|
|
1223 |
|
|
1224 |
// destructor
|
|
1225 |
CCommDbTest022_23::~CCommDbTest022_23()
|
|
1226 |
{
|
|
1227 |
}
|
|
1228 |
|
|
1229 |
TVerdict CCommDbTest022_23::doTestStepL( )
|
|
1230 |
{
|
|
1231 |
INFO_PRINTF1(_L("Step 022.23 called "));
|
|
1232 |
|
|
1233 |
SetTestStepResult(EPass);
|
|
1234 |
// Heap test for 022.08
|
|
1235 |
|
|
1236 |
CCommDbTest022_08* step022_08 = new CCommDbTest022_08;
|
|
1237 |
CleanupStack::PushL(step022_08);
|
|
1238 |
if ( doTestStepWithHeapFailureL( *step022_08, KErrNone) == EFail )
|
|
1239 |
SetTestStepResult(EFail); CleanupStack::PopAndDestroy(step022_08);
|
|
1240 |
|
|
1241 |
return TestStepResult();
|
|
1242 |
|
|
1243 |
}
|
|
1244 |
|
|
1245 |
/////////////////////
|
|
1246 |
// Test step 022.24
|
|
1247 |
/////////////////////
|
|
1248 |
|
|
1249 |
// constructor
|
|
1250 |
CCommDbTest022_24::CCommDbTest022_24()
|
|
1251 |
{
|
|
1252 |
// store the name of this test case
|
|
1253 |
SetTestStepName(_L("step_022_24"));
|
|
1254 |
}
|
|
1255 |
|
|
1256 |
// destructor
|
|
1257 |
CCommDbTest022_24::~CCommDbTest022_24()
|
|
1258 |
{
|
|
1259 |
}
|
|
1260 |
|
|
1261 |
TVerdict CCommDbTest022_24::doTestStepL( )
|
|
1262 |
{
|
|
1263 |
INFO_PRINTF1(_L("Step 022.24 called "));
|
|
1264 |
|
|
1265 |
SetTestStepResult(EPass);
|
|
1266 |
// Heap test for 022.09
|
|
1267 |
|
|
1268 |
CCommDbTest022_09* step022_09 = new CCommDbTest022_09;
|
|
1269 |
CleanupStack::PushL(step022_09);
|
|
1270 |
if ( doTestStepWithHeapFailureL( *step022_09, KErrNone) == EFail )
|
|
1271 |
SetTestStepResult(EFail); CleanupStack::PopAndDestroy(step022_09);
|
|
1272 |
|
|
1273 |
return TestStepResult();
|
|
1274 |
|
|
1275 |
}
|
|
1276 |
|
|
1277 |
/////////////////////
|
|
1278 |
// Test step 022.25
|
|
1279 |
/////////////////////
|
|
1280 |
|
|
1281 |
// constructor
|
|
1282 |
CCommDbTest022_25::CCommDbTest022_25()
|
|
1283 |
{
|
|
1284 |
// store the name of this test case
|
|
1285 |
SetTestStepName(_L("step_022_25"));
|
|
1286 |
}
|
|
1287 |
|
|
1288 |
// destructor
|
|
1289 |
CCommDbTest022_25::~CCommDbTest022_25()
|
|
1290 |
{
|
|
1291 |
}
|
|
1292 |
|
|
1293 |
TVerdict CCommDbTest022_25::doTestStepL( )
|
|
1294 |
{
|
|
1295 |
INFO_PRINTF1(_L("Step 022.25 called "));
|
|
1296 |
|
|
1297 |
SetTestStepResult(EPass);
|
|
1298 |
// Heap test for 022.10
|
|
1299 |
|
|
1300 |
CCommDbTest022_10* step022_10 = new CCommDbTest022_10;
|
|
1301 |
CleanupStack::PushL(step022_10);
|
|
1302 |
if ( doTestStepWithHeapFailureL( *step022_10, KErrNone) == EFail )
|
|
1303 |
SetTestStepResult(EFail); CleanupStack::PopAndDestroy(step022_10);
|
|
1304 |
|
|
1305 |
return TestStepResult();
|
|
1306 |
|
|
1307 |
}
|
|
1308 |
|
|
1309 |
/////////////////////
|
|
1310 |
// Test step 022.26
|
|
1311 |
/////////////////////
|
|
1312 |
|
|
1313 |
// constructor
|
|
1314 |
CCommDbTest022_26::CCommDbTest022_26()
|
|
1315 |
{
|
|
1316 |
// store the name of this test case
|
|
1317 |
SetTestStepName(_L("step_022_26"));
|
|
1318 |
}
|
|
1319 |
|
|
1320 |
// destructor
|
|
1321 |
CCommDbTest022_26::~CCommDbTest022_26()
|
|
1322 |
{
|
|
1323 |
}
|
|
1324 |
|
|
1325 |
TVerdict CCommDbTest022_26::doTestStepL( )
|
|
1326 |
{
|
|
1327 |
INFO_PRINTF1(_L("Step 022.26 called "));
|
|
1328 |
|
|
1329 |
SetTestStepResult(EPass);
|
|
1330 |
// Heap test for 022.11
|
|
1331 |
|
|
1332 |
CCommDbTest022_11* step022_11 = new CCommDbTest022_11;
|
|
1333 |
CleanupStack::PushL(step022_11);
|
|
1334 |
if ( doTestStepWithHeapFailureL( *step022_11, KErrArgument) == EFail )
|
|
1335 |
SetTestStepResult(EFail); CleanupStack::PopAndDestroy(step022_11);
|
|
1336 |
|
|
1337 |
return TestStepResult();
|
|
1338 |
|
|
1339 |
}
|
|
1340 |
|
|
1341 |
/////////////////////
|
|
1342 |
// Test step 022.27
|
|
1343 |
/////////////////////
|
|
1344 |
|
|
1345 |
// constructor
|
|
1346 |
CCommDbTest022_27::CCommDbTest022_27()
|
|
1347 |
{
|
|
1348 |
// store the name of this test case
|
|
1349 |
SetTestStepName(_L("step_022_27"));
|
|
1350 |
}
|
|
1351 |
|
|
1352 |
// destructor
|
|
1353 |
CCommDbTest022_27::~CCommDbTest022_27()
|
|
1354 |
{
|
|
1355 |
}
|
|
1356 |
|
|
1357 |
TVerdict CCommDbTest022_27::doTestStepL( )
|
|
1358 |
{
|
|
1359 |
INFO_PRINTF1(_L("Step 022.27 called "));
|
|
1360 |
|
|
1361 |
SetTestStepResult(EPass);
|
|
1362 |
// Heap test for 022.12
|
|
1363 |
|
|
1364 |
CCommDbTest022_12* step022_12 = new CCommDbTest022_12;
|
|
1365 |
CleanupStack::PushL(step022_12);
|
|
1366 |
if ( doTestStepWithHeapFailureL( *step022_12, KErrArgument) == EFail )
|
|
1367 |
SetTestStepResult(EFail); CleanupStack::PopAndDestroy(step022_12);
|
|
1368 |
|
|
1369 |
return TestStepResult();
|
|
1370 |
|
|
1371 |
}
|
|
1372 |
|
|
1373 |
/////////////////////
|
|
1374 |
// Test step 022.28
|
|
1375 |
/////////////////////
|
|
1376 |
|
|
1377 |
// constructor
|
|
1378 |
CCommDbTest022_28::CCommDbTest022_28()
|
|
1379 |
{
|
|
1380 |
// store the name of this test case
|
|
1381 |
SetTestStepName(_L("step_022_28"));
|
|
1382 |
}
|
|
1383 |
|
|
1384 |
// destructor
|
|
1385 |
CCommDbTest022_28::~CCommDbTest022_28()
|
|
1386 |
{
|
|
1387 |
}
|
|
1388 |
|
|
1389 |
TVerdict CCommDbTest022_28::doTestStepL( )
|
|
1390 |
{
|
|
1391 |
INFO_PRINTF1(_L("Step 022.28 called "));
|
|
1392 |
|
|
1393 |
SetTestStepResult(EPass);
|
|
1394 |
// Heap test for 022.13
|
|
1395 |
|
|
1396 |
CCommDbTest022_13* step022_13 = new CCommDbTest022_13;
|
|
1397 |
CleanupStack::PushL(step022_13);
|
|
1398 |
if ( doTestStepWithHeapFailureL( *step022_13, KErrArgument) == EFail )
|
|
1399 |
SetTestStepResult(EFail); CleanupStack::PopAndDestroy(step022_13);
|
|
1400 |
|
|
1401 |
return TestStepResult();
|
|
1402 |
|
|
1403 |
}
|
|
1404 |
|
|
1405 |
/////////////////////
|
|
1406 |
// Test step 022.29
|
|
1407 |
/////////////////////
|
|
1408 |
|
|
1409 |
// constructor
|
|
1410 |
CCommDbTest022_29::CCommDbTest022_29()
|
|
1411 |
{
|
|
1412 |
// store the name of this test case
|
|
1413 |
SetTestStepName(_L("step_022_29"));
|
|
1414 |
}
|
|
1415 |
|
|
1416 |
// destructor
|
|
1417 |
CCommDbTest022_29::~CCommDbTest022_29()
|
|
1418 |
{
|
|
1419 |
}
|
|
1420 |
|
|
1421 |
TVerdict CCommDbTest022_29::doTestStepL( )
|
|
1422 |
{
|
|
1423 |
INFO_PRINTF1(_L("Step 022.29 called "));
|
|
1424 |
|
|
1425 |
SetTestStepResult(EPass);
|
|
1426 |
// Heap test for 022.14
|
|
1427 |
|
|
1428 |
CCommDbTest022_14* step022_14 = new CCommDbTest022_14;
|
|
1429 |
CleanupStack::PushL(step022_14);
|
|
1430 |
if ( doTestStepWithHeapFailureL( *step022_14, KErrArgument) == EFail )
|
|
1431 |
SetTestStepResult(EFail); CleanupStack::PopAndDestroy(step022_14);
|
|
1432 |
|
|
1433 |
return TestStepResult();
|
|
1434 |
|
|
1435 |
}
|
|
1436 |
|
|
1437 |
|
|
1438 |
/////////////////////
|
|
1439 |
// Test step 022.30
|
|
1440 |
/////////////////////
|
|
1441 |
|
|
1442 |
// constructor
|
|
1443 |
CCommDbTest022_30::CCommDbTest022_30()
|
|
1444 |
{
|
|
1445 |
// store the name of this test case
|
|
1446 |
SetTestStepName(_L("step_022_30"));
|
|
1447 |
}
|
|
1448 |
|
|
1449 |
// destructor
|
|
1450 |
CCommDbTest022_30::~CCommDbTest022_30()
|
|
1451 |
{
|
|
1452 |
}
|
|
1453 |
|
|
1454 |
TInt CCommDbTest022_30::executeStepL()
|
|
1455 |
{
|
|
1456 |
TInt ret = KErrGeneral;
|
|
1457 |
|
|
1458 |
CCommsDatabase* db = CCommsDatabase::NewL();
|
|
1459 |
CleanupStack::PushL(db);
|
|
1460 |
|
|
1461 |
CCommsDbTableView* view1 = db->OpenTableLC( TPtrC(IAP) );
|
|
1462 |
TUint32 a = 0;
|
|
1463 |
User::LeaveIfError(view1->InsertRecord(a));
|
|
1464 |
// expected commdb currently only has 1 IAP, hence 2 here
|
|
1465 |
if (a != 2)
|
|
1466 |
{
|
|
1467 |
User::Leave(KErrGeneral);
|
|
1468 |
}
|
|
1469 |
CleanupStack::Pop(view1);
|
|
1470 |
|
|
1471 |
CCommsDbTableView* view2 = db->OpenIAPTableViewMatchingBearerSetLC(KCommDbBearerWcdma, ECommDbConnectionDirectionOutgoing);
|
|
1472 |
a = 0;
|
|
1473 |
User::LeaveIfError(view2->InsertRecord(a));
|
|
1474 |
if (a != 3)
|
|
1475 |
{
|
|
1476 |
User::Leave(KErrGeneral);
|
|
1477 |
}
|
|
1478 |
CleanupStack::Pop(view2);
|
|
1479 |
|
|
1480 |
CleanupStack::Pop(db);
|
|
1481 |
|
|
1482 |
ret = KErrNone;
|
|
1483 |
return ret;
|
|
1484 |
}
|
|
1485 |
|
|
1486 |
|
|
1487 |
TVerdict CCommDbTest022_30::doTestStepL( )
|
|
1488 |
{
|
|
1489 |
INFO_PRINTF1(_L("Step 022.30 called "));
|
|
1490 |
|
|
1491 |
|
|
1492 |
if ( executeStepL() == KErrNone )
|
|
1493 |
SetTestStepResult(EPass); else
|
|
1494 |
SetTestStepResult(EFail);
|
|
1495 |
return TestStepResult();
|
|
1496 |
}
|
|
1497 |
|
|
1498 |
//EOF
|