sl@0: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // The implementation of the transition classes upon the CDataLogger class methods. sl@0: // sl@0: // sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KDataLoggerNewLTransition,"CDataLogger_NewL_Transition"); sl@0: sl@0: inline CDataLogger_NewL_Transition::CDataLogger_NewL_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KDataLoggerNewLTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CDataLogger_NewL_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KDataLoggerNewLTransitMethod, "CDataLogger::NewL transition"); sl@0: Context().DataLogger().LogInformation(KDataLoggerNewLTransitMethod); sl@0: Context().iDataLogger = CDataLogger::NewL(Context().iLoggingInfo); sl@0: } sl@0: sl@0: inline CDataLogger_UnitTestContext& CDataLogger_NewL_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KDataLoggerDtorTransition,"CDataLogger_Dtor_Transition"); sl@0: sl@0: inline CDataLogger_Dtor_Transition::CDataLogger_Dtor_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransition(KDataLoggerDtorTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CDataLogger_Dtor_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KDataLoggerDtorTransitMethod, "CDataLogger::Dtor transition"); sl@0: Context().DataLogger().LogInformation(KDataLoggerDtorTransitMethod); sl@0: delete Context().iDataLogger; sl@0: Context().iDataLogger = NULL; sl@0: } sl@0: sl@0: inline CDataLogger_UnitTestContext& CDataLogger_Dtor_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KDataLoggerDumpMemoryBlockTransition,"CDataLogger_DumpMemoryBlock_Transition"); sl@0: sl@0: inline CDataLogger_DumpMemoryBlock_Transition::CDataLogger_DumpMemoryBlock_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransition(KDataLoggerDumpMemoryBlockTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CDataLogger_DumpMemoryBlock_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KDataLoggerDumpMemoryBlockTransitMethod, "CDataLogger::DumpMemoryBlock transition"); sl@0: Context().DataLogger().LogInformation(KDataLoggerDumpMemoryBlockTransitMethod); sl@0: Context().iDataLogger->DumpMemoryBlock(Context().iAddress, Context().iLength); sl@0: } sl@0: sl@0: inline CDataLogger_UnitTestContext& CDataLogger_DumpMemoryBlock_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KDataLoggerLogInformationTransition,"CDataLogger_LogInformation_Transition"); sl@0: sl@0: inline CDataLogger_LogInformation_Transition::CDataLogger_LogInformation_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransition(KDataLoggerLogInformationTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CDataLogger_LogInformation_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KDataLoggerLogInformationTransitMethod, "CDataLogger::LogInformation transition"); sl@0: _LIT(KComment, "This is a wide descriptor comment"); sl@0: Context().DataLogger().LogInformation(KDataLoggerLogInformationTransitMethod); sl@0: Context().iDataLogger->LogInformation(KComment); sl@0: } sl@0: sl@0: inline CDataLogger_UnitTestContext& CDataLogger_LogInformation_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KDataLoggerLogInformationNarrowTransition,"CDataLogger_LogInformationNarrow_Transition"); sl@0: sl@0: inline CDataLogger_LogInformationNarrow_Transition::CDataLogger_LogInformationNarrow_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransition(KDataLoggerLogInformationNarrowTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CDataLogger_LogInformationNarrow_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KDataLoggerLogInformationNarrowTransitMethod, "CDataLogger::LogInformationNarrow transition"); sl@0: _LIT8(KCommentNarrow, "This is a narrow descriptor comment"); sl@0: Context().DataLogger().LogInformation(KDataLoggerLogInformationNarrowTransitMethod); sl@0: Context().iDataLogger->LogInformation(KCommentNarrow); sl@0: } sl@0: sl@0: inline CDataLogger_UnitTestContext& CDataLogger_LogInformationNarrow_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KDataLoggerLogInformationWithParametersTransition,"CDataLogger_LogInformationWithParameters_Transition"); sl@0: sl@0: inline CDataLogger_LogInformationWithParameters_Transition::CDataLogger_LogInformationWithParameters_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransition(KDataLoggerLogInformationWithParametersTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CDataLogger_LogInformationWithParameters_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KDataLoggerLogInformationWithParametersTransitMethod, "CDataLogger::LogInformationWithParameters transition"); sl@0: _LIT(KFormat, "This text will be followed by a parameter: %S"); sl@0: Context().DataLogger().LogInformation(KDataLoggerLogInformationWithParametersTransitMethod); sl@0: Context().iDataLogger->LogInformationWithParameters(KFormat, Context().iArg); sl@0: } sl@0: sl@0: inline CDataLogger_UnitTestContext& CDataLogger_LogInformationWithParameters_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KDataLoggerLogInformationWithParametersNarrowTransition,"CDataLogger_LogInformationWithParametersNarrow_Transition"); sl@0: sl@0: inline CDataLogger_LogInformationWithParametersNarrow_Transition::CDataLogger_LogInformationWithParametersNarrow_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransition(KDataLoggerLogInformationWithParametersNarrowTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CDataLogger_LogInformationWithParametersNarrow_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KDataLoggerLogInformationWithParametersNarrowTransitMethod, "CDataLogger::LogInformationWithParametersNarrow transition"); sl@0: _LIT8(KFormatNarrow, "This text will be followed by a parameter: %S"); sl@0: Context().DataLogger().LogInformation(KDataLoggerLogInformationWithParametersNarrowTransitMethod); sl@0: Context().iDataLogger->LogInformationWithParameters(KFormatNarrow, Context().iArgNarrow); sl@0: } sl@0: sl@0: inline CDataLogger_UnitTestContext& CDataLogger_LogInformationWithParametersNarrow_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KDataLoggerReportInformationTransition,"CDataLogger_ReportInformation_Transition"); sl@0: sl@0: inline CDataLogger_ReportInformation_Transition::CDataLogger_ReportInformation_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransition(KDataLoggerReportInformationTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CDataLogger_ReportInformation_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KDataLoggerReportInformationTransitMethod, "CDataLogger::ReportInformation transition"); sl@0: Context().DataLogger().LogInformation(KDataLoggerReportInformationTransitMethod); sl@0: Context().iDataLogger->ReportInformation(*(Context().iReportComment)); sl@0: } sl@0: sl@0: inline CDataLogger_UnitTestContext& CDataLogger_ReportInformation_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KDataLoggerReportInformationWithParametersTransition,"CDataLogger_ReportInformationWithParameters_Transition"); sl@0: sl@0: inline CDataLogger_ReportInformationWithParameters_Transition::CDataLogger_ReportInformationWithParameters_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransition(KDataLoggerReportInformationWithParametersTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CDataLogger_ReportInformationWithParameters_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KDataLoggerReportInformationWithParametersTransitMethod, "CDataLogger::ReportInformationWithParameters transition"); sl@0: Context().DataLogger().LogInformation(KDataLoggerReportInformationWithParametersTransitMethod); sl@0: Context().iDataLogger->ReportInformationWithParameters(*(Context().iFormatReport), Context().iReportArg); sl@0: } sl@0: sl@0: inline CDataLogger_UnitTestContext& CDataLogger_ReportInformationWithParameters_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: sl@0: // Add additional Transition class Implementations here... sl@0: