sl@0: // Copyright (c) 2001-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 __CURIUTILSTEST_H__ sl@0: #define __CURIUTILSTEST_H__ sl@0: sl@0: // System includes sl@0: // sl@0: #include sl@0: #include sl@0: // Local includes sl@0: // sl@0: #include "IpuTestUtils.h" sl@0: #include "ctestbase.h" sl@0: sl@0: class CUriUtilsTest : public CTestBase sl@0: { sl@0: public: 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 CUriUtilsTest* 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 CUriUtilsTest* NewL(CIpuTestHarness* aTestHarness); sl@0: sl@0: // D'tor sl@0: // sl@0: ~CUriUtilsTest(); sl@0: sl@0: // Does the tests sl@0: // sl@0: void DoTestsL(); sl@0: sl@0: private: sl@0: sl@0: // C'tor sl@0: // sl@0: CUriUtilsTest(CIpuTestHarness* aTestHarness); sl@0: sl@0: // 2nd phase construction sl@0: // sl@0: void ConstructL(); sl@0: sl@0: // Tests ConvertToInternetForm sl@0: // sl@0: // In: sl@0: // aData - the display uri sl@0: // aExpected - the internet form sl@0: // sl@0: void TestUriUtilsConvertToInternetFormL(const TDesC& aData, const TDesC& aExpected); sl@0: void TestUriUtilsConvertToInternetFormDeprecatedL(const TDesC& aData, const TDesC& aExpected); sl@0: sl@0: // Tests ConvertToDisplayForm sl@0: // sl@0: // In: sl@0: // aData - the internet uri sl@0: // aExpected - the display form sl@0: // sl@0: void TestUriUtilsConvertToDisplayFormL(const TDesC& aData, const TDesC& aExpected); sl@0: void TestUriUtilsConvertToDisplayFormDeprecatedL(const TDesC& aData, const TDesC& aExpected); sl@0: // Tests HasInvalidChars (16-Bit) sl@0: // sl@0: // In: sl@0: // aData - the data sl@0: // aHadInvalidChars - expected result sl@0: // sl@0: void TestUriUtilsHasInvalidCharsL(const TDesC16& aData, TBool aHasInvalidChars); sl@0: sl@0: // Tests HasInvalidChars (8-Bit) sl@0: // sl@0: // In: sl@0: // aData - the data sl@0: // aHadInvalidChars - expected result sl@0: // sl@0: void TestUriUtilsHasInvalidCharsL(const TDesC8& aData, TBool aHasInvalidChars); sl@0: sl@0: // Tests HostType (16-bit) sl@0: // sl@0: // In: sl@0: // aData - the data sl@0: // aHostType - expected host type sl@0: void TestUriUtilsHostTypeL(const TDesC16& aData, UriUtils::TUriHostType aHostType); sl@0: sl@0: // Tests HostType (8-bit) sl@0: // sl@0: // In: sl@0: // aData - the data sl@0: // aHostType - expected host type sl@0: void TestUriUtilsHostTypeL(const TDesC8& aData, UriUtils::TUriHostType aHostType); sl@0: sl@0: private: // Attributes sl@0: sl@0: // Test harness sl@0: // sl@0: CIpuTestHarness* iTestHarness; sl@0: sl@0: }; sl@0: sl@0: #endif // __CURIUTILSTEST_H__ sl@0: