lowlevellibsandfws/pluginfw/Test_Bed/ComponentInfoTest/ComponentInfoUnitTestContext.inl
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 03 May 2010 14:06:43 +0300
changeset 22 ddc455616bd6
parent 0 e4d67989cc36
permissions -rw-r--r--
Revision: 201018 Kit: 201018

// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "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:
// The context for the unit tests upon the CComponentInfo class methods.
// 
//

#include "ComponentInfoTransitions.h"

// ______________________________________________________________________________
//
inline CComponentInfo_UnitTestContext::CComponentInfo_UnitTestContext(CDataLogger& aDataLogger,
												MStateAccessor& aStateAccessor,
												MTransitionObserver& aObserver)
: CUnitTestContext(aDataLogger, aStateAccessor, aObserver)
	{
	//Do nothing
	}

inline CComponentInfo_UnitTestContext::~CComponentInfo_UnitTestContext()
	{
	delete iComponentInfo;

	// Only delete iEntry & iTestInfoArray if we didn't pass ownership to 
	// the CComponentInfo that we are testing
	if(iOwnParams)
		{
		iEntryFunc = 0;
		if(iTestInfoArray)
			{
			iTestInfoArray->ResetAndDestroy();
			delete iTestInfoArray;
			}
		}
	}