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 042.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_042_xx.h" |
|
29 |
|
30 |
|
31 CCommDbTest042_01::CCommDbTest042_01() |
|
32 { |
|
33 // store the name of this test case |
|
34 iTestStepName = _L("step_042_01"); |
|
35 } |
|
36 |
|
37 CCommDbTest042_01::~CCommDbTest042_01() |
|
38 {} |
|
39 |
|
40 TVerdict CCommDbTest042_01::doTestStepL( void ) |
|
41 { |
|
42 if(executeStepL()!=KErrNone) |
|
43 return EFail; |
|
44 return EPass; |
|
45 } |
|
46 |
|
47 TVerdict CCommDbTest042_01::doTestStepPreambleL() |
|
48 { |
|
49 return EPass; |
|
50 } |
|
51 |
|
52 TInt CCommDbTest042_01::executeStepL() |
|
53 { |
|
54 TInt err(KErrNone); |
|
55 |
|
56 CCommDbOverrideSettings* overSet1=CCommDbOverrideSettings::NewL(CCommDbOverrideSettings::EParamListPartial); |
|
57 CleanupStack::PushL(overSet1); |
|
58 TUint32 temp1 = 5000; |
|
59 User::LeaveIfError(overSet1->SetIntOverride(TPtrC(DIAL_OUT_ISP), TPtrC(ISP_IWF_TO_MS), temp1)); |
|
60 |
|
61 CCommDbOverrideSettings* overSet2=CCommDbOverrideSettings::NewL(CCommDbOverrideSettings::EParamListPartial); |
|
62 CleanupStack::PushL(overSet2); |
|
63 TUint32 temp2=5000; |
|
64 User::LeaveIfError(overSet2->SetIntOverride(TPtrC(DIAL_OUT_ISP), TPtrC(ISP_IF_AUTH_RETRIES), temp2)); |
|
65 |
|
66 if(overSet1->Compare(overSet2)) |
|
67 err = KErrGeneral; |
|
68 |
|
69 CleanupStack::PopAndDestroy(overSet2); |
|
70 CleanupStack::PopAndDestroy(overSet1); |
|
71 |
|
72 return err; |
|
73 } |
|
74 |
|
75 TVerdict CCommDbTest042_01::doTestStepPostambleL() |
|
76 { |
|
77 return EPass; |
|
78 } |
|
79 |
|
80 // |
|
81 |
|
82 CCommDbTest042_02::CCommDbTest042_02() |
|
83 { |
|
84 // store the name of this test case |
|
85 iTestStepName = _L("step_042_02"); |
|
86 } |
|
87 |
|
88 CCommDbTest042_02::~CCommDbTest042_02() |
|
89 {} |
|
90 |
|
91 TVerdict CCommDbTest042_02::doTestStepL( void ) |
|
92 { |
|
93 if(executeStepL()!=KErrNone) |
|
94 return EFail; |
|
95 return EPass; |
|
96 } |
|
97 |
|
98 TVerdict CCommDbTest042_02::doTestStepPreambleL() |
|
99 { |
|
100 return EPass; |
|
101 } |
|
102 |
|
103 TInt CCommDbTest042_02::executeStepL() |
|
104 { |
|
105 TInt err(KErrNone); |
|
106 |
|
107 CCommDbOverrideSettings* overSet1=CCommDbOverrideSettings::NewL(CCommDbOverrideSettings::EParamListPartial); |
|
108 CleanupStack::PushL(overSet1); |
|
109 TUint32 temp1 = 5000; |
|
110 User::LeaveIfError(overSet1->SetIntOverride(TPtrC(DIAL_OUT_ISP), TPtrC(ISP_IWF_TO_MS), temp1)); |
|
111 |
|
112 CCommDbOverrideSettings* overSet2=CCommDbOverrideSettings::NewL(CCommDbOverrideSettings::EParamListPartial); |
|
113 CleanupStack::PushL(overSet2); |
|
114 TUint32 temp2=5000; |
|
115 User::LeaveIfError(overSet2->SetIntOverride(TPtrC(DIAL_OUT_ISP), TPtrC(ISP_IWF_TO_MS), temp2)); |
|
116 |
|
117 if(!overSet1->Compare(overSet2)) |
|
118 err = KErrGeneral; |
|
119 |
|
120 CleanupStack::PopAndDestroy(overSet2); |
|
121 CleanupStack::PopAndDestroy(overSet1); |
|
122 |
|
123 return err; |
|
124 } |
|
125 |
|
126 TVerdict CCommDbTest042_02::doTestStepPostambleL() |
|
127 { |
|
128 return EPass; |
|
129 } |
|
130 |
|
131 // |
|
132 |
|
133 CCommDbTest042_03::CCommDbTest042_03() |
|
134 { |
|
135 // store the name of this test case |
|
136 iTestStepName = _L("step_042_03"); |
|
137 } |
|
138 |
|
139 CCommDbTest042_03::~CCommDbTest042_03() |
|
140 {} |
|
141 |
|
142 TVerdict CCommDbTest042_03::doTestStepL( void ) |
|
143 { |
|
144 Log(_L("Step 042.03 called ")); |
|
145 |
|
146 iTestStepResult = EPass; |
|
147 |
|
148 CCommDbTest042_01* step042_01 = new(ELeave) CCommDbTest042_01; |
|
149 CleanupStack::PushL(step042_01); |
|
150 step042_01->iSuite = iSuite; |
|
151 doTestStepWithHeapFailureL( *step042_01, KErrNone); |
|
152 CleanupStack::PopAndDestroy(step042_01); |
|
153 |
|
154 CCommDbTest042_02* step042_02 = new(ELeave) CCommDbTest042_02; |
|
155 CleanupStack::PushL(step042_02); |
|
156 step042_02->iSuite = iSuite; |
|
157 doTestStepWithHeapFailureL( *step042_02, KErrNone); |
|
158 CleanupStack::PopAndDestroy(step042_02); |
|
159 |
|
160 return iTestStepResult; |
|
161 } |
|