|
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 // The following test case is used to test that the information read from "old format" resource files |
|
15 // isn't thrown away because of an error while trying to read the group name member that |
|
16 // isn't present in localisable resource file. |
|
17 // |
|
18 // |
|
19 |
|
20 /** |
|
21 @file |
|
22 @internalComponent - Internal Symbian test code |
|
23 */ |
|
24 |
|
25 #include "testableapalssession.h" |
|
26 #include <apaid.h> |
|
27 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
28 #include <apaidpartner.h> |
|
29 #endif //SYMBIAN_ENABLE_SPLIT_HEADERS |
|
30 #include "T_groupNametest_ver2.h" |
|
31 #include "apparctestserver.h" |
|
32 #include <test/testexecutestepbase.h> |
|
33 |
|
34 // CT_GroupNameStep_ver2 |
|
35 |
|
36 |
|
37 const TUid KUidTGroupName={0x10208184}; |
|
38 |
|
39 /** |
|
40 Constructor |
|
41 */ |
|
42 CT_GroupNameStep_ver2::CT_GroupNameStep_ver2() |
|
43 { |
|
44 } |
|
45 |
|
46 |
|
47 /** |
|
48 Destructor |
|
49 */ |
|
50 CT_GroupNameStep_ver2::~CT_GroupNameStep_ver2() |
|
51 { |
|
52 } |
|
53 |
|
54 /** |
|
55 @SYMTestCaseID T-GroupNameStep-Ver2-DoTestCaptionNameL |
|
56 |
|
57 @SYMPREQ |
|
58 |
|
59 @SYMTestPriority High |
|
60 |
|
61 @SYMTestStatus Implemented |
|
62 |
|
63 @SYMTestCaseDesc |
|
64 T-groupname to test localisable resource file |
|
65 |
|
66 @SYMTestActions |
|
67 It connects to the Application Architecture server to perform the following: |
|
68 To test that information read from "old format" resource files isn't thrown away because |
|
69 of an error while trying to read the group name member that isn't present in localisable resource file.. |
|
70 It calls following function to get the information about the groupname. |
|
71 RApaLsSession::GetAppInfo(TApaAppInfo& aInfo,TUid aAppUid) const\n |
|
72 |
|
73 @SYMTestExpectedResults |
|
74 GetAppInfo should return the caption name and ShortCaption Name |
|
75 defined in the localisable resource file. |
|
76 |
|
77 */ |
|
78 void CT_GroupNameStep_ver2::DoTestCaptionNameL(RApaLsSession& aLs) |
|
79 { |
|
80 TApaAppInfo info; |
|
81 TInt err = aLs.GetAppInfo(info,KUidTGroupName); |
|
82 TEST(err == KErrNone); |
|
83 _LIT(KCaption,"T_groupname_ver2"); |
|
84 _LIT(KShortCaption,"TGrpNameV2"); |
|
85 |
|
86 TEST(info.iCaption == KCaption); |
|
87 TEST(info.iShortCaption == KShortCaption); |
|
88 } |
|
89 |
|
90 /** |
|
91 @return - TVerdict code |
|
92 Override of base class virtual |
|
93 */ |
|
94 TVerdict CT_GroupNameStep_ver2::doTestStepL() |
|
95 { |
|
96 INFO_PRINTF1(_L("Test Started")); |
|
97 |
|
98 RTestableApaLsSession ls; |
|
99 TEST(KErrNone == ls.Connect()); |
|
100 CleanupClosePushL(ls); |
|
101 |
|
102 HEAP_TEST_LS_SESSION(ls, 0, 0, DoTestCaptionNameL(ls), NO_CLEANUP); |
|
103 |
|
104 CleanupStack::PopAndDestroy(&ls); |
|
105 |
|
106 INFO_PRINTF1(_L("Test Finished")); |
|
107 |
|
108 return TestStepResult(); |
|
109 |
|
110 } |
|
111 |
|
112 |
|
113 |
|
114 |