os/ossrv/lowlevellibsandfws/pluginfw/Framework/BackupNotifierTest/BackupNotifierTransitions.inl
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // The implementation of the transition classes upon the CBackupNotifier class methods.
18 // ______________________________________________________________________________
20 _LIT(KBackupNotifierNewLTransition,"CBackupNotifier_NewL_Transition");
22 inline CBackupNotifier_NewL_Transition::CBackupNotifier_NewL_Transition(CUnitTestContext& aUTContext,
23 TTransitionValidator& aValidator)
24 : CTransitionType(KBackupNotifierNewLTransition, aUTContext, aValidator)
29 inline void CBackupNotifier_NewL_Transition::TransitMethodL()
31 _LIT(KBackupNotifierNewLTransitMethod, "CBackupNotifier::NewL transition");
32 Context().DataLogger().LogInformation(KBackupNotifierNewLTransitMethod);
33 Context().iBackupNotifier = CBackupNotifier::NewL(*(Context().iStub));
36 inline CBackupNotifier_UnitTestContext& CBackupNotifier_NewL_Transition::Context() const
38 return REINTERPRET_CAST(CBackupNotifier_UnitTestContext&,iUTContext);
41 // ______________________________________________________________________________
43 _LIT(KBackupNotifierDtorTransition,"CBackupNotifier_Dtor_Transition");
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)
55 inline void CBackupNotifier_Dtor_Transition::TransitMethodL()
57 _LIT(KBackupNotifierDtorTransitMethod, "CBackupNotifier::Dtor transition");
58 Context().DataLogger().LogInformation(KBackupNotifierDtorTransitMethod);
59 delete Context().iBackupNotifier;
60 Context().iBackupNotifier = NULL;
63 inline CBackupNotifier_UnitTestContext& CBackupNotifier_Dtor_Transition::Context() const
65 return REINTERPRET_CAST(CBackupNotifier_UnitTestContext&,iUTContext);
68 // Add additional Transition class Implementations here...