email/imap4mtm/imapsession/test/inc/ctestimapbodystructurebuilder.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 __CTESTIMAPBODYSTRUCTUREBUILDER_H__
       
    17 #define __CTESTIMAPBODYSTRUCTUREBUILDER_H__
       
    18 
       
    19 #include <test/tefunit.h>
       
    20 #include "cimapenvelope.h"
       
    21 
       
    22 // Forward Declarations
       
    23 class CImapBodyStructureBuilder;
       
    24 class CImapFetchResponse;
       
    25 
       
    26 /**
       
    27 This test fixture tests CImapBodyStructureBuilder.
       
    28 @internalTechnology
       
    29 @prototype
       
    30 */
       
    31 class CTestImapBodyStructureBuilder : public CTestFixture
       
    32 // Note that all test suites must begin with "CTest"
       
    33 // WARNING: Despite being a C class, CTestFixture is NOT derrived from CBase
       
    34 // ... so don't expect your data members to be zero'ed
       
    35 	{
       
    36 public:
       
    37 	// Constructor & Destructor (explicitly virtual because CTestFixture is NOT derrived from CBase)
       
    38 	CTestImapBodyStructureBuilder();
       
    39 	virtual ~CTestImapBodyStructureBuilder();
       
    40 	
       
    41 	// SetUp and TearDown code (optional)
       
    42 	virtual void SetupL();
       
    43 	virtual void TearDownL();
       
    44 
       
    45 	void AssertDescriptorsEqual(const TDesC8& aFirst, const TDesC8& aSecond);
       
    46 
       
    47 	// Tests
       
    48 	void TestSimpleTextMessageL();
       
    49 	void TestComplexTextMessageL();
       
    50 	void TestRfc822MessageL();
       
    51 	void TestMultipartTextMessageNestLeftL();
       
    52 	void TestMultipartTextMessageNestRightL();
       
    53 			
       
    54 	static CTestSuite* CreateSuiteL(const TDesC& aName);
       
    55 	
       
    56 private:
       
    57 	void CheckAddressL(const CImapEnvelope::TAddress& aAddress, const TDesC16& aExpectedAddressString);
       
    58 
       
    59 private:
       
    60 	CImapFetchResponse* iFetchResponse;
       
    61 	CImapBodyStructureBuilder* iBodyStructureBuilder;
       
    62 	};
       
    63 	
       
    64 #endif __CTESTIMAPBODYSTRUCTUREBUILDER_H__