os/security/cryptoservices/filebasedcertificateandkeystores/test/ttesttools/ttesttoolstep.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/cryptoservices/filebasedcertificateandkeystores/test/ttesttools/ttesttoolstep.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,178 @@
     1.4 +/*
     1.5 +* Copyright (c) 2007-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 the License "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 +* test step declaration
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +/**
    1.24 + @file
    1.25 +*/
    1.26 +
    1.27 +#ifndef __TTESTTOOLSTEP_H__
    1.28 +#define __TTESTTOOLSTEP_H__
    1.29 +
    1.30 +#include <test/testexecutestepbase.h>
    1.31 +#include "ttesttoolserver.h"
    1.32 +#include "e32base.h"
    1.33 +#include "ttesttoolengine.h"
    1.34 +
    1.35 +_LIT(KTestToolListCertStep, "ListCertStep"); 
    1.36 +_LIT(KTestToolGetTrustAppsStep, "GetTrustAppsStep");
    1.37 +_LIT(KTestToolListKeyStep, "ListKeyStep"); 
    1.38 +_LIT(KTestToolGetPolicyStep, "GetPolicyStep");
    1.39 +_LIT(KTestToolParseFileStep, "ParseFileStep");
    1.40 +_LIT(KTestToolGetTrustStep, "GetTrustStep");
    1.41 +_LIT(KTestToolCheckFileStep, "CheckFile");
    1.42 +
    1.43 +_LIT(KExpectedLabel, "expectedlabel");
    1.44 +_LIT(KExpectedUser, "expecteduser");
    1.45 +_LIT(KExpectedLabel1, "expectedlabel1");
    1.46 +_LIT(KExpectedError, "expectederror");
    1.47 +_LIT(KExpectedLabel2, "expectedlabel2");
    1.48 +_LIT(KExpectedNumLabel, "numtimes");
    1.49 +_LIT(KExpectedUserExist, "user");
    1.50 +_LIT(KStore, "store");
    1.51 +_LIT(KExpectedOwner,"owner");
    1.52 +_LIT(KExpectedListStore,"liststore");
    1.53 +_LIT(KActualOutput, "actualoutput");
    1.54 +_LIT(KExpectedTrust, "trust");
    1.55 +_LIT(KFileName, "file");
    1.56 +_LIT(KCheckType, "check");
    1.57 +
    1.58 +
    1.59 +class CTestToolListCertStep : public CTestStep
    1.60 +	{
    1.61 +public:
    1.62 +	CTestToolListCertStep();
    1.63 +	~CTestToolListCertStep();
    1.64 +	virtual TVerdict doTestStepPreambleL();
    1.65 +	virtual TVerdict doTestStepPostambleL();
    1.66 +	virtual TVerdict doTestStepL();
    1.67 +
    1.68 +private:
    1.69 +	TVerdict iVerdict;
    1.70 +	TPtrC iExpectedLabel1;
    1.71 +	TPtrC iExpectedLabel2;
    1.72 +	TPtrC iExpectedOwner;
    1.73 +	TPtrC iActualOutput;
    1.74 +	TInt iExpectedStore;
    1.75 +	TInt iListStoreExist;
    1.76 +	TInt iExpectedNumLabel;
    1.77 +	TBool iLabel2Exist;
    1.78 +	TBool iLabel1Exist;
    1.79 +	TBool iOwnerExist;
    1.80 +	};
    1.81 +
    1.82 +
    1.83 +class CTestToolGetTrustAppsStep : public CTestStep
    1.84 +	{
    1.85 +public:
    1.86 +	CTestToolGetTrustAppsStep();
    1.87 +	~CTestToolGetTrustAppsStep();
    1.88 +	virtual TVerdict doTestStepPreambleL();
    1.89 +	virtual TVerdict doTestStepPostambleL();
    1.90 +	virtual TVerdict doTestStepL();
    1.91 +
    1.92 +private:
    1.93 +	TVerdict iVerdict;
    1.94 +	RPointerArray<HBufC> iApps;
    1.95 +	TPtrC iExpectedLabel;
    1.96 +	};
    1.97 +	
    1.98 +class CTestToolGetTrustStep : public CTestStep
    1.99 +	{
   1.100 +public:
   1.101 +	CTestToolGetTrustStep();
   1.102 +	~CTestToolGetTrustStep();
   1.103 +	virtual TVerdict doTestStepPreambleL();
   1.104 +	virtual TVerdict doTestStepPostambleL();
   1.105 +	virtual TVerdict doTestStepL();
   1.106 +
   1.107 +private:
   1.108 +	TVerdict iVerdict;
   1.109 +	TPtrC iExpectedLabel;
   1.110 +	TBool iExpectedTrust;
   1.111 +	};	
   1.112 +
   1.113 +
   1.114 +class CTestToolListKeyStep : public CTestStep
   1.115 +	{
   1.116 +public:
   1.117 +	CTestToolListKeyStep();
   1.118 +	~CTestToolListKeyStep();
   1.119 +	virtual TVerdict doTestStepPreambleL();
   1.120 +	virtual TVerdict doTestStepPostambleL();
   1.121 +	virtual TVerdict doTestStepL();
   1.122 +
   1.123 +private:
   1.124 +	TVerdict iVerdict;
   1.125 +	TPtrC iExpectedLabel1;
   1.126 +	TPtrC iExpectedLabel2;
   1.127 +	TPtrC iActualOutput;
   1.128 +	TInt iExpectedStore;
   1.129 +	TInt iListStoreExist;
   1.130 +	TInt iExpectedNumLabel;
   1.131 +	TBool iLabel2Exist;
   1.132 +	TBool iLabel1Exist;
   1.133 +	};
   1.134 +	
   1.135 +
   1.136 +class CTestToolGetPolicyStep : public CTestStep
   1.137 +	{
   1.138 +public:
   1.139 +	CTestToolGetPolicyStep();
   1.140 +	~CTestToolGetPolicyStep();
   1.141 +	virtual TVerdict doTestStepPreambleL();
   1.142 +	virtual TVerdict doTestStepPostambleL();
   1.143 +	virtual TVerdict doTestStepL();
   1.144 +
   1.145 +private:
   1.146 +	TVerdict iVerdict;
   1.147 +	TPtrC iExpectedLabel;
   1.148 +	TPtrC iExpectedUser;
   1.149 +	TBool iLabelExist;
   1.150 +	TInt iExpectedUserExist;
   1.151 +	};
   1.152 +
   1.153 +class CTestToolParseFileStep : public CTestStep
   1.154 +	{
   1.155 +public:
   1.156 +	CTestToolParseFileStep();
   1.157 +	~CTestToolParseFileStep();
   1.158 +	virtual TVerdict doTestStepPreambleL();
   1.159 +	virtual TVerdict doTestStepPostambleL();
   1.160 +	virtual TVerdict doTestStepL();
   1.161 +	HBufC8* GetErrorFromOutputFileLC(const TDesC8& aBuffer);
   1.162 +private:
   1.163 +	RPointerArray<HBufC> iArgs;
   1.164 +	TPtrC iExpectedError;
   1.165 +	TPtrC iActualOutput;
   1.166 +	};
   1.167 +
   1.168 +class CTestToolCheckFileStep : public CTestStep
   1.169 +	{
   1.170 +public:
   1.171 +	CTestToolCheckFileStep();
   1.172 +	~CTestToolCheckFileStep();
   1.173 +	virtual TVerdict doTestStepPreambleL();
   1.174 +	virtual TVerdict doTestStepPostambleL();
   1.175 +	virtual TVerdict doTestStepL();
   1.176 +	
   1.177 +private:
   1.178 +	TPtrC iFileName;
   1.179 +	TPtrC iCheckType;
   1.180 +	};
   1.181 +#endif // __TTESTTOOLSTEP_H__