os/ossrv/lowlevellibsandfws/pluginfw/Test_Bed/DefaultLogOutputTest/DefaultLogOutputTransitions.inl
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // The implementation of the transition classes upon the CDefaultLogOutput class methods.
    15 // 
    16 //
    17 
    18 // ______________________________________________________________________________
    19 //
    20 _LIT(KDefaultLogOutputNewLTransition,"CDefaultLogOutput_NewL_Transition");
    21 
    22 inline CDefaultLogOutput_NewL_Transition::CDefaultLogOutput_NewL_Transition(CUnitTestContext& aUTContext,
    23 													TTransitionValidator& aValidator)
    24 : CTransitionType(KDefaultLogOutputNewLTransition, aUTContext, aValidator)
    25 	{
    26 	// Do nothing here.
    27 	}
    28 
    29 inline void CDefaultLogOutput_NewL_Transition::TransitMethodL()
    30 	{
    31 	_LIT(KDefaultLogOutputNewLTransitMethod, "CDefaultLogOutput::NewL transition");
    32 	_LIT(KTitle, "TestLogFile.html");
    33 	Context().DataLogger().LogInformation(KDefaultLogOutputNewLTransitMethod);
    34 	Context().iDefaultLogOutput = new(ELeave) CDefaultLogOutput(KTitle);
    35 	}
    36 
    37 inline CDefaultLogOutput_UnitTestContext& CDefaultLogOutput_NewL_Transition::Context() const
    38 	{
    39 	return REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext);
    40 	}
    41 
    42 // ______________________________________________________________________________
    43 //
    44 _LIT(KDefaultLogOutputDtorTransition,"CDefaultLogOutput_Dtor_Transition");
    45 
    46 inline CDefaultLogOutput_Dtor_Transition::CDefaultLogOutput_Dtor_Transition(CUnitTestContext& aUTContext,
    47 													TTransitionValidator& aValidator)
    48 : CTransition(KDefaultLogOutputDtorTransition, aUTContext, aValidator)
    49 	{
    50 	// Do nothing here.
    51 	}
    52 
    53 inline void CDefaultLogOutput_Dtor_Transition::TransitMethodL()
    54 	{
    55 	_LIT(KDefaultLogOutputDtorTransitMethod, "CDefaultLogOutput::Dtor transition");
    56 	Context().DataLogger().LogInformation(KDefaultLogOutputDtorTransitMethod);
    57 	delete Context().iDefaultLogOutput;
    58 	Context().iDefaultLogOutput = NULL;
    59 	}
    60 
    61 inline CDefaultLogOutput_UnitTestContext& CDefaultLogOutput_Dtor_Transition::Context() const
    62 	{
    63 	return REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext);
    64 	}
    65 
    66 // ______________________________________________________________________________
    67 //
    68 _LIT(KDefaultLogOutputOpenLTransition,"CDefaultLogOutput_OpenL_Transition");
    69 
    70 inline CDefaultLogOutput_OpenL_Transition::CDefaultLogOutput_OpenL_Transition(CUnitTestContext& aUTContext,
    71 													TTransitionValidator& aValidator)
    72 : CTransitionType(KDefaultLogOutputOpenLTransition, aUTContext, aValidator)
    73 	{
    74 	// Do nothing here.
    75 	}
    76 
    77 inline void CDefaultLogOutput_OpenL_Transition::TransitMethodL()
    78 	{
    79 	_LIT(KDefaultLogOutputOpenLTransitMethod, "CDefaultLogOutput::OpenL transition");
    80 	Context().DataLogger().LogInformation(KDefaultLogOutputOpenLTransitMethod);
    81 	Context().iDefaultLogOutput->OpenL();
    82 	}
    83 
    84 inline CDefaultLogOutput_UnitTestContext& CDefaultLogOutput_OpenL_Transition::Context() const
    85 	{
    86 	return REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext);
    87 	}
    88 
    89 // ______________________________________________________________________________
    90 //
    91 _LIT(KDefaultLogOutputCloseTransition,"CDefaultLogOutput_Close_Transition");
    92 
    93 inline CDefaultLogOutput_Close_Transition::CDefaultLogOutput_Close_Transition(CUnitTestContext& aUTContext,
    94 													TTransitionValidator& aValidator)
    95 : CTransition(KDefaultLogOutputCloseTransition, aUTContext, aValidator)
    96 	{
    97 	// Do nothing here.
    98 	}
    99 
   100 inline void CDefaultLogOutput_Close_Transition::TransitMethodL()
   101 	{
   102 	_LIT(KDefaultLogOutputCloseTransitMethod, "CDefaultLogOutput::Close transition");
   103 	Context().DataLogger().LogInformation(KDefaultLogOutputCloseTransitMethod);
   104 	Context().iDefaultLogOutput->Close();
   105 	}
   106 
   107 inline CDefaultLogOutput_UnitTestContext& CDefaultLogOutput_Close_Transition::Context() const
   108 	{
   109 	return REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext);
   110 	}
   111 
   112 // ______________________________________________________________________________
   113 //
   114 _LIT(KDefaultLogOutputWriteTransition,"CDefaultLogOutput_Write_Transition");
   115 
   116 inline CDefaultLogOutput_Write_Transition::CDefaultLogOutput_Write_Transition(CUnitTestContext& aUTContext,
   117 													TTransitionValidator& aValidator)
   118 : CTransition(KDefaultLogOutputWriteTransition, aUTContext, aValidator)
   119 	{
   120 	// Do nothing here.
   121 	}
   122 
   123 inline void CDefaultLogOutput_Write_Transition::TransitMethodL()
   124 	{
   125 	_LIT(KDefaultLogOutputWriteTransitMethod, "CDefaultLogOutput::Write transition");
   126 	Context().DataLogger().LogInformation(KDefaultLogOutputWriteTransitMethod);
   127 	Context().iDefaultLogOutput->Write(*(Context().iOutput));
   128 	}
   129 
   130 inline CDefaultLogOutput_UnitTestContext& CDefaultLogOutput_Write_Transition::Context() const
   131 	{
   132 	return REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext);
   133 	}
   134 
   135 // Add additional Transition class Implementations here...
   136