testexecmdw/tef/tef/tefunit/inc/crunner.h
branchRCL_3
changeset 3 9397a16b6eb8
parent 1 6edeef394eb7
equal deleted inserted replaced
1:6edeef394eb7 3:9397a16b6eb8
     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 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 /**
       
    21  @file CRunner.h
       
    22 */
       
    23 
       
    24 #ifndef __RUNNER__
       
    25 #define __RUNNER__
       
    26 
       
    27 #include <e32base.h>
       
    28 
       
    29 #include "tefunit.h"
       
    30 
       
    31 class CPath
       
    32 	{
       
    33 public:
       
    34 	CPath();
       
    35 	void ConstructL( const TDes& aPath);
       
    36 	static CPath* NewL( TDes& aPath );
       
    37 	~CPath();
       
    38 	TTestName Current() const;
       
    39 	TTestName NextL();
       
    40 	TInt Count() const;
       
    41 	TInt Remaining() const;
       
    42 
       
    43 private:
       
    44 	RArray<TTestName>	iFields;
       
    45 	TInt				iCurrent;
       
    46 	};
       
    47 
       
    48 class CRunner : public CBase, public MVisitor
       
    49 	{
       
    50 public: 
       
    51 	CRunner( const CTestConfig& aConfig, const CTestExecuteLogger& aLogger);
       
    52 	virtual ~CRunner();
       
    53 	void ConstructL( const TTestPath& aPath );
       
    54 	static CRunner* NewL( const TTestPath &aPath, const CTestConfig& aConfig, const CTestExecuteLogger& aLogger );
       
    55 	virtual void VisitL(CTestCase* aTestCase);
       
    56 	virtual void VisitL(CTestSuite* aTestSuite);
       
    57 private:
       
    58 	CPath				iPath;
       
    59 	CTestConfig			iConfig;
       
    60 	CTestExecuteLogger	iLogger;
       
    61 	};
       
    62 
       
    63 #endif // __RUNNER__
       
    64