author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 24 Nov 2009 08:56:33 +0200 | |
changeset 33 | 50974a8b132e |
parent 19 | 989d2f495d90 |
permissions | -rw-r--r-- |
19 | 1 |
/* |
2 |
* Copyright (c) 2002 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 the License "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: ?Description |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
||
20 |
||
21 |
// INCLUDE FILES |
|
22 |
#include <e32svr.h> |
|
23 |
#include <StifParser.h> |
|
24 |
//#include <SAPI_TEST\testprg.h> |
|
33
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
25 |
#include <StifTestInterface.h> |
19 | 26 |
|
27 |
#include "tcalendarexporttest.h" |
|
28 |
||
29 |
#include "calexptestcases.h" |
|
30 |
||
31 |
#include "calendarservice.h" |
|
32 |
||
33 |
// ============================ MEMBER FUNCTIONS =============================== |
|
34 |
||
35 |
// ----------------------------------------------------------------------------- |
|
36 |
// CTChangeStatusTest::Delete |
|
37 |
// Delete here all resources allocated and opened from test methods. |
|
38 |
// Called from destructor. |
|
39 |
// ----------------------------------------------------------------------------- |
|
40 |
// |
|
41 |
void CTCalendarExportTest::Delete() |
|
42 |
{ |
|
43 |
||
44 |
} |
|
45 |
||
46 |
// ----------------------------------------------------------------------------- |
|
47 |
// CTChangeStatusTest::RunMethodL |
|
48 |
// Run specified method. Contains also table of test mothods and their names. |
|
49 |
// ----------------------------------------------------------------------------- |
|
50 |
// |
|
51 |
TInt CTCalendarExportTest::RunMethodL( |
|
52 |
CStifItemParser& aItem ) |
|
53 |
{ |
|
54 |
||
55 |
static TStifFunctionInfo const KFunctions[] = |
|
56 |
{ |
|
57 |
// Copy this line for every implemented function. |
|
58 |
// First string is the function name used in TestScripter script file. |
|
59 |
// Second is the actual implementation member function. |
|
60 |
//TRY( "SendMessage", CTDeleteMessageTest::SendMessage ), |
|
61 |
||
62 |
ENTRY( "ExportAll", CTCalendarExportTest::ExportAll ), |
|
63 |
ENTRY( "ExportForGUIDs", CTCalendarExportTest::ExportForGUIDs ), |
|
64 |
ENTRY( "ExportForLUIDs", CTCalendarExportTest::ExportForLUIDs ), |
|
65 |
||
66 |
ENTRY( "ExportAllAsync", CTCalendarExportTest::ExportAllAsync ), |
|
67 |
ENTRY( "ExportForGUIDsAsync", CTCalendarExportTest::ExportForGUIDsAsync ), |
|
68 |
ENTRY( "ExportForLUIDsAsync", CTCalendarExportTest::ExportForLUIDsAsync ), |
|
69 |
||
70 |
ENTRY( "ICALExportAll", CTCalendarExportTest::ICALExportAll ), |
|
71 |
ENTRY( "ICALExportForGUIDs", CTCalendarExportTest::ICALExportForGUIDs ), |
|
72 |
ENTRY( "ICALExportForLUIDs", CTCalendarExportTest::ICALExportForLUIDs ), |
|
73 |
||
74 |
ENTRY( "ICALExportAllAsync", CTCalendarExportTest::ICALExportAllAsync ), |
|
75 |
ENTRY( "ICALExportForGUIDsAsync", CTCalendarExportTest::ICALExportForGUIDsAsync ), |
|
76 |
ENTRY( "ICALExportForLUIDsAsync", CTCalendarExportTest::ICALExportForLUIDsAsync ), |
|
77 |
}; |
|
78 |
||
79 |
const TInt count = sizeof( KFunctions ) / |
|
80 |
sizeof( TStifFunctionInfo ); |
|
81 |
||
82 |
return RunInternalL( KFunctions, count, aItem ); |
|
83 |
||
84 |
} |
|
85 |
||
86 |
extern void StartAlarmServerL(); |
|
87 |
// ----------------------------------------------------------------------------- |
|
88 |
// CTCalendarExportTest::ExportAll |
|
89 |
// Test Method to test the ExportAll(Synchronous) |
|
90 |
// Functionality of CalenderService |
|
91 |
// ----------------------------------------------------------------------------- |
|
92 |
// |
|
93 |
TInt CTCalendarExportTest::ExportAll(CStifItemParser& /*aItem*/) |
|
94 |
{ |
|
95 |
__UHEAP_MARK; |
|
96 |
||
97 |
TInt result=KErrNone; |
|
98 |
||
99 |
CCalExpTestCases *calExpTest = CCalExpTestCases::NewL(result); |
|
100 |
||
101 |
result = calExpTest->TestExportAllL(); |
|
102 |
||
103 |
delete calExpTest; |
|
104 |
||
105 |
__UHEAP_MARKEND; |
|
106 |
||
107 |
return result; |
|
108 |
} |
|
109 |
||
110 |
||
111 |
||
112 |
// ----------------------------------------------------------------------------- |
|
113 |
// CTCalendarExportTest::ExportForGUIDs |
|
114 |
// Test Method to test the ExportExportForGUIDs(Synchronous) |
|
115 |
// Functionality of CalenderService |
|
116 |
// ----------------------------------------------------------------------------- |
|
117 |
// |
|
118 |
TInt CTCalendarExportTest::ExportForGUIDs(CStifItemParser& /*aItem*/) |
|
119 |
{ |
|
120 |
__UHEAP_MARK; |
|
121 |
||
122 |
TInt result=KErrNone; |
|
123 |
||
124 |
CCalExpTestCases *calExpTest = CCalExpTestCases::NewL(result); |
|
125 |
||
126 |
result = calExpTest->TestExportForGuidsL(); |
|
127 |
||
128 |
delete calExpTest; |
|
129 |
||
130 |
__UHEAP_MARKEND; |
|
131 |
||
132 |
return result; |
|
133 |
} |
|
134 |
||
135 |
||
136 |
||
137 |
// ----------------------------------------------------------------------------- |
|
138 |
// CTCalendarExportTest::ExportForLUIDs |
|
139 |
// Test Method to test the ExportForLUIDs(Synchronous) |
|
140 |
// Functionality of CalenderService |
|
141 |
// ----------------------------------------------------------------------------- |
|
142 |
// |
|
143 |
TInt CTCalendarExportTest::ExportForLUIDs(CStifItemParser& /*aItem*/) |
|
144 |
{ |
|
145 |
__UHEAP_MARK; |
|
146 |
||
147 |
||
148 |
TInt result=KErrNone; |
|
149 |
||
150 |
CCalExpTestCases *calExpTest = CCalExpTestCases::NewL(result); |
|
151 |
||
152 |
result = calExpTest->TestExportForLuidsL(); |
|
153 |
||
154 |
delete calExpTest; |
|
155 |
||
156 |
__UHEAP_MARKEND; |
|
157 |
||
158 |
return result; |
|
159 |
} |
|
160 |
||
161 |
||
162 |
||
163 |
// ----------------------------------------------------------------------------- |
|
164 |
// CTCalendarExportTest::ExportAllAsync |
|
165 |
// Test Method to test the ExportAllAsync(Synchronous) |
|
166 |
// Functionality of CalenderService |
|
167 |
// ----------------------------------------------------------------------------- |
|
168 |
// |
|
169 |
TInt CTCalendarExportTest::ExportAllAsync(CStifItemParser& /*aItem*/) |
|
170 |
{ |
|
171 |
__UHEAP_MARK; |
|
172 |
||
173 |
||
174 |
TInt result = KErrNone; |
|
175 |
||
176 |
CCalExpTestCases *calExpTest = CCalExpTestCases::NewL(result); |
|
177 |
||
178 |
//CleanupStack::PushL(calExpTest); |
|
179 |
||
180 |
calExpTest->TestExportAllAsyncL(); |
|
181 |
||
182 |
delete calExpTest; |
|
183 |
||
184 |
__UHEAP_MARKEND; |
|
185 |
||
186 |
return result; |
|
187 |
} |
|
188 |
||
189 |
// ----------------------------------------------------------------------------- |
|
190 |
// CTCalendarExportTest::ExportForGUIDsAsync |
|
191 |
// Test Method to test the ExportForGUIDsAsync(ASynchronous) |
|
192 |
// Functionality of CalenderService |
|
193 |
// ----------------------------------------------------------------------------- |
|
194 |
// |
|
195 |
TInt CTCalendarExportTest::ExportForGUIDsAsync(CStifItemParser& /*aItem*/) |
|
196 |
{ |
|
197 |
__UHEAP_MARK; |
|
198 |
||
199 |
||
200 |
TInt result=KErrNone; |
|
201 |
||
202 |
CCalExpTestCases *calExpTest = CCalExpTestCases::NewL(result); |
|
203 |
||
204 |
calExpTest->TestExportForGuidsAsyncL(); |
|
205 |
||
206 |
delete calExpTest; |
|
207 |
||
208 |
__UHEAP_MARKEND; |
|
209 |
||
210 |
return result; |
|
211 |
} |
|
212 |
||
213 |
||
214 |
// ----------------------------------------------------------------------------- |
|
215 |
// CTCalendarExportTest::ExportForLUIDsAsync |
|
216 |
// Test Method to test the ExportForLUIDsAsync(ASynchronous) |
|
217 |
// Functionality of CalenderService |
|
218 |
// ----------------------------------------------------------------------------- |
|
219 |
// |
|
220 |
TInt CTCalendarExportTest::ExportForLUIDsAsync(CStifItemParser& /*aItem*/) |
|
221 |
{ |
|
222 |
__UHEAP_MARK; |
|
223 |
||
224 |
||
225 |
TInt result=KErrNone; |
|
226 |
||
227 |
CCalExpTestCases *calExpTest = CCalExpTestCases::NewL(result); |
|
228 |
||
229 |
calExpTest->TestExportForLuidsAsyncL(); |
|
230 |
||
231 |
delete calExpTest; |
|
232 |
||
233 |
__UHEAP_MARKEND; |
|
234 |
||
235 |
return result; |
|
236 |
} |
|
237 |
||
238 |
||
239 |
||
240 |
//ICALICALICALICALICALICALICALICALICALICALICALICALICALICAL |
|
241 |
||
242 |
// ----------------------------------------------------------------------------- |
|
243 |
// CTCalendarExportTest::ExportAll |
|
244 |
// Test Method to test the ExportAll(Synchronous) |
|
245 |
// Functionality of CalenderService |
|
246 |
// ----------------------------------------------------------------------------- |
|
247 |
// |
|
248 |
TInt CTCalendarExportTest::ICALExportAll(CStifItemParser& /*aItem*/) |
|
249 |
{ |
|
250 |
__UHEAP_MARK; |
|
251 |
||
252 |
TInt result=KErrNone; |
|
253 |
||
254 |
CCalExpTestCases *calExpTest = CCalExpTestCases::NewL(result, 2); |
|
255 |
||
256 |
//CleanupStack::PushL( calExpTest ); |
|
257 |
||
258 |
result = calExpTest->TestExportAllL(); |
|
259 |
||
260 |
//CleanupStack::PopAndDestroy(calExpTest); |
|
261 |
||
262 |
delete calExpTest; |
|
263 |
||
264 |
__UHEAP_MARKEND; |
|
265 |
||
266 |
return result; |
|
267 |
} |
|
268 |
||
269 |
||
270 |
||
271 |
// ----------------------------------------------------------------------------- |
|
272 |
// CTCalendarExportTest::ExportForGUIDs |
|
273 |
// Test Method to test the ExportExportForGUIDs(Synchronous) |
|
274 |
// Functionality of CalenderService |
|
275 |
// ----------------------------------------------------------------------------- |
|
276 |
// |
|
277 |
TInt CTCalendarExportTest::ICALExportForGUIDs(CStifItemParser& /*aItem*/) |
|
278 |
{ |
|
279 |
__UHEAP_MARK; |
|
280 |
||
281 |
TInt result=KErrNone; |
|
282 |
||
283 |
CCalExpTestCases *calExpTest = CCalExpTestCases::NewL(result, 2); |
|
284 |
||
285 |
//CleanupStack::PushL(calExpTest); |
|
286 |
||
287 |
result = calExpTest->TestExportForGuidsL(); |
|
288 |
||
289 |
//CleanupStack::PopAndDestroy(calExpTest); |
|
290 |
||
291 |
delete calExpTest; |
|
292 |
||
293 |
__UHEAP_MARKEND; |
|
294 |
||
295 |
return result; |
|
296 |
} |
|
297 |
||
298 |
||
299 |
||
300 |
// ----------------------------------------------------------------------------- |
|
301 |
// CTCalendarExportTest::ExportForLUIDs |
|
302 |
// Test Method to test the ExportForLUIDs(Synchronous) |
|
303 |
// Functionality of CalenderService |
|
304 |
// ----------------------------------------------------------------------------- |
|
305 |
// |
|
306 |
TInt CTCalendarExportTest::ICALExportForLUIDs(CStifItemParser& /*aItem*/) |
|
307 |
{ |
|
308 |
__UHEAP_MARK; |
|
309 |
||
310 |
||
311 |
TInt result=KErrNone; |
|
312 |
||
313 |
CCalExpTestCases *calExpTest = CCalExpTestCases::NewL(result, 2); |
|
314 |
||
315 |
//CleanupStack::PushL(calExpTest); |
|
316 |
||
317 |
result = calExpTest->TestExportForLuidsL(); |
|
318 |
||
319 |
//CleanupStack::PopAndDestroy(calExpTest); |
|
320 |
||
321 |
delete calExpTest; |
|
322 |
||
323 |
__UHEAP_MARKEND; |
|
324 |
||
325 |
return result; |
|
326 |
} |
|
327 |
||
328 |
||
329 |
||
330 |
// ----------------------------------------------------------------------------- |
|
331 |
// CTCalendarExportTest::ExportAllAsync |
|
332 |
// Test Method to test the ExportAllAsync(Synchronous) |
|
333 |
// Functionality of CalenderService |
|
334 |
// ----------------------------------------------------------------------------- |
|
335 |
// |
|
336 |
TInt CTCalendarExportTest::ICALExportAllAsync(CStifItemParser& /*aItem*/) |
|
337 |
{ |
|
338 |
__UHEAP_MARK; |
|
339 |
||
340 |
||
341 |
TInt result=KErrNone; |
|
342 |
||
343 |
CCalExpTestCases *calExpTest = CCalExpTestCases::NewL(result, 2); |
|
344 |
||
345 |
//CleanupStack::PushL(calExpTest); |
|
346 |
||
347 |
TRAPD(err, calExpTest->TestExportAllAsyncL()); |
|
348 |
||
349 |
//CleanupStack::PopAndDestroy(calExpTest); |
|
350 |
||
351 |
delete calExpTest; |
|
352 |
||
353 |
||
354 |
__UHEAP_MARKEND; |
|
355 |
||
356 |
return result; |
|
357 |
} |
|
358 |
||
359 |
// ----------------------------------------------------------------------------- |
|
360 |
// CTCalendarExportTest::ExportForGUIDsAsync |
|
361 |
// Test Method to test the ExportForGUIDsAsync(ASynchronous) |
|
362 |
// Functionality of CalenderService |
|
363 |
// ----------------------------------------------------------------------------- |
|
364 |
// |
|
365 |
TInt CTCalendarExportTest::ICALExportForGUIDsAsync(CStifItemParser& /*aItem*/) |
|
366 |
{ |
|
367 |
__UHEAP_MARK; |
|
368 |
||
369 |
||
370 |
TInt result=KErrNone; |
|
371 |
||
372 |
CCalExpTestCases *calExpTest = CCalExpTestCases::NewL(result, 2); |
|
373 |
||
374 |
CleanupStack::PushL(calExpTest); |
|
375 |
||
376 |
calExpTest->TestExportForGuidsAsyncL(); |
|
377 |
||
378 |
CleanupStack::PopAndDestroy(calExpTest); |
|
379 |
||
380 |
__UHEAP_MARKEND; |
|
381 |
||
382 |
return result; |
|
383 |
} |
|
384 |
||
385 |
||
386 |
// ----------------------------------------------------------------------------- |
|
387 |
// CTCalendarExportTest::ExportForLUIDsAsync |
|
388 |
// Test Method to test the ExportForLUIDsAsync(ASynchronous) |
|
389 |
// Functionality of CalenderService |
|
390 |
// ----------------------------------------------------------------------------- |
|
391 |
// |
|
392 |
TInt CTCalendarExportTest::ICALExportForLUIDsAsync(CStifItemParser& /*aItem*/) |
|
393 |
{ |
|
394 |
__UHEAP_MARK; |
|
395 |
||
396 |
||
397 |
TInt result=KErrNone; |
|
398 |
||
399 |
CCalExpTestCases *calExpTest = CCalExpTestCases::NewL(result, 2); |
|
400 |
||
401 |
CleanupStack::PushL(calExpTest); |
|
402 |
||
403 |
calExpTest->TestExportForLuidsAsyncL(); |
|
404 |
||
405 |
CleanupStack::PopAndDestroy(calExpTest); |
|
406 |
||
407 |
__UHEAP_MARKEND; |
|
408 |
||
409 |
return result; |
|
410 |
} |
|
411 |