os/ossrv/lowlevellibsandfws/pluginfw/Test_Bed/DefaultLogOutputTest/DefaultLogOutputTransitions.inl
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/lowlevellibsandfws/pluginfw/Test_Bed/DefaultLogOutputTest/DefaultLogOutputTransitions.inl Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,136 @@
1.4 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// The implementation of the transition classes upon the CDefaultLogOutput class methods.
1.18 +//
1.19 +//
1.20 +
1.21 +// ______________________________________________________________________________
1.22 +//
1.23 +_LIT(KDefaultLogOutputNewLTransition,"CDefaultLogOutput_NewL_Transition");
1.24 +
1.25 +inline CDefaultLogOutput_NewL_Transition::CDefaultLogOutput_NewL_Transition(CUnitTestContext& aUTContext,
1.26 + TTransitionValidator& aValidator)
1.27 +: CTransitionType(KDefaultLogOutputNewLTransition, aUTContext, aValidator)
1.28 + {
1.29 + // Do nothing here.
1.30 + }
1.31 +
1.32 +inline void CDefaultLogOutput_NewL_Transition::TransitMethodL()
1.33 + {
1.34 + _LIT(KDefaultLogOutputNewLTransitMethod, "CDefaultLogOutput::NewL transition");
1.35 + _LIT(KTitle, "TestLogFile.html");
1.36 + Context().DataLogger().LogInformation(KDefaultLogOutputNewLTransitMethod);
1.37 + Context().iDefaultLogOutput = new(ELeave) CDefaultLogOutput(KTitle);
1.38 + }
1.39 +
1.40 +inline CDefaultLogOutput_UnitTestContext& CDefaultLogOutput_NewL_Transition::Context() const
1.41 + {
1.42 + return REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext);
1.43 + }
1.44 +
1.45 +// ______________________________________________________________________________
1.46 +//
1.47 +_LIT(KDefaultLogOutputDtorTransition,"CDefaultLogOutput_Dtor_Transition");
1.48 +
1.49 +inline CDefaultLogOutput_Dtor_Transition::CDefaultLogOutput_Dtor_Transition(CUnitTestContext& aUTContext,
1.50 + TTransitionValidator& aValidator)
1.51 +: CTransition(KDefaultLogOutputDtorTransition, aUTContext, aValidator)
1.52 + {
1.53 + // Do nothing here.
1.54 + }
1.55 +
1.56 +inline void CDefaultLogOutput_Dtor_Transition::TransitMethodL()
1.57 + {
1.58 + _LIT(KDefaultLogOutputDtorTransitMethod, "CDefaultLogOutput::Dtor transition");
1.59 + Context().DataLogger().LogInformation(KDefaultLogOutputDtorTransitMethod);
1.60 + delete Context().iDefaultLogOutput;
1.61 + Context().iDefaultLogOutput = NULL;
1.62 + }
1.63 +
1.64 +inline CDefaultLogOutput_UnitTestContext& CDefaultLogOutput_Dtor_Transition::Context() const
1.65 + {
1.66 + return REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext);
1.67 + }
1.68 +
1.69 +// ______________________________________________________________________________
1.70 +//
1.71 +_LIT(KDefaultLogOutputOpenLTransition,"CDefaultLogOutput_OpenL_Transition");
1.72 +
1.73 +inline CDefaultLogOutput_OpenL_Transition::CDefaultLogOutput_OpenL_Transition(CUnitTestContext& aUTContext,
1.74 + TTransitionValidator& aValidator)
1.75 +: CTransitionType(KDefaultLogOutputOpenLTransition, aUTContext, aValidator)
1.76 + {
1.77 + // Do nothing here.
1.78 + }
1.79 +
1.80 +inline void CDefaultLogOutput_OpenL_Transition::TransitMethodL()
1.81 + {
1.82 + _LIT(KDefaultLogOutputOpenLTransitMethod, "CDefaultLogOutput::OpenL transition");
1.83 + Context().DataLogger().LogInformation(KDefaultLogOutputOpenLTransitMethod);
1.84 + Context().iDefaultLogOutput->OpenL();
1.85 + }
1.86 +
1.87 +inline CDefaultLogOutput_UnitTestContext& CDefaultLogOutput_OpenL_Transition::Context() const
1.88 + {
1.89 + return REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext);
1.90 + }
1.91 +
1.92 +// ______________________________________________________________________________
1.93 +//
1.94 +_LIT(KDefaultLogOutputCloseTransition,"CDefaultLogOutput_Close_Transition");
1.95 +
1.96 +inline CDefaultLogOutput_Close_Transition::CDefaultLogOutput_Close_Transition(CUnitTestContext& aUTContext,
1.97 + TTransitionValidator& aValidator)
1.98 +: CTransition(KDefaultLogOutputCloseTransition, aUTContext, aValidator)
1.99 + {
1.100 + // Do nothing here.
1.101 + }
1.102 +
1.103 +inline void CDefaultLogOutput_Close_Transition::TransitMethodL()
1.104 + {
1.105 + _LIT(KDefaultLogOutputCloseTransitMethod, "CDefaultLogOutput::Close transition");
1.106 + Context().DataLogger().LogInformation(KDefaultLogOutputCloseTransitMethod);
1.107 + Context().iDefaultLogOutput->Close();
1.108 + }
1.109 +
1.110 +inline CDefaultLogOutput_UnitTestContext& CDefaultLogOutput_Close_Transition::Context() const
1.111 + {
1.112 + return REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext);
1.113 + }
1.114 +
1.115 +// ______________________________________________________________________________
1.116 +//
1.117 +_LIT(KDefaultLogOutputWriteTransition,"CDefaultLogOutput_Write_Transition");
1.118 +
1.119 +inline CDefaultLogOutput_Write_Transition::CDefaultLogOutput_Write_Transition(CUnitTestContext& aUTContext,
1.120 + TTransitionValidator& aValidator)
1.121 +: CTransition(KDefaultLogOutputWriteTransition, aUTContext, aValidator)
1.122 + {
1.123 + // Do nothing here.
1.124 + }
1.125 +
1.126 +inline void CDefaultLogOutput_Write_Transition::TransitMethodL()
1.127 + {
1.128 + _LIT(KDefaultLogOutputWriteTransitMethod, "CDefaultLogOutput::Write transition");
1.129 + Context().DataLogger().LogInformation(KDefaultLogOutputWriteTransitMethod);
1.130 + Context().iDefaultLogOutput->Write(*(Context().iOutput));
1.131 + }
1.132 +
1.133 +inline CDefaultLogOutput_UnitTestContext& CDefaultLogOutput_Write_Transition::Context() const
1.134 + {
1.135 + return REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext);
1.136 + }
1.137 +
1.138 +// Add additional Transition class Implementations here...
1.139 +