os/security/cryptoservices/filebasedcertificateandkeystores/test/ttesttools/ttesttoolstep.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /*
     2 * Copyright (c) 2007-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 the License "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 * test step declaration
    16 *
    17 */
    18 
    19 
    20 /**
    21  @file
    22 */
    23 
    24 #ifndef __TTESTTOOLSTEP_H__
    25 #define __TTESTTOOLSTEP_H__
    26 
    27 #include <test/testexecutestepbase.h>
    28 #include "ttesttoolserver.h"
    29 #include "e32base.h"
    30 #include "ttesttoolengine.h"
    31 
    32 _LIT(KTestToolListCertStep, "ListCertStep"); 
    33 _LIT(KTestToolGetTrustAppsStep, "GetTrustAppsStep");
    34 _LIT(KTestToolListKeyStep, "ListKeyStep"); 
    35 _LIT(KTestToolGetPolicyStep, "GetPolicyStep");
    36 _LIT(KTestToolParseFileStep, "ParseFileStep");
    37 _LIT(KTestToolGetTrustStep, "GetTrustStep");
    38 _LIT(KTestToolCheckFileStep, "CheckFile");
    39 
    40 _LIT(KExpectedLabel, "expectedlabel");
    41 _LIT(KExpectedUser, "expecteduser");
    42 _LIT(KExpectedLabel1, "expectedlabel1");
    43 _LIT(KExpectedError, "expectederror");
    44 _LIT(KExpectedLabel2, "expectedlabel2");
    45 _LIT(KExpectedNumLabel, "numtimes");
    46 _LIT(KExpectedUserExist, "user");
    47 _LIT(KStore, "store");
    48 _LIT(KExpectedOwner,"owner");
    49 _LIT(KExpectedListStore,"liststore");
    50 _LIT(KActualOutput, "actualoutput");
    51 _LIT(KExpectedTrust, "trust");
    52 _LIT(KFileName, "file");
    53 _LIT(KCheckType, "check");
    54 
    55 
    56 class CTestToolListCertStep : public CTestStep
    57 	{
    58 public:
    59 	CTestToolListCertStep();
    60 	~CTestToolListCertStep();
    61 	virtual TVerdict doTestStepPreambleL();
    62 	virtual TVerdict doTestStepPostambleL();
    63 	virtual TVerdict doTestStepL();
    64 
    65 private:
    66 	TVerdict iVerdict;
    67 	TPtrC iExpectedLabel1;
    68 	TPtrC iExpectedLabel2;
    69 	TPtrC iExpectedOwner;
    70 	TPtrC iActualOutput;
    71 	TInt iExpectedStore;
    72 	TInt iListStoreExist;
    73 	TInt iExpectedNumLabel;
    74 	TBool iLabel2Exist;
    75 	TBool iLabel1Exist;
    76 	TBool iOwnerExist;
    77 	};
    78 
    79 
    80 class CTestToolGetTrustAppsStep : public CTestStep
    81 	{
    82 public:
    83 	CTestToolGetTrustAppsStep();
    84 	~CTestToolGetTrustAppsStep();
    85 	virtual TVerdict doTestStepPreambleL();
    86 	virtual TVerdict doTestStepPostambleL();
    87 	virtual TVerdict doTestStepL();
    88 
    89 private:
    90 	TVerdict iVerdict;
    91 	RPointerArray<HBufC> iApps;
    92 	TPtrC iExpectedLabel;
    93 	};
    94 	
    95 class CTestToolGetTrustStep : public CTestStep
    96 	{
    97 public:
    98 	CTestToolGetTrustStep();
    99 	~CTestToolGetTrustStep();
   100 	virtual TVerdict doTestStepPreambleL();
   101 	virtual TVerdict doTestStepPostambleL();
   102 	virtual TVerdict doTestStepL();
   103 
   104 private:
   105 	TVerdict iVerdict;
   106 	TPtrC iExpectedLabel;
   107 	TBool iExpectedTrust;
   108 	};	
   109 
   110 
   111 class CTestToolListKeyStep : public CTestStep
   112 	{
   113 public:
   114 	CTestToolListKeyStep();
   115 	~CTestToolListKeyStep();
   116 	virtual TVerdict doTestStepPreambleL();
   117 	virtual TVerdict doTestStepPostambleL();
   118 	virtual TVerdict doTestStepL();
   119 
   120 private:
   121 	TVerdict iVerdict;
   122 	TPtrC iExpectedLabel1;
   123 	TPtrC iExpectedLabel2;
   124 	TPtrC iActualOutput;
   125 	TInt iExpectedStore;
   126 	TInt iListStoreExist;
   127 	TInt iExpectedNumLabel;
   128 	TBool iLabel2Exist;
   129 	TBool iLabel1Exist;
   130 	};
   131 	
   132 
   133 class CTestToolGetPolicyStep : public CTestStep
   134 	{
   135 public:
   136 	CTestToolGetPolicyStep();
   137 	~CTestToolGetPolicyStep();
   138 	virtual TVerdict doTestStepPreambleL();
   139 	virtual TVerdict doTestStepPostambleL();
   140 	virtual TVerdict doTestStepL();
   141 
   142 private:
   143 	TVerdict iVerdict;
   144 	TPtrC iExpectedLabel;
   145 	TPtrC iExpectedUser;
   146 	TBool iLabelExist;
   147 	TInt iExpectedUserExist;
   148 	};
   149 
   150 class CTestToolParseFileStep : public CTestStep
   151 	{
   152 public:
   153 	CTestToolParseFileStep();
   154 	~CTestToolParseFileStep();
   155 	virtual TVerdict doTestStepPreambleL();
   156 	virtual TVerdict doTestStepPostambleL();
   157 	virtual TVerdict doTestStepL();
   158 	HBufC8* GetErrorFromOutputFileLC(const TDesC8& aBuffer);
   159 private:
   160 	RPointerArray<HBufC> iArgs;
   161 	TPtrC iExpectedError;
   162 	TPtrC iActualOutput;
   163 	};
   164 
   165 class CTestToolCheckFileStep : public CTestStep
   166 	{
   167 public:
   168 	CTestToolCheckFileStep();
   169 	~CTestToolCheckFileStep();
   170 	virtual TVerdict doTestStepPreambleL();
   171 	virtual TVerdict doTestStepPostambleL();
   172 	virtual TVerdict doTestStepL();
   173 	
   174 private:
   175 	TPtrC iFileName;
   176 	TPtrC iCheckType;
   177 	};
   178 #endif // __TTESTTOOLSTEP_H__