|
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: STIF testclass declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef LOCINFOCONVERSIONUNITTEST_H |
|
19 #define LOCINFOCONVERSIONUNITTEST_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <StifLogger.h> |
|
23 #include <TestScripterInternal.h> |
|
24 #include <StifTestModule.h> |
|
25 #include <TestclassAssert.h> |
|
26 #include <e32base.h> |
|
27 #include "LocInfoConversionHandler.h" |
|
28 #include <lbs/lbslocationclasstypes.h> |
|
29 |
|
30 // CONSTANTS |
|
31 //const ?type ?constant_var = ?constant; |
|
32 |
|
33 // MACROS |
|
34 //#define ?macro ?macro_def |
|
35 #define TEST_CLASS_VERSION_MAJOR 0 |
|
36 #define TEST_CLASS_VERSION_MINOR 0 |
|
37 #define TEST_CLASS_VERSION_BUILD 0 |
|
38 |
|
39 // Logging path |
|
40 _LIT( KLocInfoConversionUnitTestLogPath, "\\logs\\testframework\\LocInfoConversionUnitTest\\" ); |
|
41 // Log file |
|
42 _LIT( KLocInfoConversionUnitTestLogFile, "LocInfoConversionUnitTest.txt" ); |
|
43 _LIT( KLocInfoConversionUnitTestLogFileWithTitle, "LocInfoConversionUnitTest_[%S].txt" ); |
|
44 |
|
45 // FUNCTION PROTOTYPES |
|
46 //?type ?function_name(?arg_list); |
|
47 |
|
48 // FORWARD DECLARATIONS |
|
49 //class ?FORWARD_CLASSNAME; |
|
50 class CLocInfoConversionUnitTest; |
|
51 class CLbsPositionInfo; |
|
52 class CLbsGsmCellInfo; |
|
53 class CLbsWcdmaCellInfo; |
|
54 class CLbsWlanInfo; |
|
55 class CLbsLocationInfo; |
|
56 |
|
57 enum TTestType |
|
58 { |
|
59 EPositive, |
|
60 |
|
61 ENegative |
|
62 }; |
|
63 |
|
64 // DATA TYPES |
|
65 //enum ?declaration |
|
66 //typedef ?declaration |
|
67 //extern ?data_type; |
|
68 |
|
69 // CLASS DECLARATION |
|
70 |
|
71 /** |
|
72 * CLocInfoConversionUnitTest test class for STIF Test Framework TestScripter. |
|
73 * ?other_description_lines |
|
74 * |
|
75 * @lib ?library |
|
76 * @since ?Series60_version |
|
77 */ |
|
78 NONSHARABLE_CLASS(CLocInfoConversionUnitTest) : public CScriptBase |
|
79 { |
|
80 public: // Constructors and destructor |
|
81 |
|
82 /** |
|
83 * Two-phased constructor. |
|
84 */ |
|
85 static CLocInfoConversionUnitTest* NewL( CTestModuleIf& aTestModuleIf ); |
|
86 |
|
87 /** |
|
88 * Destructor. |
|
89 */ |
|
90 virtual ~CLocInfoConversionUnitTest(); |
|
91 |
|
92 public: // New functions |
|
93 |
|
94 /** |
|
95 * ?member_description. |
|
96 * @since ?Series60_version |
|
97 * @param ?arg1 ?description |
|
98 * @return ?description |
|
99 */ |
|
100 //?type ?member_function( ?type ?arg1 ); |
|
101 |
|
102 public: // Functions from base classes |
|
103 |
|
104 /** |
|
105 * From CScriptBase Runs a script line. |
|
106 * @since ?Series60_version |
|
107 * @param aItem Script line containing method name and parameters |
|
108 * @return Symbian OS error code |
|
109 */ |
|
110 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
111 |
|
112 protected: // New functions |
|
113 |
|
114 /** |
|
115 * ?member_description. |
|
116 * @since ?Series60_version |
|
117 * @param ?arg1 ?description |
|
118 * @return ?description |
|
119 */ |
|
120 //?type ?member_function( ?type ?arg1 ); |
|
121 |
|
122 protected: // Functions from base classes |
|
123 |
|
124 /** |
|
125 * From ?base_class ?member_description |
|
126 */ |
|
127 //?type ?member_function(); |
|
128 |
|
129 private: |
|
130 |
|
131 /** |
|
132 * C++ default constructor. |
|
133 */ |
|
134 CLocInfoConversionUnitTest( CTestModuleIf& aTestModuleIf ); |
|
135 |
|
136 /** |
|
137 * By default Symbian 2nd phase constructor is private. |
|
138 */ |
|
139 void ConstructL(); |
|
140 |
|
141 // Prohibit copy constructor if not deriving from CBase. |
|
142 // ?classname( const ?classname& ); |
|
143 // Prohibit assigment operator if not deriving from CBase. |
|
144 // ?classname& operator=( const ?classname& ); |
|
145 |
|
146 /** |
|
147 * Frees all resources allocated from test methods. |
|
148 * @since ?Series60_version |
|
149 */ |
|
150 void Delete(); |
|
151 |
|
152 /** |
|
153 * Test methods are listed below. |
|
154 */ |
|
155 |
|
156 /** |
|
157 * Example test method. |
|
158 * @since ?Series60_version |
|
159 * @param aItem Script line containing parameters. |
|
160 * @return Symbian OS error code. |
|
161 */ |
|
162 TInt RLbsLocInfoConverter_Connect1L(CStifItemParser& aItem ); |
|
163 TInt RLbsLocInfoConverter_Connect2L(CStifItemParser& aItem ); |
|
164 TInt RLbsLocInfoConverter_ConvertLocationInfo1L(CStifItemParser& aItem ); |
|
165 TInt RLbsLocInfoConverter_ConvertLocationInfo2L(CStifItemParser& aItem ); |
|
166 TInt RLbsLocInfoConverter_ConvertLocationInfo3L(CStifItemParser& aItem ); |
|
167 TInt RLbsLocInfoConverter_ConvertLocationInfo4L(CStifItemParser& aItem ); |
|
168 TInt RLbsLocInfoConverter_ConvertLocationInfo5L(CStifItemParser& aItem ); |
|
169 TInt RLbsLocInfoConverter_ConvertLocationInfo6L(CStifItemParser& aItem ); |
|
170 TInt RLbsLocInfoConverter_ConvertLocationInfo7L(CStifItemParser& aItem ); |
|
171 TInt RLbsLocInfoConverter_ConvertLocationInfo8L(CStifItemParser& aItem ); |
|
172 TInt RLbsLocInfoConverter_ConvertLocationInfo9L(CStifItemParser& aItem ); |
|
173 TInt RLbsLocInfoConverter_ConvertLocationInfo10L(CStifItemParser& aItem ); |
|
174 TInt RLbsLocInfoConverter_Cancel1L(CStifItemParser& aItem ); |
|
175 TInt RLbsLocInfoConverter_Cancel2L(CStifItemParser& aItem ); |
|
176 TInt RLbsLocInfoConverter_Cancel3L(CStifItemParser& aItem ); |
|
177 TInt RLbsLocInfoConverter_Cancel4L(CStifItemParser& aItem ); |
|
178 |
|
179 /** |
|
180 * Method used to log version of test class |
|
181 */ |
|
182 void SendTestClassVersion(); |
|
183 |
|
184 /** |
|
185 * Helper methods. |
|
186 */ |
|
187 CLbsPositionInfo* CreatePositionInfoObjectLC(); |
|
188 |
|
189 CLbsGsmCellInfo* CreateGsmCellInfoObjectLC(); |
|
190 |
|
191 CLbsWcdmaCellInfo* CreateWcdmaCellInfoObjectLC(); |
|
192 |
|
193 CLbsWlanInfo* CreateWlanInfoObjectLC(); |
|
194 |
|
195 CLbsLocationInfo* CreateLocationInfoObjectLC( TLbsAreaInfoClassType aAreaType ); |
|
196 |
|
197 void AppendAreaInfoObjectToLocationInfoL( CLbsLocationInfo* aLocationInfo, |
|
198 TLbsAreaInfoClassType aAreaType ); |
|
199 |
|
200 void CheckPositionConvertedInfoL( CLbsLocationInfo* aLocationInfo, |
|
201 TTestType aTestType = EPositive ); |
|
202 |
|
203 void CheckGsmCellConvertedInfoL( CLbsLocationInfo* aLocationInfo, |
|
204 TTestType aTestType = EPositive ); |
|
205 |
|
206 void CheckWcdmaCellConvertedInfoL( CLbsLocationInfo* aLocationInfo, |
|
207 TTestType aTestType = EPositive ); |
|
208 |
|
209 void CheckWlanConvertedInfoL( CLbsLocationInfo* aLocationInfo, |
|
210 TTestType aTestType = EPositive ); |
|
211 public: // Data |
|
212 // ?one_line_short_description_of_data |
|
213 //?data_declaration; |
|
214 |
|
215 protected: // Data |
|
216 // ?one_line_short_description_of_data |
|
217 //?data_declaration; |
|
218 |
|
219 private: // Data |
|
220 CLocInfoConversionHanlder* iConversionHandler; |
|
221 |
|
222 CLocInfoConversionHanlder* iConversionHandler1; |
|
223 public: // Friend classes |
|
224 //?friend_class_declaration; |
|
225 protected: // Friend classes |
|
226 //?friend_class_declaration; |
|
227 private: // Friend classes |
|
228 //?friend_class_declaration; |
|
229 |
|
230 }; |
|
231 |
|
232 #endif // LOCINFOCONVERSIONUNITTEST_H |
|
233 |
|
234 // End of File |