|
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 // The following test case is used to test whether the groupname specified in the |
|
15 // registration file is read if its not defined in the localisable resource file |
|
16 // |
|
17 // |
|
18 |
|
19 |
|
20 |
|
21 /** |
|
22 @file |
|
23 @internalComponent - Internal Symbian test code |
|
24 */ |
|
25 |
|
26 |
|
27 #include "testableapalssession.h" |
|
28 #include <APAID.H> |
|
29 #include "T_groupNametest_ver1.h" |
|
30 #include "ApparcTestServer.h" |
|
31 #include "TestExecuteStepBase.h" |
|
32 |
|
33 // CT_GroupNameStep_ver1 |
|
34 |
|
35 const TUid KUidTGroupName={0x10208183}; |
|
36 |
|
37 /** |
|
38 Constructor |
|
39 */ |
|
40 CT_GroupNameStep_ver1::CT_GroupNameStep_ver1() |
|
41 { |
|
42 } |
|
43 |
|
44 |
|
45 /** |
|
46 Destructor |
|
47 */ |
|
48 CT_GroupNameStep_ver1::~CT_GroupNameStep_ver1() |
|
49 { |
|
50 } |
|
51 |
|
52 |
|
53 /** |
|
54 @SYMTestCaseID T-GroupNameStep-ver1-DoTestGroupNameL |
|
55 |
|
56 @SYMPREQ |
|
57 |
|
58 @SYMTestCaseDesc |
|
59 T_groupname to test the Groupname in localisable resource file |
|
60 |
|
61 @SYMTestPriority High |
|
62 |
|
63 @SYMTestStatus Implemented |
|
64 |
|
65 @SYMTestActions |
|
66 It connects to the Application Architecture server to perform the following: |
|
67 To test whether the groupname defined in registration file is read if its |
|
68 not defined in the localisable resource file |
|
69 It calls the following function to get the information about the groupname. |
|
70 RApaLsSession::GetAppCapability(TDes8& aCapabilityBuf,TUid aAppUid) const\n |
|
71 |
|
72 @SYMTestExpectedResults |
|
73 GetAppCapability should return the groupname |
|
74 defined in the application's registration file. |
|
75 |
|
76 */ |
|
77 void CT_GroupNameStep_ver1::DoTestGroupNameL(RApaLsSession& aLs) |
|
78 { |
|
79 TApaAppCapabilityBuf cbuf; |
|
80 TApaAppCapability capability; |
|
81 |
|
82 // To read the groupname defined in registration resource file |
|
83 |
|
84 TInt err = aLs.GetAppCapability(cbuf,KUidTGroupName); |
|
85 TEST(err == KErrNone); |
|
86 capability = cbuf(); |
|
87 _LIT(KGroupname,"Reg_groupname"); |
|
88 |
|
89 TEST(capability.iGroupName == KGroupname); |
|
90 } |
|
91 |
|
92 /** |
|
93 @return - TVerdict code |
|
94 Override of base class virtual |
|
95 */ |
|
96 TVerdict CT_GroupNameStep_ver1::doTestStepL() |
|
97 { |
|
98 INFO_PRINTF1(_L(" Test Started")); |
|
99 |
|
100 RTestableApaLsSession ls; |
|
101 TEST(KErrNone == ls.Connect()); |
|
102 CleanupClosePushL(ls); |
|
103 |
|
104 //To test whether the groupname defined in the |
|
105 //registration file is read if its not defined in localisable resource file |
|
106 |
|
107 HEAP_TEST_LS_SESSION(ls, 0, 0, DoTestGroupNameL(ls), NO_CLEANUP); |
|
108 |
|
109 CleanupStack::PopAndDestroy(&ls); |
|
110 |
|
111 INFO_PRINTF1(_L(" Test Finished")); |
|
112 |
|
113 return TestStepResult(); |
|
114 |
|
115 } |