phonebookengines_old/contactsmodel/tsrc/t_timeis.h
changeset 40 b46a585f6909
equal deleted inserted replaced
37:fd64c38c277d 40:b46a585f6909
       
     1 // Copyright (c) 2003-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 #if !defined(__T_TIMEIS_H__)
       
    17     #define __T_TTIMEIS_H__
       
    18 
       
    19  
       
    20 #include <e32base.h>
       
    21 #include <e32def.h>
       
    22 #include <e32test.h>
       
    23 #include <f32file.h>
       
    24 #include <s32file.h>
       
    25 #include <s32mem.h>
       
    26 #include <cntdb.h>
       
    27 #include <cntdef.h>
       
    28 #include <cntitem.h>
       
    29 #include <cntfield.h>
       
    30 #include <cntfldst.h>
       
    31 #include <cntvcard.h>
       
    32 #include <vtoken.h>
       
    33 
       
    34 
       
    35 class CTimeISTest : public CBase
       
    36 	{
       
    37 public:
       
    38 	CTimeISTest();
       
    39 	~CTimeISTest();
       
    40 
       
    41 	static CTimeISTest* NewLC(RTest& aTest);
       
    42 	void CloseDb();
       
    43 	void RunTestsL();
       
    44 
       
    45 	RFs & Fs() { return(iFs); }
       
    46 private:
       
    47 	void ConstructL(RTest& aTest);
       
    48 	// Utility Methods
       
    49 	CParserVCard* CreateVCardLC(const TDesC8& aContents);
       
    50 	void WriteVCardL(const TDesC& aFileName, CParserVCard& aVCard);
       
    51 	TBool CheckSingleFieldValue(CContactItemFieldSet& aFieldSet, TFieldType aFieldType, const TDesC& aExpectedValue);
       
    52 	TBool CheckSingleParameterFieldValues(CContactItemFieldSet& aFieldSet, TFieldType aFieldType, TUid aMapping, const TDesC& aExpectedValue, TBool aFieldPresent = ETrue);
       
    53 	TContactItemId CreateContactL();
       
    54 	CParserVCard* ParseVCardLC(const TDesC& aFilename);
       
    55 
       
    56 	// Test Methods
       
    57 	CArrayPtr<CContactItem>* ImportVCardLC(const TDesC& aFilename, TBool aConnectWhitespaceOption = ETrue);
       
    58 	void TestOneL();
       
    59 	void TestTwoL();
       
    60 	void TestThree();
       
    61 	void TestFour();
       
    62 	void TestFiveL();
       
    63 	void TestSixL();
       
    64 	void TestSevenL();
       
    65 	void TestEightL();
       
    66 	void TestBirthdayDeletionL(TBool aAddNameField);
       
    67 	
       
    68 private:
       
    69 	RFs iFs;
       
    70 	RTest* iTest;
       
    71 	CContactDatabase* iDb;
       
    72 
       
    73 	}; // CTimeISTest
       
    74 
       
    75 
       
    76 #endif