installationservices/swcomponentregistry/test/tscr/inc/subsessionsteps.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 19 Mar 2010 09:33:35 +0200
changeset 24 84a16765cd86
child 25 98b66e4fb0be
permissions -rw-r--r--
Revision: 201007 Kit: 201011

/*
* Copyright (c) 2008-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: 
* Defines the basic test step for the Software Component Registry test harness
*
*/


/**
 @file 
 @internalComponent
 @test
*/

#ifndef SUBSESSIONSTEPS_H
#define SUBSESSIONSTEPS_H

#include "tscrstep.h"
class CScrTestServer;

_LIT(KScrComponentRegistrySubsessionStep, "ScrComponentRegistrySubsession");
_LIT(KScrFileListSubsessionStep, "ScrFileListSubsession");

class CScrComponentRegistrySubsessionStep : public CScrTestStep
/**
 	TEF test step which exercises the SCR RSoftwareComponentRegistryView interface
 */
	{
public:
	 CScrComponentRegistrySubsessionStep(CScrTestServer& aParent);
			
protected:
	// From CScrTestStep
	void ImplTestStepPreambleL();
	void ImplTestStepL();
	void ImplTestStepPostambleL();
private:	
	void TestSingleModeL(const Usif::RSoftwareComponentRegistryView& aSubSession, RPointerArray<Usif::CComponentEntry>& aExpectedEntries);
	void TestSetModeL(const Usif::RSoftwareComponentRegistryView& aSubSession, TInt aSetSize, RPointerArray<Usif::CComponentEntry>& aExpectedEntries);
	void VerifyNonReturnedEntriesL(const RPointerArray<Usif::CComponentEntry>& aExpectedEntries);
	void GetComponentEntriesFromConfigL(RPointerArray<Usif::CComponentEntry>& aEntries);
	};

class CScrFileListSubsessionStep : public CScrTestStep
/**
 	TEF test step which exercises the SCR RSoftwareComponentRegistryFilesList interface
 */
	{
public:
	CScrFileListSubsessionStep(CScrTestServer& aParent);
			
protected:
	// From CScrTestStep
	void ImplTestStepPreambleL();
	void ImplTestStepL();
	void ImplTestStepPostambleL();
private:
	void TestSingleModeL(const Usif::RSoftwareComponentRegistryFilesList& aSubSession, RPointerArray<HBufC>& expectedFiles);
	void TestSetModeL(const Usif::RSoftwareComponentRegistryFilesList& aSubSession, TInt aSetSize, RPointerArray<HBufC>& expectedFiles);
	void VerifyNonReturnedFilesL(const RPointerArray<HBufC>& aExpectedFiles);
	void ReportUnexpectedFileL(const TDesC& aUnexpectedFileName);
	};

#endif /* SUBSESSIONSTEPS_H */