messagingappbase/smsmtm/clientmtm/test/src/smcmstepsettings.cpp
changeset 25 84d9eb65b26f
parent 23 238255e8b033
child 27 e4592d119491
child 37 518b245aa84c
child 79 2981cb3aa489
equal deleted inserted replaced
23:238255e8b033 25:84d9eb65b26f
     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-2
       
    18  @SYMTestType UT
       
    19  @SYMTestPriority High
       
    20  @SYMPREQ unknown
       
    21  @SYMTestCaseDesc Create a CSmsAccount and settings (ported from T_SMCM1)
       
    22  @SYMTestActions  Save and load settings
       
    23  @SYMTestExpectedResults Test should not Leave.
       
    24 */
       
    25 
       
    26 #include "smcmstepsettings.h"
       
    27 
       
    28 #include <csmsaccount.h>
       
    29 
       
    30 CSMCMStepSettings::CSMCMStepSettings( )
       
    31 	{
       
    32 	SetTestStepName( KSMCMStepSettings );
       
    33 	}
       
    34 
       
    35 CSMCMStepSettings::~CSMCMStepSettings( )
       
    36 	{
       
    37 	
       
    38 	}
       
    39 
       
    40 TVerdict CSMCMStepSettings::doTestStepL( )
       
    41 	{
       
    42 	INFO_PRINTF1( _L( "CSMCMStepSettings::doTestStepL( )" ) );
       
    43 	
       
    44 	SetTestStepResult( EFail );
       
    45 	
       
    46 	SetSettingsL( );
       
    47 	
       
    48 	iSmsClientMtm->Entry().SetEntryL( iSmsTestUtils->iSmsServiceId );
       
    49 	
       
    50 	CSmsAccount* account = CSmsAccount::NewLC( );
       
    51 	CSmsSettings* loadedSettings = CSmsSettings::NewLC( );
       
    52 	account->LoadSettingsL( *loadedSettings );
       
    53 
       
    54 	if ( loadedSettings->DefaultServiceCenter() == 2 )
       
    55 		{
       
    56 		SetTestStepResult( EPass );
       
    57 		
       
    58 		}
       
    59 
       
    60 	CleanupStack::PopAndDestroy( 2, account );	// loadedSettings, account
       
    61 	
       
    62 	return TestStepResult( );
       
    63 	
       
    64 	}