messagingfw/msgtestfw/TestActions/Sample/src/CMtfTestActionSampleActionA.cpp
changeset 0 8e480a14352b
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     1 // Copyright (c) 2003-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  @file
       
    18 */
       
    19 
       
    20 
       
    21 #include "CMtfTestActionSampleActionA.h"
       
    22 #include "CMtfTestActionManager.h"
       
    23 #include "CMtfTestServer.h"
       
    24 #include "CMtfTestCase.h"
       
    25 #include <msvapi.h>
       
    26 #include <msvstd.h>
       
    27 //#include "CMtfTestParameterStore.h"
       
    28 
       
    29 CMtfTestAction* CMtfTestActionSampleActionA::NewL(CMtfTestCase& aTestCase,
       
    30 		CMtfTestActionParameters* aActionParameters)
       
    31 {
       
    32 	CMtfTestActionSampleActionA* self = new (ELeave) CMtfTestActionSampleActionA(aTestCase);
       
    33 	CleanupStack::PushL(self);
       
    34 	self->ConstructL(aActionParameters);
       
    35 	CleanupStack::Pop();
       
    36 	return self;
       
    37 }
       
    38 	
       
    39 CMtfTestActionSampleActionA::CMtfTestActionSampleActionA(CMtfTestCase& aTestCase)
       
    40 : CMtfSynchronousTestAction(aTestCase)
       
    41 {
       
    42 }
       
    43 
       
    44 void CMtfTestActionSampleActionA::ExecuteActionL()
       
    45 {
       
    46 	_LIT(KParam,"param");
       
    47 	_LIT(KParam2,"p2");
       
    48 	_LIT(KParam3,"p3");
       
    49 	_LIT(KNum,"453");
       
    50 	_LIT(KTest,"\"test\"");
       
    51 	TBuf<5> buf(KParam);
       
    52 	CMsvEntryFilter* filter = CMsvEntryFilter::NewL();
       
    53 	HBufC* buf2=buf.AllocL();
       
    54 	TInt i(5);
       
    55 	StoreParameterL<HBufC>(TestCase(),*buf2,KParam3);
       
    56 	StoreParameterL<TInt>(TestCase(),i,KParam2);
       
    57 	StoreParameterL<CMsvEntryFilter>(TestCase(),*filter,KParam);
       
    58 	CMsvEntryFilter* e= ObtainParameterReferenceL<CMsvEntryFilter>(TestCase(),KParam);
       
    59 	HBufC* b= ObtainParameterReferenceL<HBufC>(TestCase(),KParam3);
       
    60 	e++;
       
    61 	TInt tt=ObtainValueParameterL<TInt>(TestCase(),KParam2);
       
    62 	TInt tt2=ObtainValueParameterL<TInt>(TestCase(),KNum);
       
    63 	tt2++;	
       
    64 	tt++;
       
    65 	b++;
       
    66 	HBufC* b2=ObtainParameterReferenceL<HBufC>(TestCase(),KTest);
       
    67 	b2++;
       
    68 	TestCase().ActionCompletedL(*this);
       
    69 }
       
    70 
       
    71 CMtfTestActionSampleActionA::~CMtfTestActionSampleActionA()
       
    72 {
       
    73 }
       
    74