os/mm/imagingandcamerafws/cameraunittest/src/TSU_ECM_API_TestSuite.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/imagingandcamerafws/cameraunittest/src/TSU_ECM_API_TestSuite.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,86 @@
     1.4 +
     1.5 +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// under the terms of "Eclipse Public License v1.0"
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +// This main DLL entry point for the TSU_ECM_API_TestSuite
    1.19 +// 
    1.20 +//
    1.21 +
    1.22 +// EPOC includes
    1.23 +#include <e32base.h>
    1.24 +
    1.25 +// Test system includes
    1.26 +#include "TSU_ECM_API_TestSuite.h"
    1.27 +
    1.28 +#include "ECamInfoTest.h"
    1.29 +#include "ECamTest.h"
    1.30 +#include "ecamreservetest.h"
    1.31 +
    1.32 +
    1.33 +/**
    1.34 + * NewTestSuite is exported at ordinal 1
    1.35 + * this provides the interface to allow schedule test
    1.36 + * to create instances of this test suite
    1.37 + */
    1.38 +EXPORT_C CTestSuite_ECam_API* NewTestSuiteL() 
    1.39 +    { 
    1.40 +	CTestSuite_ECam_API* self = new(ELeave) CTestSuite_ECam_API;
    1.41 +	CleanupStack::PushL(self);
    1.42 +	self->ConstructL();
    1.43 +	CleanupStack::Pop(self); 
    1.44 +	return self;
    1.45 +    }
    1.46 +
    1.47 +/**
    1.48 + * Destructor
    1.49 + */
    1.50 +CTestSuite_ECam_API::~CTestSuite_ECam_API()
    1.51 +	{
    1.52 +	}
    1.53 +
    1.54 +/**
    1.55 + * Get Test Suite version
    1.56 + */
    1.57 +TPtrC CTestSuite_ECam_API::GetVersion()
    1.58 +	{
    1.59 +	_LIT(KTxtVersion, "1.0");
    1.60 +	return KTxtVersion();
    1.61 +	}
    1.62 +
    1.63 +/**
    1.64 + * This function initialises the test suite
    1.65 + * this creates all the test steps and stores them inside CTestSuite_ECam_API 
    1.66 + */
    1.67 +void CTestSuite_ECam_API::InitialiseL()
    1.68 +	{
    1.69 +	// store the name of this test suite 
    1.70 +	iSuiteName = _L("TSU_ECM_API");
    1.71 +
    1.72 +	User::LeaveIfError(ifsSession.Connect());
    1.73 +#ifdef SYMBIAN_MULTIMEDIA_THREEPLANEARCH
    1.74 +	ifsSession.Delete(KMMCameraPluginName);
    1.75 +#endif //SYMBIAN_MULTIMEDIA_THREEPLANEARCH
    1.76 +
    1.77 +	ifsSession.Delete(KTestCameraPluginName);	
    1.78 +	ifsSession.Close();
    1.79 +
    1.80 +	AddTestStepL(RECamInfoTest::NewL(EFalse));
    1.81 +	AddTestStepL(RECamInnerInfoTest::NewL(EFalse));
    1.82 +
    1.83 +	AddTestStepL(RECamTest::NewL(EFalse));
    1.84 +	AddTestStepL(RECamInnerTest::NewL(EFalse));
    1.85 +	
    1.86 +	//Reserve Subscription Test
    1.87 +	AddTestStepL(RECamReserveTest::NewL(EFalse));
    1.88 +	}
    1.89 +