sl@0: // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef __CFILEURITEST_H__ sl@0: #define __CFILEURITEST_H__ sl@0: sl@0: // System includes sl@0: // sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: // Local includes sl@0: // sl@0: #include "IpuTestUtils.h" sl@0: #include "ctestbase.h" sl@0: sl@0: // CFileUriTest - test class for the Uri family of classes for the file URI implementation sl@0: // sl@0: class CFileUriTest : public CTestBase sl@0: { sl@0: public: sl@0: // Static factory c'tor. Leaves pointer to created object on the cleanup stack. sl@0: // sl@0: // Rtn: pointer to newly created object - ownership transfered to caller. sl@0: // sl@0: static CFileUriTest* NewLC(CIpuTestHarness* aTestHarness); sl@0: sl@0: // Static factory c'tor. sl@0: // sl@0: // Rtn: pointer to newly created object - ownership transfered to caller. sl@0: // sl@0: static CFileUriTest* NewL(CIpuTestHarness* aTestHarness); sl@0: sl@0: // D'tor sl@0: // sl@0: ~CFileUriTest(); sl@0: sl@0: // Runs the defined tests. sl@0: // sl@0: void DoTestsL(); sl@0: sl@0: private: // Methods sl@0: sl@0: // Default c'tor. sl@0: // sl@0: CFileUriTest(CIpuTestHarness* aTestHarness); sl@0: sl@0: // Non-trivial c'tor. Second part of 2-phase construction - does all allocation. sl@0: // sl@0: void ConstructL(); sl@0: sl@0: sl@0: // sl@0: // sl@0: // File Uri Tests sl@0: // sl@0: // sl@0: void TestFileUriCreationL(const TDesC16& aFullFileName, const TDesC16& aExpectedUri, TUint aFlags) const; sl@0: void TestPrivateFileUriCreationL(const TDesC16& aRelativeFileName, const TDriveNumber aDrive, const TDesC16& aExpectedUri, TUint aFlags) const; sl@0: void TestFileUriComponentExtractionL(const TDesC16& aFileName, const TDesC16& aPath, const TDesC16& aExpectedFileName, const TDesC16& aExpectedDrive, TUint aFlags) const; sl@0: void TestPrivateFileUriComponentExtractionL(const TDesC16& aFileName, const TDriveNumber aDrive, const TDesC16& aPath, const TDesC16& aExpectedFileName, TUint aFlags) const; sl@0: void TestFileUriCreationWithOldAPIAndComponentExtractionL(const TDesC16& aFileName, const TDesC16& aPath, const TDesC16& aExpectedFileName) const; sl@0: void TestFileUriNameExtractionL(const TDesC& aUri, const TDesC& aFilename, const TDesC& aPath); sl@0: void TestFileUriNameExtractionL(const TDesC8& aUri, const TDesC& aFilename, const TDesC& aPath); sl@0: sl@0: private: // Attributes sl@0: sl@0: // Test harness sl@0: // sl@0: CIpuTestHarness* iTestHarness; sl@0: }; sl@0: sl@0: #endif // __CFILEURITEST_H__