imagingandcamerafws/cameraunittest/src/TSU_ECM_API_TestSuite.cpp
changeset 0 40261b775718
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     1 
       
     2 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 // All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of "Eclipse Public License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 //
       
     9 // Initial Contributors:
       
    10 // Nokia Corporation - initial contribution.
       
    11 //
       
    12 // Contributors:
       
    13 //
       
    14 // Description:
       
    15 // This main DLL entry point for the TSU_ECM_API_TestSuite
       
    16 // 
       
    17 //
       
    18 
       
    19 // EPOC includes
       
    20 #include <e32base.h>
       
    21 
       
    22 // Test system includes
       
    23 #include "TSU_ECM_API_TestSuite.h"
       
    24 
       
    25 #include "ECamInfoTest.h"
       
    26 #include "ECamTest.h"
       
    27 #include "ecamreservetest.h"
       
    28 
       
    29 
       
    30 /**
       
    31  * NewTestSuite is exported at ordinal 1
       
    32  * this provides the interface to allow schedule test
       
    33  * to create instances of this test suite
       
    34  */
       
    35 EXPORT_C CTestSuite_ECam_API* NewTestSuiteL() 
       
    36     { 
       
    37 	CTestSuite_ECam_API* self = new(ELeave) CTestSuite_ECam_API;
       
    38 	CleanupStack::PushL(self);
       
    39 	self->ConstructL();
       
    40 	CleanupStack::Pop(self); 
       
    41 	return self;
       
    42     }
       
    43 
       
    44 /**
       
    45  * Destructor
       
    46  */
       
    47 CTestSuite_ECam_API::~CTestSuite_ECam_API()
       
    48 	{
       
    49 	}
       
    50 
       
    51 /**
       
    52  * Get Test Suite version
       
    53  */
       
    54 TPtrC CTestSuite_ECam_API::GetVersion()
       
    55 	{
       
    56 	_LIT(KTxtVersion, "1.0");
       
    57 	return KTxtVersion();
       
    58 	}
       
    59 
       
    60 /**
       
    61  * This function initialises the test suite
       
    62  * this creates all the test steps and stores them inside CTestSuite_ECam_API 
       
    63  */
       
    64 void CTestSuite_ECam_API::InitialiseL()
       
    65 	{
       
    66 	// store the name of this test suite 
       
    67 	iSuiteName = _L("TSU_ECM_API");
       
    68 
       
    69 	User::LeaveIfError(ifsSession.Connect());
       
    70 #ifdef SYMBIAN_MULTIMEDIA_THREEPLANEARCH
       
    71 	ifsSession.Delete(KMMCameraPluginName);
       
    72 #endif //SYMBIAN_MULTIMEDIA_THREEPLANEARCH
       
    73 
       
    74 	ifsSession.Delete(KTestCameraPluginName);	
       
    75 	ifsSession.Close();
       
    76 
       
    77 	AddTestStepL(RECamInfoTest::NewL(EFalse));
       
    78 	AddTestStepL(RECamInnerInfoTest::NewL(EFalse));
       
    79 
       
    80 	AddTestStepL(RECamTest::NewL(EFalse));
       
    81 	AddTestStepL(RECamInnerTest::NewL(EFalse));
       
    82 	
       
    83 	//Reserve Subscription Test
       
    84 	AddTestStepL(RECamReserveTest::NewL(EFalse));
       
    85 	}
       
    86