os/security/authorisation/userpromptservice/policies/test/tupspolicies/source/tpolicyreader.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 *
    16 */
    17 
    18 
    19 #ifndef TPOLICYREADER_H
    20 #define TPOLICYREADER_H
    21 
    22 #include <e32base.h>
    23 #include <e32cmn.h>
    24 #include <f32file.h>
    25 #include <test/tefunit.h>
    26 #include <ups/policy.h>
    27 
    28 #include "policyreader.h"
    29 
    30 class CTestPolicyReader : public CTestFixture
    31 	{
    32 public:
    33 	// From CTestFixture
    34 	void SetupL();
    35 	void TearDownL();
    36    
    37 	// Policy Reader Unit Test
    38 	void TestPolicyReaderL();
    39 	
    40 	// Create a suite of all the tests
    41 	static CTestSuite* CreateSuiteL(const TDesC& aName);
    42 	
    43 private:
    44 	TBool CheckPolicyL(const TDesC& aPolicySection);	
    45 	void ReadExpectedValuesL(const TDesC& aPolicySection);
    46 	TBool CompareExpectedValues(const UserPromptService::CPolicy& aPolicy);
    47 	void CreatePolicyReaderL(const TDesC& aPolicyFile);
    48 	void TestPolicyListL(const TDesC& aPolicyFile);
    49 
    50 	TInt iExpectedError;
    51 	TInt iSystemServerSecurity;
    52 	UserPromptService::CPolicyReader* iPolicyReader;
    53 	TInt iSidClasses;
    54 	RArray<TSecureId> iSidList;	
    55 	TPtrC iDestination;
    56 	TInt iOptions;
    57 	TUid iPolicyEvaluator;
    58 	TUid iDialogCreator;
    59 	TInt iMajorVersion;
    60 	TInt iMinorVersion;
    61 	TBool iDefault;
    62 	TInt iFlags;
    63 	RFs iFs;
    64 	};
    65 
    66 #endif // TPOLICYREADER_H
    67