os/ossrv/lowlevellibsandfws/pluginfw/Test_Bed/DataLoggerTest/DataLoggerTransitions.inl
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// The implementation of the transition classes upon the CDataLogger class methods.
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
// ______________________________________________________________________________
sl@0
    19
//
sl@0
    20
_LIT(KDataLoggerNewLTransition,"CDataLogger_NewL_Transition");
sl@0
    21
sl@0
    22
inline CDataLogger_NewL_Transition::CDataLogger_NewL_Transition(CUnitTestContext& aUTContext,
sl@0
    23
													TTransitionValidator& aValidator)
sl@0
    24
: CTransitionType(KDataLoggerNewLTransition, aUTContext, aValidator)
sl@0
    25
	{
sl@0
    26
	// Do nothing here.
sl@0
    27
	}
sl@0
    28
sl@0
    29
inline void CDataLogger_NewL_Transition::TransitMethodL()
sl@0
    30
	{
sl@0
    31
	_LIT(KDataLoggerNewLTransitMethod, "CDataLogger::NewL transition");
sl@0
    32
	Context().DataLogger().LogInformation(KDataLoggerNewLTransitMethod);
sl@0
    33
	Context().iDataLogger = CDataLogger::NewL(Context().iLoggingInfo);
sl@0
    34
	}
sl@0
    35
sl@0
    36
inline CDataLogger_UnitTestContext& CDataLogger_NewL_Transition::Context() const
sl@0
    37
	{
sl@0
    38
	return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext);
sl@0
    39
	}
sl@0
    40
sl@0
    41
// ______________________________________________________________________________
sl@0
    42
//
sl@0
    43
_LIT(KDataLoggerDtorTransition,"CDataLogger_Dtor_Transition");
sl@0
    44
sl@0
    45
inline CDataLogger_Dtor_Transition::CDataLogger_Dtor_Transition(CUnitTestContext& aUTContext,
sl@0
    46
													TTransitionValidator& aValidator)
sl@0
    47
: CTransition(KDataLoggerDtorTransition, aUTContext, aValidator)
sl@0
    48
	{
sl@0
    49
	// Do nothing here.
sl@0
    50
	}
sl@0
    51
sl@0
    52
inline void CDataLogger_Dtor_Transition::TransitMethodL()
sl@0
    53
	{
sl@0
    54
	_LIT(KDataLoggerDtorTransitMethod, "CDataLogger::Dtor transition");
sl@0
    55
	Context().DataLogger().LogInformation(KDataLoggerDtorTransitMethod);
sl@0
    56
	delete Context().iDataLogger;
sl@0
    57
	Context().iDataLogger = NULL;
sl@0
    58
	}
sl@0
    59
sl@0
    60
inline CDataLogger_UnitTestContext& CDataLogger_Dtor_Transition::Context() const
sl@0
    61
	{
sl@0
    62
	return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext);
sl@0
    63
	}
sl@0
    64
sl@0
    65
// ______________________________________________________________________________
sl@0
    66
//
sl@0
    67
_LIT(KDataLoggerDumpMemoryBlockTransition,"CDataLogger_DumpMemoryBlock_Transition");
sl@0
    68
sl@0
    69
inline CDataLogger_DumpMemoryBlock_Transition::CDataLogger_DumpMemoryBlock_Transition(CUnitTestContext& aUTContext,
sl@0
    70
													TTransitionValidator& aValidator)
sl@0
    71
: CTransition(KDataLoggerDumpMemoryBlockTransition, aUTContext, aValidator)
sl@0
    72
	{
sl@0
    73
	// Do nothing here.
sl@0
    74
	}
sl@0
    75
sl@0
    76
inline void CDataLogger_DumpMemoryBlock_Transition::TransitMethodL()
sl@0
    77
	{
sl@0
    78
	_LIT(KDataLoggerDumpMemoryBlockTransitMethod, "CDataLogger::DumpMemoryBlock transition");
sl@0
    79
	Context().DataLogger().LogInformation(KDataLoggerDumpMemoryBlockTransitMethod);
sl@0
    80
	Context().iDataLogger->DumpMemoryBlock(Context().iAddress, Context().iLength);
sl@0
    81
	}
sl@0
    82
sl@0
    83
inline CDataLogger_UnitTestContext& CDataLogger_DumpMemoryBlock_Transition::Context() const
sl@0
    84
	{
sl@0
    85
	return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext);
sl@0
    86
	}
sl@0
    87
sl@0
    88
// ______________________________________________________________________________
sl@0
    89
//
sl@0
    90
_LIT(KDataLoggerLogInformationTransition,"CDataLogger_LogInformation_Transition");
sl@0
    91
sl@0
    92
inline CDataLogger_LogInformation_Transition::CDataLogger_LogInformation_Transition(CUnitTestContext& aUTContext,
sl@0
    93
													TTransitionValidator& aValidator)
sl@0
    94
: CTransition(KDataLoggerLogInformationTransition, aUTContext, aValidator)
sl@0
    95
	{
sl@0
    96
	// Do nothing here.
sl@0
    97
	}
sl@0
    98
sl@0
    99
inline void CDataLogger_LogInformation_Transition::TransitMethodL()
sl@0
   100
	{
sl@0
   101
	_LIT(KDataLoggerLogInformationTransitMethod, "CDataLogger::LogInformation transition");
sl@0
   102
	_LIT(KComment, "This is a wide descriptor comment");
sl@0
   103
	Context().DataLogger().LogInformation(KDataLoggerLogInformationTransitMethod);
sl@0
   104
	Context().iDataLogger->LogInformation(KComment);
sl@0
   105
	}
sl@0
   106
sl@0
   107
inline CDataLogger_UnitTestContext& CDataLogger_LogInformation_Transition::Context() const
sl@0
   108
	{
sl@0
   109
	return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext);
sl@0
   110
	}
sl@0
   111
sl@0
   112
sl@0
   113
// ______________________________________________________________________________
sl@0
   114
//
sl@0
   115
_LIT(KDataLoggerLogInformationNarrowTransition,"CDataLogger_LogInformationNarrow_Transition");
sl@0
   116
sl@0
   117
inline CDataLogger_LogInformationNarrow_Transition::CDataLogger_LogInformationNarrow_Transition(CUnitTestContext& aUTContext,
sl@0
   118
													TTransitionValidator& aValidator)
sl@0
   119
: CTransition(KDataLoggerLogInformationNarrowTransition, aUTContext, aValidator)
sl@0
   120
	{
sl@0
   121
	// Do nothing here.
sl@0
   122
	}
sl@0
   123
sl@0
   124
inline void CDataLogger_LogInformationNarrow_Transition::TransitMethodL()
sl@0
   125
	{
sl@0
   126
	_LIT(KDataLoggerLogInformationNarrowTransitMethod, "CDataLogger::LogInformationNarrow transition");
sl@0
   127
	_LIT8(KCommentNarrow, "This is a narrow descriptor comment");
sl@0
   128
	Context().DataLogger().LogInformation(KDataLoggerLogInformationNarrowTransitMethod);
sl@0
   129
	Context().iDataLogger->LogInformation(KCommentNarrow);
sl@0
   130
	}
sl@0
   131
sl@0
   132
inline CDataLogger_UnitTestContext& CDataLogger_LogInformationNarrow_Transition::Context() const
sl@0
   133
	{
sl@0
   134
	return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext);
sl@0
   135
	}
sl@0
   136
sl@0
   137
// ______________________________________________________________________________
sl@0
   138
//
sl@0
   139
_LIT(KDataLoggerLogInformationWithParametersTransition,"CDataLogger_LogInformationWithParameters_Transition");
sl@0
   140
sl@0
   141
inline CDataLogger_LogInformationWithParameters_Transition::CDataLogger_LogInformationWithParameters_Transition(CUnitTestContext& aUTContext,
sl@0
   142
													TTransitionValidator& aValidator)
sl@0
   143
: CTransition(KDataLoggerLogInformationWithParametersTransition, aUTContext, aValidator)
sl@0
   144
	{
sl@0
   145
	// Do nothing here.
sl@0
   146
	}
sl@0
   147
sl@0
   148
inline void CDataLogger_LogInformationWithParameters_Transition::TransitMethodL()
sl@0
   149
	{
sl@0
   150
	_LIT(KDataLoggerLogInformationWithParametersTransitMethod, "CDataLogger::LogInformationWithParameters transition");
sl@0
   151
	_LIT(KFormat, "This text will be followed by a parameter: %S");
sl@0
   152
	Context().DataLogger().LogInformation(KDataLoggerLogInformationWithParametersTransitMethod);
sl@0
   153
	Context().iDataLogger->LogInformationWithParameters(KFormat, Context().iArg);
sl@0
   154
	}
sl@0
   155
sl@0
   156
inline CDataLogger_UnitTestContext& CDataLogger_LogInformationWithParameters_Transition::Context() const
sl@0
   157
	{
sl@0
   158
	return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext);
sl@0
   159
	}
sl@0
   160
sl@0
   161
// ______________________________________________________________________________
sl@0
   162
//
sl@0
   163
_LIT(KDataLoggerLogInformationWithParametersNarrowTransition,"CDataLogger_LogInformationWithParametersNarrow_Transition");
sl@0
   164
