os/ossrv/lowlevellibsandfws/pluginfw/Framework/FrameTests/MagicTest.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/lowlevellibsandfws/pluginfw/Framework/FrameTests/MagicTest.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,81 @@
     1.4 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#include <e32uid.h>
    1.20 +
    1.21 +#include "TestUtilities.h"	// For __FILE__LINE__
    1.22 +#include "MagicTest.h"
    1.23 +#include "MagicUnitTests.h"
    1.24 +
    1.25 +LOCAL_D RTest test(_L("MagicTest.cpp"));
    1.26 +
    1.27 +CExampleInterface_ComponentTester::CExampleInterface_ComponentTester(CDataLogger& aDataLogger,
    1.28 +					   MComponentTestObserver& aObserver)
    1.29 +: CComponentTester(aDataLogger, aObserver)
    1.30 +	{
    1.31 +	}
    1.32 +
    1.33 +CExampleInterface_ComponentTester* CExampleInterface_ComponentTester::NewLC(CDataLogger& aDataLogger, MComponentTestObserver& aObserver)
    1.34 +	{
    1.35 +	CExampleInterface_ComponentTester* self = new (ELeave) CExampleInterface_ComponentTester(aDataLogger, aObserver);
    1.36 +	CleanupStack::PushL(self);
    1.37 +	self->ConstructL();
    1.38 +	return self;
    1.39 +	}
    1.40 +
    1.41 +/**
    1.42 +@SYMTestCaseID          SYSLIB-ECOM-CT-0775
    1.43 +@SYMTestCaseDesc	    Tests for implementations of CExampleInterface class
    1.44 +@SYMTestPriority 	    High
    1.45 +@SYMTestActions  	    Unit tests for CExampleInterface class
    1.46 +@SYMTestExpectedResults Test must not fail
    1.47 +@SYMREQ                 REQ0000
    1.48 +*/
    1.49 +void CExampleInterface_ComponentTester::ConstructL()
    1.50 +	{
    1.51 +	ComponentTesterConstructL();
    1.52 +	AddUnitTestL(CExampleInterfaceCreateAndDestroyUnitTest::NewL(iDataLogger, *this));
    1.53 +	AddUnitTestL(CExampleInterface_ListImplementations_UnitTest::NewL(iDataLogger, *this));
    1.54 +	AddUnitTestL(CExampleInterfaceAltCreateAndDestroyUnitTest::NewL(iDataLogger, *this));
    1.55 +	AddUnitTestL(CExampleInterface_DefectHAN4WZHSY_UnitTest::NewL(iDataLogger, *this));
    1.56 +	AddUnitTestL(CExampleInterface_DefectCUO4YCEUE_UnitTest::NewL(iDataLogger, *this));
    1.57 +	AddUnitTestL(CExampleInterface_DefectEVS4Z9BPG_UnitTest::NewL(iDataLogger, *this));
    1.58 +	AddUnitTestL(CExampleInterface_DefectKRN53SL4Q_UnitTest::NewL(iDataLogger, *this));
    1.59 +	}
    1.60 +
    1.61 +EXPORT_C CComponentTester* NewComponentTestLC(CDataLogger& aDataLogger,
    1.62 +											MComponentTestObserver&	aComponentTestObserver)
    1.63 +	{
    1.64 +	return CExampleInterface_ComponentTester::NewLC(aDataLogger, aComponentTestObserver);
    1.65 +	}
    1.66 +
    1.67 +// ___________________________________________________________________________
    1.68 +//
    1.69 +// This section of the module simply includes the exported test harness template which
    1.70 +// makes this a "whole" CPP file with a E32Main entry point below. The test MMP
    1.71 +// project file can then produce a EXE for the test project instead of a DLL.
    1.72 +
    1.73 +#include <ecom/test_bed/testharnesstemplate.h>
    1.74 +
    1.75 +GLDEF_C TInt E32Main()
    1.76 +	{
    1.77 +	test.Title();
    1.78 +	test.Start(_L(" @SYMTestCaseID:SYSLIB-ECOM-CT-0775 "));
    1.79 +	test.End();
    1.80 +	test.Close();
    1.81 +
    1.82 +	return E32Main_TestHarness(NewComponentTestLC);
    1.83 +	}
    1.84 +