os/ossrv/lowlevellibsandfws/pluginfw/Test_Bed/DataLoggerTest/DataLoggerTransitions.inl
Update contrib.
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 CDataLogger class methods.
18 // ______________________________________________________________________________
20 _LIT(KDataLoggerNewLTransition,"CDataLogger_NewL_Transition");
22 inline CDataLogger_NewL_Transition::CDataLogger_NewL_Transition(CUnitTestContext& aUTContext,
23 TTransitionValidator& aValidator)
24 : CTransitionType(KDataLoggerNewLTransition, aUTContext, aValidator)
29 inline void CDataLogger_NewL_Transition::TransitMethodL()
31 _LIT(KDataLoggerNewLTransitMethod, "CDataLogger::NewL transition");
32 Context().DataLogger().LogInformation(KDataLoggerNewLTransitMethod);
33 Context().iDataLogger = CDataLogger::NewL(Context().iLoggingInfo);
36 inline CDataLogger_UnitTestContext& CDataLogger_NewL_Transition::Context() const
38 return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext);
41 // ______________________________________________________________________________
43 _LIT(KDataLoggerDtorTransition,"CDataLogger_Dtor_Transition");
45 inline CDataLogger_Dtor_Transition::CDataLogger_Dtor_Transition(CUnitTestContext& aUTContext,
46 TTransitionValidator& aValidator)
47 : CTransition(KDataLoggerDtorTransition, aUTContext, aValidator)
52 inline void CDataLogger_Dtor_Transition::TransitMethodL()
54 _LIT(KDataLoggerDtorTransitMethod, "CDataLogger::Dtor transition");
55 Context().DataLogger().LogInformation(KDataLoggerDtorTransitMethod);
56 delete Context().iDataLogger;
57 Context().iDataLogger = NULL;
60 inline CDataLogger_UnitTestContext& CDataLogger_Dtor_Transition::Context() const
62 return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext);
65 // ______________________________________________________________________________
67 _LIT(KDataLoggerDumpMemoryBlockTransition,"CDataLogger_DumpMemoryBlock_Transition");
69 inline CDataLogger_DumpMemoryBlock_Transition::CDataLogger_DumpMemoryBlock_Transition(CUnitTestContext& aUTContext,
70 TTransitionValidator& aValidator)
71 : CTransition(KDataLoggerDumpMemoryBlockTransition, aUTContext, aValidator)
76 inline void CDataLogger_DumpMemoryBlock_Transition::TransitMethodL()
78 _LIT(KDataLoggerDumpMemoryBlockTransitMethod, "CDataLogger::DumpMemoryBlock transition");
79 Context().DataLogger().LogInformation(KDataLoggerDumpMemoryBlockTransitMethod);
80 Context().iDataLogger->DumpMemoryBlock(Context().iAddress, Context().iLength);
83 inline CDataLogger_UnitTestContext& CDataLogger_DumpMemoryBlock_Transition::Context() const
85 return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext);
88 // ______________________________________________________________________________
90 _LIT(KDataLoggerLogInformationTransition,"CDataLogger_LogInformation_Transition");
92 inline CDataLogger_LogInformation_Transition::CDataLogger_LogInformation_Transition(CUnitTestContext& aUTContext,
93 TTransitionValidator& aValidator)
94 : CTransition(KDataLoggerLogInformationTransition, aUTContext, aValidator)
99 inline void CDataLogger_LogInformation_Transition::TransitMethodL()
101 _LIT(KDataLoggerLogInformationTransitMethod, "CDataLogger::LogInformation transition");
102 _LIT(KComment, "This is a wide descriptor comment");
103 Context().DataLogger().LogInformation(KDataLoggerLogInformationTransitMethod);
104 Context().iDataLogger->LogInformation(KComment);
107 inline CDataLogger_UnitTestContext& CDataLogger_LogInformation_Transition::Context() const
109 return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext);
113 // ______________________________________________________________________________
115 _LIT(KDataLoggerLogInformationNarrowTransition,"CDataLogger_LogInformationNarrow_Transition");
117 inline CDataLogger_LogInformationNarrow_Transition::CDataLogger_LogInformationNarrow_Transition(CUnitTestContext& aUTContext,
118 TTransitionValidator& aValidator)
119 : CTransition(KDataLoggerLogInformationNarrowTransition, aUTContext, aValidator)
124 inline void CDataLogger_LogInformationNarrow_Transition::TransitMethodL()
126 _LIT(KDataLoggerLogInformationNarrowTransitMethod, "CDataLogger::LogInformationNarrow transition");
127 _LIT8(KCommentNarrow, "This is a narrow descriptor comment");
128 Context().DataLogger().LogInformation(KDataLoggerLogInformationNarrowTransitMethod);
129 Context().iDataLogger->LogInformation(KCommentNarrow);
132 inline CDataLogger_UnitTestContext& CDataLogger_LogInformationNarrow_Transition::Context() const
134 return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext);
137 // ______________________________________________________________________________
139 _LIT(KDataLoggerLogInformationWithParametersTransition,"CDataLogger_LogInformationWithParameters_Transition");
141 inline CDataLogger_LogInformationWithParameters_Transition::CDataLogger_LogInformationWithParameters_Transition(CUnitTestContext& aUTContext,
142 TTransitionValidator& aValidator)
143 : CTransition(KDataLoggerLogInformationWithParametersTransition, aUTContext, aValidator)
148 inline void CDataLogger_LogInformationWithParameters_Transition::TransitMethodL()
150 _LIT(KDataLoggerLogInformationWithParametersTransitMethod, "CDataLogger::LogInformationWithParameters transition");
151 _LIT(KFormat, "This text will be followed by a parameter: %S");
152 Context().DataLogger().LogInformation(KDataLoggerLogInformationWithParametersTransitMethod);
153 Context().iDataLogger->LogInformationWithParameters(KFormat, Context().iArg);
156 inline CDataLogger_UnitTestContext& CDataLogger_LogInformationWithParameters_Transition::Context() const
158 return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext);
161 // ______________________________________________________________________________
163 _LIT(KDataLoggerLogInformationWithParametersNarrowTransition,"CDataLogger_LogInformationWithParametersNarrow_Transition");
165 inline CDataLogger_LogInformationWithParametersNarrow_Transition::CDataLogger_LogInformationWithParametersNarrow_Transition(CUnitTestContext& aUTContext,
166 TTransitionValidator& aValidator)
167 : CTransition(KDataLoggerLogInformationWithParametersNarrowTransition, aUTContext, aValidator)
172 inline void CDataLogger_LogInformationWithParametersNarrow_Transition::TransitMethodL()
174 _LIT(KDataLoggerLogInformationWithParametersNarrowTransitMethod, "CDataLogger::LogInformationWithParametersNarrow transition");
175 _LIT8(KFormatNarrow, "This text will be followed by a parameter: %S");
176 Context().DataLogger().LogInformation(KDataLoggerLogInformationWithParametersNarrowTransitMethod);
177 Context().iDataLogger->LogInformationWithParameters(KFormatNarrow, Context().iArgNarrow);
180 inline CDataLogger_UnitTestContext& CDataLogger_LogInformationWithParametersNarrow_Transition::Context() const
182 return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext);
186 // ______________________________________________________________________________
188 _LIT(KDataLoggerReportInformationTransition,"CDataLogger_ReportInformation_Transition");
190 inline CDataLogger_ReportInformation_Transition::CDataLogger_ReportInformation_Transition(CUnitTestContext& aUTContext,
191 TTransitionValidator& aValidator)
192 : CTransition(KDataLoggerReportInformationTransition, aUTContext, aValidator)
197 inline void CDataLogger_ReportInformation_Transition::TransitMethodL()
199 _LIT(KDataLoggerReportInformationTransitMethod, "CDataLogger::ReportInformation transition");
200 Context().DataLogger().LogInformation(KDataLoggerReportInformationTransitMethod);
201 Context().iDataLogger->ReportInformation(*(Context().iReportComment));
204 inline CDataLogger_UnitTestContext& CDataLogger_ReportInformation_Transition::Context() const
206 return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext);
210 // ______________________________________________________________________________
212 _LIT(KDataLoggerReportInformationWithParametersTransition,"CDataLogger_ReportInformationWithParameters_Transition");
214 inline CDataLogger_ReportInformationWithParameters_Transition::CDataLogger_ReportInformationWithParameters_Transition(CUnitTestContext& aUTContext,
215 TTransitionValidator& aValidator)
216 : CTransition(KDataLoggerReportInformationWithParametersTransition, aUTContext, aValidator)
221 inline void CDataLogger_ReportInformationWithParameters_Transition::TransitMethodL()
223 _LIT(KDataLoggerReportInformationWithParametersTransitMethod, "CDataLogger::ReportInformationWithParameters transition");
224 Context().DataLogger().LogInformation(KDataLoggerReportInformationWithParametersTransitMethod);
225 Context().iDataLogger->ReportInformationWithParameters(*(Context().iFormatReport), Context().iReportArg);
228 inline CDataLogger_UnitTestContext& CDataLogger_ReportInformationWithParameters_Transition::Context() const
230 return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext);
234 // Add additional Transition class Implementations here...