|
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 CPIXSEARCHERTEST_H |
|
19 #define CPIXSEARCHERTEST_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <StifLogger.h> |
|
23 #include <TestScripterInternal.h> |
|
24 #include <StifTestModule.h> |
|
25 #include <TestclassAssert.h> |
|
26 |
|
27 // CONSTANTS |
|
28 //const ?type ?constant_var = ?constant; |
|
29 |
|
30 // MACROS |
|
31 //#define ?macro ?macro_def |
|
32 #define TEST_CLASS_VERSION_MAJOR 0 |
|
33 #define TEST_CLASS_VERSION_MINOR 0 |
|
34 #define TEST_CLASS_VERSION_BUILD 0 |
|
35 |
|
36 // Logging path |
|
37 _LIT( KcpixsearchertestLogPath, "\\logs\\testframework\\cpixsearchertest\\" ); |
|
38 // Log file |
|
39 _LIT( KcpixsearchertestLogFile, "cpixsearchertest.txt" ); |
|
40 _LIT( KcpixsearchertestLogFileWithTitle, "cpixsearchertest_[%S].txt" ); |
|
41 |
|
42 // FUNCTION PROTOTYPES |
|
43 //?type ?function_name(?arg_list); |
|
44 |
|
45 // FORWARD DECLARATIONS |
|
46 //class ?FORWARD_CLASSNAME; |
|
47 class Ccpixsearchertest; |
|
48 |
|
49 // DATA TYPES |
|
50 //enum ?declaration |
|
51 //typedef ?declaration |
|
52 //extern ?data_type; |
|
53 |
|
54 // CLASS DECLARATION |
|
55 |
|
56 /** |
|
57 * Ccpixsearchertest test class for STIF Test Framework TestScripter. |
|
58 * ?other_description_lines |
|
59 * |
|
60 * @lib ?library |
|
61 * @since ?Series60_version |
|
62 */ |
|
63 NONSHARABLE_CLASS(Ccpixsearchertest) : public CScriptBase |
|
64 { |
|
65 public: // Constructors and destructor |
|
66 |
|
67 /** |
|
68 * Two-phased constructor. |
|
69 */ |
|
70 static Ccpixsearchertest* NewL( CTestModuleIf& aTestModuleIf ); |
|
71 |
|
72 /** |
|
73 * Destructor. |
|
74 */ |
|
75 virtual ~Ccpixsearchertest(); |
|
76 |
|
77 public: // New functions |
|
78 |
|
79 /** |
|
80 * ?member_description. |
|
81 * @since ?Series60_version |
|
82 * @param ?arg1 ?description |
|
83 * @return ?description |
|
84 */ |
|
85 //?type ?member_function( ?type ?arg1 ); |
|
86 |
|
87 public: // Functions from base classes |
|
88 |
|
89 /** |
|
90 * From CScriptBase Runs a script line. |
|
91 * @since ?Series60_version |
|
92 * @param aItem Script line containing method name and parameters |
|
93 * @return Symbian OS error code |
|
94 */ |
|
95 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
96 |
|
97 protected: // New functions |
|
98 |
|
99 /** |
|
100 * ?member_description. |
|
101 * @since ?Series60_version |
|
102 * @param ?arg1 ?description |
|
103 * @return ?description |
|
104 */ |
|
105 //?type ?member_function( ?type ?arg1 ); |
|
106 |
|
107 protected: // Functions from base classes |
|
108 |
|
109 /** |
|
110 * From ?base_class ?member_description |
|
111 */ |
|
112 //?type ?member_function(); |
|
113 |
|
114 private: |
|
115 |
|
116 /** |
|
117 * C++ default constructor. |
|
118 */ |
|
119 Ccpixsearchertest( CTestModuleIf& aTestModuleIf ); |
|
120 |
|
121 /** |
|
122 * By default Symbian 2nd phase constructor is private. |
|
123 */ |
|
124 void ConstructL(); |
|
125 |
|
126 // Prohibit copy constructor if not deriving from CBase. |
|
127 // ?classname( const ?classname& ); |
|
128 // Prohibit assigment operator if not deriving from CBase. |
|
129 // ?classname& operator=( const ?classname& ); |
|
130 |
|
131 /** |
|
132 * Frees all resources allocated from test methods. |
|
133 * @since ?Series60_version |
|
134 */ |
|
135 void Delete(); |
|
136 |
|
137 /** |
|
138 * Test methods are listed below. |
|
139 */ |
|
140 |
|
141 /** |
|
142 * Example test method. |
|
143 * @since ?Series60_version |
|
144 * @param aItem Script line containing parameters. |
|
145 * @return Symbian OS error code. |
|
146 */ |
|
147 virtual TInt TestOpenInvalidIndexdbL( CStifItemParser& aItem ); |
|
148 virtual TInt TestOpenValidIndexdbL( CStifItemParser& aItem ); |
|
149 virtual TInt TestAddDocumentL( CStifItemParser& aItem ); |
|
150 virtual TInt TestAddCancelL( CStifItemParser& aItem ); |
|
151 virtual TInt TestAsyncAddDocumentL( CStifItemParser& aItem ); |
|
152 virtual TInt TestUpdateDocumentL( CStifItemParser& aItem ); |
|
153 virtual TInt TestAsyncUpdateL( CStifItemParser& aItem ); |
|
154 virtual TInt TestDeleteDocumentL( CStifItemParser& aItem ); |
|
155 virtual TInt TestAsyncDeleteL( CStifItemParser& aItem ); |
|
156 virtual TInt TestResetL( CStifItemParser& aItem ); |
|
157 virtual TInt TestFlushL( CStifItemParser& aItem ); |
|
158 virtual TInt TestAsyncFlushL( CStifItemParser& aItem ); |
|
159 virtual TInt TestAsyncResetL( CStifItemParser& aItem ); |
|
160 virtual TInt TestHandleIndexingResultL( CStifItemParser& aItem ); |
|
161 virtual TInt TestSetAnalyzerAsyncL( CStifItemParser& aItem ); |
|
162 virtual TInt TestSearchSessionL( CStifItemParser& aItem ); |
|
163 virtual TInt TestMultiThreadingL( CStifItemParser& aItem ); |
|
164 virtual TInt TestNoBoostL( CStifItemParser& aItem ); |
|
165 virtual TInt TestBoostL( CStifItemParser& aItem ); |
|
166 virtual TInt TestFieldBoostL( CStifItemParser& aItem ); |
|
167 virtual TInt TestStandardAnalyzerL( CStifItemParser& aItem ); |
|
168 virtual TInt TestWhitespaceTokenizerL( CStifItemParser& aItem ); |
|
169 virtual TInt TestRemoveSnowballAnalyzerL( CStifItemParser& aItem ); |
|
170 virtual TInt TestKnownTermL( CStifItemParser& aItem ); |
|
171 virtual TInt TestWildcardTermL( CStifItemParser& aItem ); |
|
172 virtual TInt TestDefineVolumeWorksNonEmptyPathL( CStifItemParser& aItem ); |
|
173 virtual TInt TestDefineVolumeWorksWithEmptyPathL( CStifItemParser& aItem ); |
|
174 virtual TInt TestDefineVolumeErrorScenariosL( CStifItemParser& aItem ); |
|
175 virtual TInt TestSearchCancellationL( CStifItemParser& aItem ); |
|
176 virtual TInt TestSearchAsynchronousL( CStifItemParser& aItem ); |
|
177 virtual TInt TestSearchLeavesIfNotCancelledL( CStifItemParser& aItem ); |
|
178 virtual TInt TestOpenIndexDbL( CStifItemParser& aItem ); |
|
179 virtual TInt TestDeleteIndexDbWhileSearchingL( CStifItemParser& aItem ); |
|
180 virtual TInt TestGetDocumentAsyncL( CStifItemParser& aItem ); |
|
181 virtual TInt TestGetInvalidDocumentAsyncL( CStifItemParser& aItem ); |
|
182 /** |
|
183 * Method used to log version of test class |
|
184 */ |
|
185 void SendTestClassVersion(); |
|
186 |
|
187 //ADD NEW METHOD DEC HERE |
|
188 //[TestMethods] - Do not remove |
|
189 |
|
190 public: // Data |
|
191 // ?one_line_short_description_of_data |
|
192 //?data_declaration; |
|
193 |
|
194 protected: // Data |
|
195 // ?one_line_short_description_of_data |
|
196 //?data_declaration; |
|
197 |
|
198 private: // Data |
|
199 |
|
200 // ?one_line_short_description_of_data |
|
201 //?data_declaration; |
|
202 |
|
203 // Reserved pointer for future extension |
|
204 //TAny* iReserved; |
|
205 |
|
206 public: // Friend classes |
|
207 //?friend_class_declaration; |
|
208 protected: // Friend classes |
|
209 //?friend_class_declaration; |
|
210 private: // Friend classes |
|
211 //?friend_class_declaration; |
|
212 |
|
213 }; |
|
214 |
|
215 #endif // CPIXSEARCHERTEST_H |
|
216 |
|
217 // End of File |