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 027.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_027_xx.h" |
|
29 |
|
30 |
|
31 CCommDbTest027_01::CCommDbTest027_01() |
|
32 { |
|
33 // store the name of this test case |
|
34 iTestStepName = _L("step_027_01"); |
|
35 } |
|
36 |
|
37 CCommDbTest027_01::~CCommDbTest027_01() |
|
38 {} |
|
39 |
|
40 TVerdict CCommDbTest027_01::doTestStepL( void ) |
|
41 { |
|
42 executeStepL(); |
|
43 return EPass; |
|
44 } |
|
45 |
|
46 TVerdict CCommDbTest027_01::doTestStepPreambleL() |
|
47 { |
|
48 iTheDb=CCommsDatabase::NewL(); |
|
49 |
|
50 iPrefView = iTheDb->OpenConnectionPrefTableLC(); |
|
51 CleanupStack::Pop(); |
|
52 |
|
53 return EPass; |
|
54 } |
|
55 |
|
56 TInt CCommDbTest027_01::executeStepL() |
|
57 { |
|
58 CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref; |
|
59 User::LeaveIfError(iPrefView->GotoFirstRecord()); |
|
60 iPrefView->ReadConnectionPreferenceL(pref); |
|
61 return KErrNone; |
|
62 } |
|
63 |
|
64 TVerdict CCommDbTest027_01::doTestStepPostambleL() |
|
65 { |
|
66 delete iPrefView; |
|
67 iPrefView = NULL; |
|
68 delete iTheDb; |
|
69 iTheDb=NULL; |
|
70 return EPass; |
|
71 } |
|
72 |
|
73 // |
|
74 |
|
75 CCommDbTest027_02::CCommDbTest027_02() |
|
76 { |
|
77 // store the name of this test case |
|
78 iTestStepName = _L("step_027_02"); |
|
79 } |
|
80 |
|
81 CCommDbTest027_02::~CCommDbTest027_02() |
|
82 {} |
|
83 |
|
84 TVerdict CCommDbTest027_02::doTestStepL( void ) |
|
85 { |
|
86 Log(_L("Step 027.02 called ")); |
|
87 |
|
88 iTestStepResult = EPass; |
|
89 |
|
90 CCommDbTest027_01* step027_01 = new(ELeave) CCommDbTest027_01; |
|
91 CleanupStack::PushL(step027_01); |
|
92 step027_01->iSuite = iSuite; |
|
93 doTestStepWithHeapFailureL( *step027_01, KErrNone); |
|
94 CleanupStack::PopAndDestroy(step027_01); |
|
95 |
|
96 return iTestStepResult; |
|
97 } |
|
98 |
|