mobilemessaging/smsmtm/clientmtm/test/src/smcmstepfindalias.cpp
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     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 /**
       
    17  @SYMTestCaseID MSG-SMSCLIENTMTM-0243-5
       
    18  @SYMTestType UT
       
    19  @SYMTestPriority High
       
    20  @SYMPREQ unknown
       
    21  @SYMTestCaseDesc Search for alias in SMS (KMsvMessagePartOriginator) (ported from T_SMCM1)
       
    22  @SYMTestActions  Create an SMS and search for alias in it
       
    23  @SYMTestExpectedResults Alias which is et on creation should be find.
       
    24 */
       
    25 
       
    26 #include "smcmstepfindalias.h"
       
    27 #include <mtmdef.h>
       
    28 
       
    29 CSMCMStepFindAlias::CSMCMStepFindAlias( )
       
    30 	{
       
    31 	SetTestStepName( KSMCMStepFindAlias );	
       
    32 	}
       
    33 	
       
    34 CSMCMStepFindAlias::~CSMCMStepFindAlias( )
       
    35 	{
       
    36 	
       
    37 	}
       
    38 	
       
    39 TVerdict CSMCMStepFindAlias::doTestStepL( )
       
    40 	{
       
    41 	INFO_PRINTF1( _L( "CSMCMStepFindAlias::doTestStepL( )" ) );
       
    42 	SetTestStepResult( EFail );
       
    43 	
       
    44 	TMessageSettings settings;
       
    45 	settings.iOperation = EOperationNone;
       
    46 	settings.iOriginalBoxId = KMsvGlobalInBoxIndexEntryId;
       
    47 	settings.iOriginalSmsPDUType = CSmsPDU::ESmsDeliver;
       
    48 	settings.iOriginalBioType = 0;
       
    49 	TMsvId entryId = CreateMessageAndEntryL( KUserDataOriginal, settings );
       
    50 	
       
    51 	iSmsClientMtm->SwitchCurrentEntryL( entryId );
       
    52 	iSmsClientMtm->LoadMessageL( );
       
    53 	
       
    54 	TMsvPartList partList;
       
    55 	partList = KMsvMessagePartOriginator;
       
    56 	
       
    57 	// Find Alias
       
    58 	if ( iSmsClientMtm->Find( _L( "Alias" ), partList ) == partList )
       
    59 		{
       
    60 		SetTestStepResult( EPass );
       
    61 		}
       
    62 	else 
       
    63 		{
       
    64 		ERR_PRINTF1( _L("\"Alias\" not found in KMsvMessagePartOriginator" ) );
       
    65 		}
       
    66 	
       
    67 	return TestStepResult( );
       
    68 		
       
    69 	}