email/imap4mtm/imapsession/test/inc/ctestimapsessioncreatesequenceset.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 CTESTIMAPSESSIONCREATESEQUENCESET_H
       
    17 #define CTESTIMAPSESSIONCREATESEQUENCESET_H
       
    18 
       
    19 #include <test/tefunit.h>
       
    20 
       
    21 /**
       
    22 This test fixture tests the ability of CImapSession::CreateSequenceSetL() to generate
       
    23 the correct sequence set string for a given set of message uids.
       
    24 CImapSession::CreateSequenceSetL() is static and synchronous, 
       
    25 so it does not need the full setup and teardown of the other CImapSession tests.
       
    26 @internalTechnology
       
    27 @prototype
       
    28 */
       
    29 class CTestImapSessionCreateSequenceSet : public CTestFixture
       
    30 // Note that all test suites must begin with "CTest"
       
    31 // WARNING: Despite being a C class, CActiveTestFixture is NOT derrived from CBase
       
    32 // ... so don't expect your data members to be zero'ed
       
    33 	{
       
    34 public:
       
    35 	// Constructor & Destructor (explicitly virtual because CTestFixture is NOT derrived from CBase)
       
    36 	CTestImapSessionCreateSequenceSet();
       
    37 	virtual ~CTestImapSessionCreateSequenceSet();
       
    38 	
       
    39 	// SetUp and TearDown code (optional)
       
    40 	virtual void SetupL();
       
    41 	virtual void TearDownL();
       
    42 	
       
    43 	// Tests
       
    44 	void TestSingleValueL();
       
    45 	void TestSingleShortRangeL();
       
    46 	void TestSingleMediumRangeL();
       
    47 	void TestSingleLongRangeL();
       
    48 	void TestIndividualValuesL();
       
    49 	void TestSingleValueFollowedByRangeL();
       
    50 	void TestRangeFollowedBySingleValueL();
       
    51 	void TestShortRangeSurroundedBySingleValuesL();
       
    52 	void TestMediumRangeSurroundedBySingleValuesL();
       
    53 	void TestSingleValueSurroundedByRangesL();
       
    54 	void TestTwoRangesL();
       
    55 	void TestThreeRangesL();
       
    56 	void TestLongResultStringL();
       
    57 	void TestOutOfOrderSingleRangeL();
       
    58 	void TestOutOfOrderMixedValuesL();
       
    59 	void TestDuplicatesSingleRangeL();
       
    60 	void TestDuplicatesMixedValuesL();
       
    61 	void TestDuplicatesAndOutOfOrderMixedValuesL();
       
    62 
       
    63 	static CTestSuite* CreateSuiteL(const TDesC& aName);
       
    64 	
       
    65 private:
       
    66 	void DoTestL(TUint* aUids, TInt aCountUids, const TDesC8& aExpectedResult);
       
    67 
       
    68 private:
       
    69 	RArray<TUint> iUids;
       
    70 	};
       
    71 	
       
    72 #endif CTESTIMAPSESSIONCREATESEQUENCESET_H