messagingappbase/smsmtm/clientmtm/test/Unittef/inc/csmsheaderbodySqlstorerestore.h
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) 2006-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 // file  CTestHeaderStoreReStore.h
       
    15 // This contains Ut for Sms header migration.
       
    16 // 
       
    17 
       
    18 #include <tefunit.h>
       
    19 #include <testexecutestepbase.h>
       
    20 #include <smstestutils.h>
       
    21 #include <es_sock.h>
       
    22 
       
    23 class EntryObserver : public MMsvEntryObserver
       
    24 	{
       
    25 	public:
       
    26 		virtual void HandleEntryEventL(TMsvEntryEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);		
       
    27 	};
       
    28 	
       
    29 class SessionObserver : public MMsvSessionObserver
       
    30 	{
       
    31 	public:
       
    32 		virtual void HandleSessionEventL(TMsvSessionEvent /*aEvent*/, TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/){};
       
    33 	};
       
    34 
       
    35 class CTestHeaderStoreReStore : public  CActiveTestFixture
       
    36 // WARNING: Despite being a C class, CActiveTestFixture is NOT derrived from CBase
       
    37 // ... so don't expect your data members to be zero'ed
       
    38 	{
       
    39 public:
       
    40 	CTestHeaderStoreReStore(); 
       
    41 	virtual ~CTestHeaderStoreReStore();
       
    42 	void SetupL();
       
    43 	void TearDownL();
       
    44 	
       
    45 		
       
    46 	static CTestSuite* CreateSuiteL(const TDesC& aName);
       
    47 
       
    48 	void TestStoreHeaderL();
       
    49 	void TestReStoreHeaderL();
       
    50 	void InitialiseTestL();
       
    51 	void SetRecipientsL(CSmsHeader& aHeader);
       
    52 	
       
    53 	void TestStoreReStoreSMSHeaderL();
       
    54 	void TestReStoreSMSHeaderL();
       
    55 	
       
    56 	void SetEmptyRecipientsL(CSmsHeader& aHeader);
       
    57 	
       
    58 	void TestStoreReStoreEOSSMSHeaderL();
       
    59 	void TestReStoreEOSHeaderL();
       
    60 	
       
    61 	
       
    62 	void TestStoreReStoreEmptyEOSSMSHeaderL();
       
    63 	void TestReStoreEmptyEOSHeaderL();
       
    64 
       
    65 	void TestReStoreMultipuleEOSRecipientSMSHeaderL();
       
    66 	void TestMultipuleEOSRecipientSMSHeaderL();
       
    67 	
       
    68 	void TestEmptyEOSSubjectSMSHeaderL();
       
    69 	void TestReStoreEmptySubjectSMSHeaderL();
       
    70 	
       
    71 private:
       
    72 	CSmsTestUtils* iTestUtils;
       
    73 	EntryObserver* iEntryObserver;
       
    74 	CMsvSession* iSession;
       
    75 	SessionObserver* iSessionObserver;
       
    76 	CMsvEntry* iEntry;
       
    77 	CActiveScheduler* iScheduler;
       
    78 	CTestUtilsWatcherStarter* iWatchers;
       
    79 	CMsvOperation* iOperation;
       
    80 	TMsvId iMessageId;
       
    81 	CTestActive* iTestActive;
       
    82 	CSmsHeader* iheader;
       
    83 	CSmsHeader* iReceiveheader;
       
    84 	
       
    85 
       
    86 
       
    87 };