os/ossrv/lowlevellibsandfws/pluginfw/Framework/BackupNotifierTest/BackupNotifierTransitions.inl
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 2001-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 implementation of the transition classes upon the CBackupNotifier class methods.
    15 // 
    16 //
    17 
    18 // ______________________________________________________________________________
    19 //
    20 _LIT(KBackupNotifierNewLTransition,"CBackupNotifier_NewL_Transition");
    21 
    22 inline CBackupNotifier_NewL_Transition::CBackupNotifier_NewL_Transition(CUnitTestContext& aUTContext,
    23 													TTransitionValidator& aValidator)
    24 : CTransitionType(KBackupNotifierNewLTransition, aUTContext, aValidator)
    25 	{
    26 	// Do nothing here.
    27 	}
    28 
    29 inline void CBackupNotifier_NewL_Transition::TransitMethodL()
    30 	{
    31 	_LIT(KBackupNotifierNewLTransitMethod, "CBackupNotifier::NewL transition");
    32 	Context().DataLogger().LogInformation(KBackupNotifierNewLTransitMethod);
    33 	Context().iBackupNotifier = CBackupNotifier::NewL(*(Context().iStub));
    34 	}
    35 
    36 inline CBackupNotifier_UnitTestContext& CBackupNotifier_NewL_Transition::Context() const
    37 	{
    38 	return REINTERPRET_CAST(CBackupNotifier_UnitTestContext&,iUTContext);
    39 	}
    40 
    41 // ______________________________________________________________________________
    42 //
    43 _LIT(KBackupNotifierDtorTransition,"CBackupNotifier_Dtor_Transition");
    44 
    45 // WARNING : It is not recommended that CLeakTestTransitions
    46 // are used on Dtor methods, so if CTransitionType is defined as CLeakTestTransition
    47 // it is suggested that this Dtor transition's base is changed explicitly to CTransition
    48 inline CBackupNotifier_Dtor_Transition::CBackupNotifier_Dtor_Transition(CUnitTestContext& aUTContext,
    49 													TTransitionValidator& aValidator)
    50 : CTransitionType(KBackupNotifierDtorTransition, aUTContext, aValidator)
    51 	{
    52 	// Do nothing here.
    53 	}
    54 
    55 inline void CBackupNotifier_Dtor_Transition::TransitMethodL()
    56 	{
    57 	_LIT(KBackupNotifierDtorTransitMethod, "CBackupNotifier::Dtor transition");
    58 	Context().DataLogger().LogInformation(KBackupNotifierDtorTransitMethod);
    59 	delete Context().iBackupNotifier;
    60 	Context().iBackupNotifier = NULL;
    61 	}
    62 
    63 inline CBackupNotifier_UnitTestContext& CBackupNotifier_Dtor_Transition::Context() const
    64 	{
    65 	return REINTERPRET_CAST(CBackupNotifier_UnitTestContext&,iUTContext);
    66 	}
    67 
    68 // Add additional Transition class Implementations here...
    69