cryptoservices/filebasedcertificateandkeystores/test/ttesttools/ttesttoolstep.h
changeset 0 2c201484c85f
child 8 35751d3474b7
equal deleted inserted replaced
-1:000000000000 0:2c201484c85f
       
     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 
       
    22 /**
       
    23  @file
       
    24 */
       
    25 
       
    26 #ifndef __TTESTTOOLSTEP_H__
       
    27 #define __TTESTTOOLSTEP_H__
       
    28 
       
    29 #include <test/testexecutestepbase.h>
       
    30 #include "ttesttoolserver.h"
       
    31 #include "e32base.h"
       
    32 #include "ttesttoolengine.h"
       
    33 
       
    34 _LIT(KTestToolListCertStep, "ListCertStep"); 
       
    35 _LIT(KTestToolGetTrustAppsStep, "GetTrustAppsStep");
       
    36 _LIT(KTestToolListKeyStep, "ListKeyStep"); 
       
    37 _LIT(KTestToolGetPolicyStep, "GetPolicyStep");
       
    38 _LIT(KTestToolParseFileStep, "ParseFileStep");
       
    39 _LIT(KTestToolGetTrustStep, "GetTrustStep");
       
    40 
       
    41 
       
    42 _LIT(KExpectedLabel, "expectedlabel");
       
    43 _LIT(KExpectedUser, "expecteduser");
       
    44 _LIT(KExpectedLabel1, "expectedlabel1");
       
    45 _LIT(KExpectedError, "expectederror");
       
    46 _LIT(KExpectedLabel2, "expectedlabel2");
       
    47 _LIT(KExpectedNumLabel, "numtimes");
       
    48 _LIT(KExpectedUserExist, "user");
       
    49 _LIT(KStore, "store");
       
    50 _LIT(KExpectedOwner,"owner");
       
    51 _LIT(KExpectedListStore,"liststore");
       
    52 _LIT(KActualOutput, "actualoutput");
       
    53 _LIT(KExpectedTrust, "trust");
       
    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 #endif // __TTESTTOOLSTEP_H__