|
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 PsdAgt TestCase Test 7.1 - 7.11 |
|
15 // |
|
16 // |
|
17 |
|
18 // EPOC includes |
|
19 #include <e32base.h> |
|
20 #include <e32std.h> |
|
21 #include <in_sock.h> |
|
22 |
|
23 // Test system includes |
|
24 #include "networking/log.h" |
|
25 #include "networking/teststep.h" |
|
26 #include "TestStepPsdAgt.h" |
|
27 #include "TestSuitePsdAgt.h" |
|
28 |
|
29 // COMMDB Database Undo |
|
30 #include "DbUndo.h" |
|
31 |
|
32 // RPacketContext |
|
33 #include <etelpckt.h> |
|
34 |
|
35 //Agent Errors |
|
36 #include <agenterrors.h> |
|
37 |
|
38 // EPsdStartingConfiguration |
|
39 #include <psdprog.h> |
|
40 //#include <psdpanic.h> |
|
41 |
|
42 // Class definitions |
|
43 #include "PsdAgtTestNetworkCheck.h" |
|
44 |
|
45 |
|
46 // Test case 7.1 |
|
47 enum TVerdict CPsdAgtTest7_1::doPsdAgtTestStepL( void ) |
|
48 { |
|
49 TRealAgtNotify agtNotify; |
|
50 agtNotify.SetTestCase(701); |
|
51 |
|
52 NormalConnectL(); |
|
53 |
|
54 return iTestStepResult; |
|
55 } |
|
56 |
|
57 // Test case 7.2 |
|
58 enum TVerdict CPsdAgtTest7_2::doPsdAgtTestStepL( void ) |
|
59 { |
|
60 TRealAgtNotify agtNotify; |
|
61 agtNotify.SetTestCase(702); |
|
62 |
|
63 ConnectExpectErrorL(KErrGeneral, EPsdStartingConfiguration); |
|
64 |
|
65 return iTestStepResult; |
|
66 } |
|
67 |
|
68 // Test case 7.3 |
|
69 enum TVerdict CPsdAgtTest7_3::doPsdAgtTestStepL( void ) |
|
70 { |
|
71 TRealAgtNotify agtNotify; |
|
72 agtNotify.SetTestCase(703); |
|
73 |
|
74 NormalConnectL(); |
|
75 |
|
76 return iTestStepResult; |
|
77 } |
|
78 |
|
79 // Test case 7.4 |
|
80 enum TVerdict CPsdAgtTest7_4::doPsdAgtTestStepL( void ) |
|
81 { |
|
82 TRealAgtNotify agtNotify; |
|
83 agtNotify.SetTestCase(704); |
|
84 |
|
85 NormalConnectL(); |
|
86 |
|
87 return iTestStepResult; |
|
88 } |
|
89 |
|
90 // Test case 7.5 |
|
91 enum TVerdict CPsdAgtTest7_5::doPsdAgtTestStepL( void ) |
|
92 { |
|
93 TRealAgtNotify agtNotify; |
|
94 agtNotify.SetTestCase(705); |
|
95 |
|
96 NormalConnectL(); |
|
97 |
|
98 return iTestStepResult; |
|
99 } |
|
100 |
|
101 // Test case 7.6 |
|
102 enum TVerdict CPsdAgtTest7_6::doPsdAgtTestStepL( void ) |
|
103 { |
|
104 TRealAgtNotify agtNotify; |
|
105 agtNotify.SetTestCase(706); |
|
106 |
|
107 NormalConnectL(); |
|
108 |
|
109 return iTestStepResult; |
|
110 } |
|
111 |
|
112 // Test case 7.7 |
|
113 enum TVerdict CPsdAgtTest7_7::doPsdAgtTestStepL( void ) |
|
114 { |
|
115 TRealAgtNotify agtNotify; |
|
116 agtNotify.SetTestCase(707); |
|
117 |
|
118 ConnectExpectErrorL(KErrAgentNoGPRSNetwork, EPsdStartingConfiguration); |
|
119 |
|
120 return iTestStepResult; |
|
121 } |
|
122 |
|
123 // Test case 7.8 |
|
124 enum TVerdict CPsdAgtTest7_8::doPsdAgtTestStepL( void ) |
|
125 { |
|
126 TRealAgtNotify agtNotify; |
|
127 agtNotify.SetTestCase(708); |
|
128 |
|
129 ConnectExpectErrorL(KErrAgentNoGPRSNetwork, EPsdStartingConfiguration); |
|
130 |
|
131 return iTestStepResult; |
|
132 } |
|
133 |
|
134 // Test case 7.9 |
|
135 enum TVerdict CPsdAgtTest7_9::doPsdAgtTestStepL( void ) |
|
136 { |
|
137 TRealAgtNotify agtNotify; |
|
138 agtNotify.SetTestCase(709); |
|
139 |
|
140 ConnectExpectErrorL(KErrAgentNoGPRSNetwork, EPsdStartingConfiguration); |
|
141 |
|
142 return iTestStepResult; |
|
143 } |
|
144 |
|
145 // Test case 7.10 |
|
146 enum TVerdict CPsdAgtTest7_10::doPsdAgtTestStepL( void ) |
|
147 { |
|
148 // This test is really only here for code coverage purposes |
|
149 // It's difficult to actually test for any particular result |
|
150 // aside from a successful connection / disconnection |
|
151 TRealAgtNotify agtNotify; |
|
152 agtNotify.SetTestCase(710); |
|
153 |
|
154 NormalConnectL(); |
|
155 |
|
156 return iTestStepResult; |
|
157 } |
|
158 |
|
159 // Test case 7.11 |
|
160 enum TVerdict CPsdAgtTest7_11::doPsdAgtTestStepL( void ) |
|
161 { |
|
162 TRealAgtNotify agtNotify; |
|
163 agtNotify.SetTestCase(711); |
|
164 |
|
165 NormalConnectL(); |
|
166 return iTestStepResult; |
|
167 } |
|
168 |