diff -r 000000000000 -r bde4ae8d615e os/security/authorisation/userpromptservice/policies/test/tupspolicies/source/tpolicyreader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/os/security/authorisation/userpromptservice/policies/test/tupspolicies/source/tpolicyreader.h Fri Jun 15 03:10:57 2012 +0200 @@ -0,0 +1,67 @@ +/* +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +#ifndef TPOLICYREADER_H +#define TPOLICYREADER_H + +#include +#include +#include +#include +#include + +#include "policyreader.h" + +class CTestPolicyReader : public CTestFixture + { +public: + // From CTestFixture + void SetupL(); + void TearDownL(); + + // Policy Reader Unit Test + void TestPolicyReaderL(); + + // Create a suite of all the tests + static CTestSuite* CreateSuiteL(const TDesC& aName); + +private: + TBool CheckPolicyL(const TDesC& aPolicySection); + void ReadExpectedValuesL(const TDesC& aPolicySection); + TBool CompareExpectedValues(const UserPromptService::CPolicy& aPolicy); + void CreatePolicyReaderL(const TDesC& aPolicyFile); + void TestPolicyListL(const TDesC& aPolicyFile); + + TInt iExpectedError; + TInt iSystemServerSecurity; + UserPromptService::CPolicyReader* iPolicyReader; + TInt iSidClasses; + RArray iSidList; + TPtrC iDestination; + TInt iOptions; + TUid iPolicyEvaluator; + TUid iDialogCreator; + TInt iMajorVersion; + TInt iMinorVersion; + TBool iDefault; + TInt iFlags; + RFs iFs; + }; + +#endif // TPOLICYREADER_H +