os/ossrv/lowlevellibsandfws/pluginfw/Test_Bed/DefaultLogOutputTest/DefaultLogOutputTransitions.inl
First public contribution.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // The implementation of the transition classes upon the CDefaultLogOutput class methods.
18 // ______________________________________________________________________________
20 _LIT(KDefaultLogOutputNewLTransition,"CDefaultLogOutput_NewL_Transition");
22 inline CDefaultLogOutput_NewL_Transition::CDefaultLogOutput_NewL_Transition(CUnitTestContext& aUTContext,
23 TTransitionValidator& aValidator)
24 : CTransitionType(KDefaultLogOutputNewLTransition, aUTContext, aValidator)
29 inline void CDefaultLogOutput_NewL_Transition::TransitMethodL()
31 _LIT(KDefaultLogOutputNewLTransitMethod, "CDefaultLogOutput::NewL transition");
32 _LIT(KTitle, "TestLogFile.html");
33 Context().DataLogger().LogInformation(KDefaultLogOutputNewLTransitMethod);
34 Context().iDefaultLogOutput = new(ELeave) CDefaultLogOutput(KTitle);
37 inline CDefaultLogOutput_UnitTestContext& CDefaultLogOutput_NewL_Transition::Context() const
39 return REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext);
42 // ______________________________________________________________________________
44 _LIT(KDefaultLogOutputDtorTransition,"CDefaultLogOutput_Dtor_Transition");
46 inline CDefaultLogOutput_Dtor_Transition::CDefaultLogOutput_Dtor_Transition(CUnitTestContext& aUTContext,
47 TTransitionValidator& aValidator)
48 : CTransition(KDefaultLogOutputDtorTransition, aUTContext, aValidator)
53 inline void CDefaultLogOutput_Dtor_Transition::TransitMethodL()
55 _LIT(KDefaultLogOutputDtorTransitMethod, "CDefaultLogOutput::Dtor transition");
56 Context().DataLogger().LogInformation(KDefaultLogOutputDtorTransitMethod);
57 delete Context().iDefaultLogOutput;
58 Context().iDefaultLogOutput = NULL;
61 inline CDefaultLogOutput_UnitTestContext& CDefaultLogOutput_Dtor_Transition::Context() const
63 return REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext);
66 // ______________________________________________________________________________
68 _LIT(KDefaultLogOutputOpenLTransition,"CDefaultLogOutput_OpenL_Transition");
70 inline CDefaultLogOutput_OpenL_Transition::CDefaultLogOutput_OpenL_Transition(CUnitTestContext& aUTContext,
71 TTransitionValidator& aValidator)
72 : CTransitionType(KDefaultLogOutputOpenLTransition, aUTContext, aValidator)
77 inline void CDefaultLogOutput_OpenL_Transition::TransitMethodL()
79 _LIT(KDefaultLogOutputOpenLTransitMethod, "CDefaultLogOutput::OpenL transition");
80 Context().DataLogger().LogInformation(KDefaultLogOutputOpenLTransitMethod);
81 Context().iDefaultLogOutput->OpenL();
84 inline CDefaultLogOutput_UnitTestContext& CDefaultLogOutput_OpenL_Transition::Context() const
86 return REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext);
89 // ______________________________________________________________________________
91 _LIT(KDefaultLogOutputCloseTransition,"CDefaultLogOutput_Close_Transition");
93 inline CDefaultLogOutput_Close_Transition::CDefaultLogOutput_Close_Transition(CUnitTestContext& aUTContext,
94 TTransitionValidator& aValidator)
95 : CTransition(KDefaultLogOutputCloseTransition, aUTContext, aValidator)
100 inline void CDefaultLogOutput_Close_Transition::TransitMethodL()
102 _LIT(KDefaultLogOutputCloseTransitMethod, "CDefaultLogOutput::Close transition");
103 Context().DataLogger().LogInformation(KDefaultLogOutputCloseTransitMethod);
104 Context().iDefaultLogOutput->Close();
107 inline CDefaultLogOutput_UnitTestContext& CDefaultLogOutput_Close_Transition::Context() const
109 return REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext);
112 // ______________________________________________________________________________
114 _LIT(KDefaultLogOutputWriteTransition,"CDefaultLogOutput_Write_Transition");
116 inline CDefaultLogOutput_Write_Transition::CDefaultLogOutput_Write_Transition(CUnitTestContext& aUTContext,
117 TTransitionValidator& aValidator)
118 : CTransition(KDefaultLogOutputWriteTransition, aUTContext, aValidator)
123 inline void CDefaultLogOutput_Write_Transition::TransitMethodL()
125 _LIT(KDefaultLogOutputWriteTransitMethod, "CDefaultLogOutput::Write transition");
126 Context().DataLogger().LogInformation(KDefaultLogOutputWriteTransitMethod);
127 Context().iDefaultLogOutput->Write(*(Context().iOutput));
130 inline CDefaultLogOutput_UnitTestContext& CDefaultLogOutput_Write_Transition::Context() const
132 return REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext);
135 // Add additional Transition class Implementations here...