lowlevellibsandfws/pluginfw/Test_Bed/ComponentInfoTest/ComponentInfoUnitTestContext.inl
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // The context for the unit tests upon the CComponentInfo class methods.
       
    15 // 
       
    16 //
       
    17 
       
    18 #include "ComponentInfoTransitions.h"
       
    19 
       
    20 // ______________________________________________________________________________
       
    21 //
       
    22 inline CComponentInfo_UnitTestContext::CComponentInfo_UnitTestContext(CDataLogger& aDataLogger,
       
    23 												MStateAccessor& aStateAccessor,
       
    24 												MTransitionObserver& aObserver)
       
    25 : CUnitTestContext(aDataLogger, aStateAccessor, aObserver)
       
    26 	{
       
    27 	//Do nothing
       
    28 	}
       
    29 
       
    30 inline CComponentInfo_UnitTestContext::~CComponentInfo_UnitTestContext()
       
    31 	{
       
    32 	delete iComponentInfo;
       
    33 
       
    34 	// Only delete iEntry & iTestInfoArray if we didn't pass ownership to 
       
    35 	// the CComponentInfo that we are testing
       
    36 	if(iOwnParams)
       
    37 		{
       
    38 		iEntryFunc = 0;
       
    39 		if(iTestInfoArray)
       
    40 			{
       
    41 			iTestInfoArray->ResetAndDestroy();
       
    42 			delete iTestInfoArray;
       
    43 			}
       
    44 		}
       
    45 	}
       
    46