email/imap4mtm/imapsyncmanager/test/inc/ctestimapsyncmanager.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     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 // ctestimapsynmanager.h
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef CTESTIMAPSYNCMANAGER_H
       
    19 #define CTESTIMAPSYNCMANAGER_H
       
    20 #include "cimapsettings.h"
       
    21 #include <cemailaccounts.h>
       
    22 #include <iapprefs.h>
       
    23 #include <smtpset.h>
       
    24 #include "emailtestutils.h"
       
    25 #include <miutmsg.h>
       
    26 #include <test/tefunit.h>
       
    27 #include "cimap4servermtm.h"
       
    28 // Forward Declarations
       
    29 class CActiveWaiter;
       
    30 
       
    31 /**
       
    32 This test fixture tests CImapSync's ability to deliver lines and literals to CImapCommand objects.
       
    33 This is a white-box test, using the simple CImapLogout class to receive lines.
       
    34 Set a breakpoint in CImapLogout::ParseMessageL() to ensure that the expected lines are being delivered.
       
    35 TODO: Add some literal tests, when there are commands implemented that use this feature.
       
    36 @internalTechnology
       
    37 @prototype
       
    38 */
       
    39 class CTestImapSyncManager : public CActiveTestFixture
       
    40 // Note that all test suites must begin with "CTest"
       
    41 // WARNING: Despite being a C class, CActiveTestFixture is NOT derrived from CBase
       
    42 // ... so don't expect your data members to be zero'ed
       
    43 	{
       
    44 public:
       
    45 	// Constructor & Destructor (explicitly virtual because CTestFixture is NOT derrived from CBase)
       
    46 	CTestImapSyncManager();
       
    47 	virtual ~CTestImapSyncManager();
       
    48 	
       
    49 	// Tests
       
    50 	virtual void SetupL( );
       
    51 	virtual void TearDownL( );
       
    52 	void ConnectToRemoteServerL();
       
    53 	void DisconnectL();
       
    54 	void DeleteFolderL(const TDesC& aName);
       
    55 	void CreateFolderL(const TDesC& aName,TMsvId entry1);
       
    56 	TMsvId FindFolderL(const TDesC& aName, TBool aCaseSensitive = EFalse);
       
    57 	void SetSubscriptionL(const TDesC& aName);
       
    58 
       
    59 	void ChangeSyncLimitL(TInt limit);
       
    60 	void SendMessageL();
       
    61 private:
       
    62 		CActiveWaiter* iActiveWaiter;
       
    63 public:
       
    64 
       
    65 	CImapSettings* iImapSettings;
       
    66 	CImap4ServerMtm* iImapServerMtm;
       
    67 	TMsvId iServiceId ;
       
    68 	CMsvEntrySelection* iSel;
       
    69 	CMsvServerEntry* iEntry;
       
    70 	CEmailTestUtils* iTestUtils;
       
    71 	TImapAccount iImapAccount;
       
    72 	CImImap4Settings* iImapSettings1;
       
    73 	};
       
    74 	 
       
    75 #endif CTESTIMAPSYNCMANAGER_H