sl@0
   165
inline CDataLogger_LogInformationWithParametersNarrow_Transition::CDataLogger_LogInformationWithParametersNarrow_Transition(CUnitTestContext& aUTContext,
sl@0
   166
													TTransitionValidator& aValidator)
sl@0
   167
: CTransition(KDataLoggerLogInformationWithParametersNarrowTransition, aUTContext, aValidator)
sl@0
   168
	{
sl@0
   169
	// Do nothing here.
sl@0
   170
	}
sl@0
   171
sl@0
   172
inline void CDataLogger_LogInformationWithParametersNarrow_Transition::TransitMethodL()
sl@0
   173
	{
sl@0
   174
	_LIT(KDataLoggerLogInformationWithParametersNarrowTransitMethod, "CDataLogger::LogInformationWithParametersNarrow transition");
sl@0
   175
	_LIT8(KFormatNarrow, "This text will be followed by a parameter: %S");
sl@0
   176
	Context().DataLogger().LogInformation(KDataLoggerLogInformationWithParametersNarrowTransitMethod);
sl@0
   177
	Context().iDataLogger->LogInformationWithParameters(KFormatNarrow, Context().iArgNarrow);
sl@0
   178
	}
sl@0
   179
sl@0
   180
inline CDataLogger_UnitTestContext& CDataLogger_LogInformationWithParametersNarrow_Transition::Context() const
sl@0
   181
	{
sl@0
   182
	return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext);
sl@0
   183
	}
sl@0
   184
sl@0
   185
sl@0
   186
// ______________________________________________________________________________
sl@0
   187
//
sl@0
   188
_LIT(KDataLoggerReportInformationTransition,"CDataLogger_ReportInformation_Transition");
sl@0
   189
sl@0
   190
inline CDataLogger_ReportInformation_Transition::CDataLogger_ReportInformation_Transition(CUnitTestContext& aUTContext,
sl@0
   191
													TTransitionValidator& aValidator)
sl@0
   192
: CTransition(KDataLoggerReportInformationTransition, aUTContext, aValidator)
sl@0
   193
	{
sl@0
   194
	// Do nothing here.
sl@0
   195
	}
sl@0
   196
sl@0
   197
inline void CDataLogger_ReportInformation_Transition::TransitMethodL()
sl@0
   198
	{
sl@0
   199
	_LIT(KDataLoggerReportInformationTransitMethod, "CDataLogger::ReportInformation transition");
sl@0
   200
	Context().DataLogger().LogInformation(KDataLoggerReportInformationTransitMethod);
sl@0
   201
	Context().iDataLogger->ReportInformation(*(Context().iReportComment));
sl@0
   202
	}
sl@0
   203
sl@0
   204
inline CDataLogger_UnitTestContext& CDataLogger_ReportInformation_Transition::Context() const
sl@0
   205
	{
sl@0
   206
	return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext);
sl@0
   207
	}
sl@0
   208
sl@0
   209
sl@0
   210
// ______________________________________________________________________________
sl@0
   211
//
sl@0
   212
_LIT(KDataLoggerReportInformationWithParametersTransition,"CDataLogger_ReportInformationWithParameters_Transition");
sl@0
   213
sl@0
   214
inline CDataLogger_ReportInformationWithParameters_Transition::CDataLogger_ReportInformationWithParameters_Transition(CUnitTestContext& aUTContext,
sl@0
   215
													TTransitionValidator& aValidator)
sl@0
   216
: CTransition(KDataLoggerReportInformationWithParametersTransition, aUTContext, aValidator)
sl@0
   217
	{
sl@0
   218
	// Do nothing here.
sl@0
   219
	}
sl@0
   220
sl@0
   221
inline void CDataLogger_ReportInformationWithParameters_Transition::TransitMethodL()
sl@0
   222
	{
sl@0
   223
	_LIT(KDataLoggerReportInformationWithParametersTransitMethod, "CDataLogger::ReportInformationWithParameters transition");
sl@0
   224
	Context().DataLogger().LogInformation(KDataLoggerReportInformationWithParametersTransitMethod);
sl@0
   225
	Context().iDataLogger->ReportInformationWithParameters(*(Context().iFormatReport), Context().iReportArg);
sl@0
   226
	}
sl@0
   227
sl@0
   228
inline CDataLogger_UnitTestContext& CDataLogger_ReportInformationWithParameters_Transition::Context() const
sl@0
   229
	{
sl@0
   230
	return REINTERPRET_CAST(CDataLogger_UnitTestContext&,iUTContext);
sl@0
   231
	}
sl@0
   232
sl@0
   233
sl@0
   234
// Add additional Transition class Implementations here...
sl@0
   235