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