email/imap4mtm/imapsession/test/inc/ctestimapidle.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 //
       
    15 
       
    16 #ifndef CTESTIMAPIDLE_H
       
    17 #define CTESTIMAPIDLE_H
       
    18 
       
    19 #include <test/tefunit.h>
       
    20 
       
    21 #include "cactivewaiter.h"
       
    22 
       
    23 
       
    24 // Forward Declarations
       
    25 class CFakeInputStream;
       
    26 class CFakeOutputStream;
       
    27 class CImapSession;
       
    28 
       
    29 /**
       
    30 This test fixture tests CImapIdle.
       
    31 @internalTechnology
       
    32 @prototype
       
    33 */
       
    34 class CTestImapIdle : public CActiveTestFixture
       
    35 					, public MActiveWaiterObserver
       
    36 // Note that all test suites must begin with "CTest"
       
    37 // WARNING: Despite being a C class, CActiveTestFixture is NOT derrived from CBase
       
    38 // ... so don't expect your data members to be zero'ed
       
    39 	{
       
    40 public:
       
    41 	// Constructor & Destructor (explicitly virtual because CTestFixture is NOT derrived from CBase)
       
    42 	CTestImapIdle();
       
    43 	virtual ~CTestImapIdle();
       
    44 	
       
    45 	// SetUp and TearDown code (optional)
       
    46 	virtual void SetupL();
       
    47 	virtual void TearDownL();
       
    48 
       
    49 	// Tests
       
    50 	void TestIdleEnterDoneL();
       
    51 	void TestIdleEnterDoneFlatL();
       
    52 	void TestIdleEnterWaitDoneL();
       
    53 	void TestIdleEnterWaitCancelDoneL();
       
    54 	void TestIdleEnterWaitCancelDataDoneL();
       
    55 	void TestIdleSequenceL();
       
    56 	void TestIdleSequenceWithCancelL();
       
    57 	void TestIdleSequenceWithCancelAndFlatL();
       
    58 			
       
    59 	static CTestSuite* CreateSuiteL(const TDesC& aName);
       
    60 	
       
    61 	// Implement MActiveWaiterObserver
       
    62 	void DoCancel();
       
    63 	
       
    64 private:
       
    65 	CFakeInputStream* iInputStream;
       
    66 	CFakeOutputStream* iOutputStream;
       
    67 	CActiveWaiter* iActiveWaiter;
       
    68 	CImapSession* iImapSession;
       
    69 	};
       
    70 	
       
    71 #endif // CTESTIMAPIDLE_H