|
1 // Copyright (c) 2005-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 // |
|
15 |
|
16 #include "TestExNoBDay.h" |
|
17 |
|
18 CTestExNoBDay::~CTestExNoBDay() |
|
19 /** |
|
20 * Destructor |
|
21 */ |
|
22 { |
|
23 } |
|
24 |
|
25 CTestExNoBDay::CTestExNoBDay() |
|
26 /** |
|
27 * Constructor |
|
28 */ |
|
29 { |
|
30 // Call base class method to set up the human readable name for logging |
|
31 SetTestStepName(KTestExNoBDay); |
|
32 } |
|
33 |
|
34 TVerdict CTestExNoBDay::doTestStepPreambleL() |
|
35 /** |
|
36 * @return - TVerdict code |
|
37 * Override of base class virtual |
|
38 */ |
|
39 { |
|
40 INFO_PRINTF1(_L("Start Export of vCards (No birthday) Tests")); |
|
41 |
|
42 iScheduler = new (ELeave) CActiveScheduler; |
|
43 CActiveScheduler::Install(iScheduler); |
|
44 |
|
45 SetTestStepResult(EPass); |
|
46 return TestStepResult(); |
|
47 } |
|
48 |
|
49 TVerdict CTestExNoBDay::doTestStepL() |
|
50 /** |
|
51 * @return - TVerdict code |
|
52 * Override of base class pure virtual |
|
53 */ |
|
54 { |
|
55 SetTestStepResult(EFail); |
|
56 |
|
57 // test codes |
|
58 // Export an vCard with the current universal time |
|
59 TBuf<90> pathVCF(KExportNoBDayFile); |
|
60 ExportItemL(pathVCF, EFalse); |
|
61 |
|
62 // read from the disk. |
|
63 ImportItemL(pathVCF, ETrue); |
|
64 |
|
65 if(iBDayFromImport == NULL) |
|
66 { |
|
67 INFO_PRINTF1(_L("Imported Birthday is NULL (correct), as exported without BDAY")); |
|
68 SetTestStepResult(EPass); |
|
69 } |
|
70 else |
|
71 { |
|
72 INFO_PRINTF1(_L("Imported Birthday is NOT NULL (incorrect)")); |
|
73 SetTestStepResult(EFail); |
|
74 } |
|
75 |
|
76 return TestStepResult(); |
|
77 } |
|
78 |
|
79 TVerdict CTestExNoBDay::doTestStepPostambleL() |
|
80 /** |
|
81 * @return - TVerdict code |
|
82 * Override of base class virtual |
|
83 */ |
|
84 { |
|
85 CActiveScheduler::Install(NULL); |
|
86 delete iScheduler; |
|
87 INFO_PRINTF1(_L("Completed Export of vCards (No birthday) Tests")); |
|
88 INFO_PRINTF1(KFCITFSIE4); |
|
89 return TestStepResult(); |
|
90 } |
|
91 |
|
92 |