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 CDefaultLogOutput class methods. sl@0: // sl@0: // sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KDefaultLogOutputNewLTransition,"CDefaultLogOutput_NewL_Transition"); sl@0: sl@0: inline CDefaultLogOutput_NewL_Transition::CDefaultLogOutput_NewL_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KDefaultLogOutputNewLTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CDefaultLogOutput_NewL_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KDefaultLogOutputNewLTransitMethod, "CDefaultLogOutput::NewL transition"); sl@0: _LIT(KTitle, "TestLogFile.html"); sl@0: Context().DataLogger().LogInformation(KDefaultLogOutputNewLTransitMethod); sl@0: Context().iDefaultLogOutput = new(ELeave) CDefaultLogOutput(KTitle); sl@0: } sl@0: sl@0: inline CDefaultLogOutput_UnitTestContext& CDefaultLogOutput_NewL_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KDefaultLogOutputDtorTransition,"CDefaultLogOutput_Dtor_Transition"); sl@0: sl@0: inline CDefaultLogOutput_Dtor_Transition::CDefaultLogOutput_Dtor_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransition(KDefaultLogOutputDtorTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CDefaultLogOutput_Dtor_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KDefaultLogOutputDtorTransitMethod, "CDefaultLogOutput::Dtor transition"); sl@0: Context().DataLogger().LogInformation(KDefaultLogOutputDtorTransitMethod); sl@0: delete Context().iDefaultLogOutput; sl@0: Context().iDefaultLogOutput = NULL; sl@0: } sl@0: sl@0: inline CDefaultLogOutput_UnitTestContext& CDefaultLogOutput_Dtor_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KDefaultLogOutputOpenLTransition,"CDefaultLogOutput_OpenL_Transition"); sl@0: sl@0: inline CDefaultLogOutput_OpenL_Transition::CDefaultLogOutput_OpenL_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KDefaultLogOutputOpenLTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CDefaultLogOutput_OpenL_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KDefaultLogOutputOpenLTransitMethod, "CDefaultLogOutput::OpenL transition"); sl@0: Context().DataLogger().LogInformation(KDefaultLogOutputOpenLTransitMethod); sl@0: Context().iDefaultLogOutput->OpenL(); sl@0: } sl@0: sl@0: inline CDefaultLogOutput_UnitTestContext& CDefaultLogOutput_OpenL_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KDefaultLogOutputCloseTransition,"CDefaultLogOutput_Close_Transition"); sl@0: sl@0: inline CDefaultLogOutput_Close_Transition::CDefaultLogOutput_Close_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransition(KDefaultLogOutputCloseTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CDefaultLogOutput_Close_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KDefaultLogOutputCloseTransitMethod, "CDefaultLogOutput::Close transition"); sl@0: Context().DataLogger().LogInformation(KDefaultLogOutputCloseTransitMethod); sl@0: Context().iDefaultLogOutput->Close(); sl@0: } sl@0: sl@0: inline CDefaultLogOutput_UnitTestContext& CDefaultLogOutput_Close_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KDefaultLogOutputWriteTransition,"CDefaultLogOutput_Write_Transition"); sl@0: sl@0: inline CDefaultLogOutput_Write_Transition::CDefaultLogOutput_Write_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransition(KDefaultLogOutputWriteTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CDefaultLogOutput_Write_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KDefaultLogOutputWriteTransitMethod, "CDefaultLogOutput::Write transition"); sl@0: Context().DataLogger().LogInformation(KDefaultLogOutputWriteTransitMethod); sl@0: Context().iDefaultLogOutput->Write(*(Context().iOutput)); sl@0: } sl@0: sl@0: inline CDefaultLogOutput_UnitTestContext& CDefaultLogOutput_Write_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // Add additional Transition class Implementations here... sl@0: