os/security/authorisation/userpromptservice/policies/test/tupspolicies/source/tupsplugins.h
Update contrib.
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
25 #include <test/tefunit.h>
26 #include <ups/promptrequest.h>
27 #include <ups/upsdb.h>
28 #include <ups/dialogcreator.h>
29 #include <ups/fingerprint.h>
30 #include <ups/policyevaluator.h>
32 #include "activewaiter.h"
33 #include "pluginmanager.h"
34 #include "policycache.h"
37 class CTestPlugins : public CActiveTestFixture, public MActiveWaiterObserver
44 // Implement MActiveWaiterObserver
47 // Policy Evaluator Unit Test
49 void TestPluginManagerL();
53 // Create a suite of all the tests
54 static CTestSuite* CreateSuiteL(const TDesC& aName);
63 TInt iPolicyEvaluator;
65 TBuf8<32> iClientEntity;
68 TBool DoRequestL(const TExpectedValue& aExpected, const UserPromptService::CPromptRequest& aRequest);
69 TBool DoOomRequestL(const TExpectedValue& aExpected, const UserPromptService::CPromptRequest& aRequest);
71 UserPromptService::CPromptRequest* GetRequestParamsLC(const TDesC& aSection, const TDesC8& aClientEntity);
72 void GetResponseL(const TDesC& aSection);
73 TBool CheckPolicyL(const TExpectedValue& aExpected, const UserPromptService::CPolicy* aPolicy);
74 void GetExpectedValuesL(const TDesC& aSection);
75 void LoadTestDataL(TInt aNumRequests);
77 UserPromptService::CPolicy::TOptions iResponse;
78 UserPromptService::CDecisionRecord* iDecisionRecord;
80 CActiveWaiter* iActiveWaiter;
83 RPointerArray<UserPromptService::CPromptRequest> iRequests;
84 RPointerArray<TExpectedValue> iExpectedValues;
85 TBool iOom; ///< Whether an OOM test is running
86 TBool iInteractive; ///< Whether to display the techview dialog
89 #endif // TUPSPLUGINS_H