|
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 the License "Symbian Foundation License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent - Internal Symbian test code |
|
21 */ |
|
22 |
|
23 #include "T_DataMappingPersistenceA.h" |
|
24 |
|
25 |
|
26 /** |
|
27 * Constructor |
|
28 */ |
|
29 CT_DataMappingPersistenceATestStep::CT_DataMappingPersistenceATestStep() |
|
30 { |
|
31 // Call base class method to set up the human readable name for logging |
|
32 SetTestStepName(KT_DataMappingPersistenceAStep); |
|
33 } |
|
34 |
|
35 /** |
|
36 * Destructor |
|
37 */ |
|
38 CT_DataMappingPersistenceATestStep::~CT_DataMappingPersistenceATestStep() |
|
39 { |
|
40 iSession.Close(); |
|
41 } |
|
42 |
|
43 /** |
|
44 * @return - TVerdict code |
|
45 * Override of base class virtual |
|
46 */ |
|
47 TVerdict CT_DataMappingPersistenceATestStep::doTestStepPreambleL() |
|
48 { |
|
49 SetTestStepResult(EPass); |
|
50 TInt error = iSession.Connect(); |
|
51 TEST(error==KErrNone); |
|
52 return TestStepResult(); |
|
53 } |
|
54 |
|
55 /** |
|
56 * @return - TVerdict code |
|
57 * Override of base class virtual |
|
58 */ |
|
59 TVerdict CT_DataMappingPersistenceATestStep::doTestStepPostambleL() |
|
60 { |
|
61 return TestStepResult(); |
|
62 } |
|
63 |
|
64 TVerdict CT_DataMappingPersistenceATestStep::doTestStepL() |
|
65 { |
|
66 INFO_PRINTF1(_L("Testing Apparc...T_DataMappingPersistenceA Test Cases Running...")); |
|
67 |
|
68 TRAPD(ret,RunTestCasesL()) |
|
69 TEST(ret==KErrNone); |
|
70 |
|
71 INFO_PRINTF1(_L("...T_DataMappingPersistenceA Test Cases Completed.")); |
|
72 |
|
73 return TestStepResult(); |
|
74 } |
|
75 |
|
76 TInt CT_DataMappingPersistenceATestStep::RunTestCasesL() |
|
77 { |
|
78 //DONT_CHECK since array in type store is uncompressed |
|
79 HEAP_TEST_LS_SESSION(iSession, 0, DONT_CHECK, TestInsertDataMappingL(), NO_CLEANUP); |
|
80 |
|
81 return KErrNone; |
|
82 } |
|
83 |
|
84 void CT_DataMappingPersistenceATestStep::TestInsertDataMappingL() |
|
85 { |
|
86 TUid appUid = {0x10004c58}; |
|
87 _LIT8(KLitMimeTypeData,"text/TestDataMappingPersistence"); |
|
88 TDataType dataType (KLitMimeTypeData); |
|
89 TInt error = iSession.InsertDataMapping(dataType,1,appUid); |
|
90 TEST(error==KErrNone); |
|
91 } |