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 CUnitTest class methods.
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
// ______________________________________________________________________________
|
sl@0
|
19 |
//
|
sl@0
|
20 |
_LIT(KUnitTestNewLTransition,"CUnitTest_NewL_Transition");
|
sl@0
|
21 |
|
sl@0
|
22 |
inline CUnitTest_NewL_Transition::CUnitTest_NewL_Transition(CUnitTestContext& aUTContext,
|
sl@0
|
23 |
TTransitionValidator& aValidator)
|
sl@0
|
24 |
: CTransitionType(KUnitTestNewLTransition, aUTContext, aValidator)
|
sl@0
|
25 |
{
|
sl@0
|
26 |
// Do nothing here.
|
sl@0
|
27 |
}
|
sl@0
|
28 |
|
sl@0
|
29 |
inline void CUnitTest_NewL_Transition::TransitMethodL()
|
sl@0
|
30 |
{
|
sl@0
|
31 |
_LIT(KUnitTestNewLTransitMethod, "CUnitTest::NewL transition");
|
sl@0
|
32 |
Context().DataLogger().LogInformation(KUnitTestNewLTransitMethod);
|
sl@0
|
33 |
TUnitTest_StateAccessor& accessor = REINTERPRET_CAST(TUnitTest_StateAccessor&, Context().StateAccessor());
|
sl@0
|
34 |
Context().iUnitTestUnderTest = accessor.CreateUnitTest(*(Context().iUnitTest), *Context().iName, *Context().iDataLogger, *Context().iUnitTestObserver);
|
sl@0
|
35 |
}
|
sl@0
|
36 |
|
sl@0
|
37 |
inline CUnitTest_UnitTestContext& CUnitTest_NewL_Transition::Context() const
|
sl@0
|
38 |
{
|
sl@0
|
39 |
return REINTERPRET_CAST(CUnitTest_UnitTestContext&,iUTContext);
|
sl@0
|
40 |
}
|
sl@0
|
41 |
|
sl@0
|
42 |
// ______________________________________________________________________________
|
sl@0
|
43 |
//
|
sl@0
|
44 |
_LIT(KUnitTestDtorTransition,"CUnitTest_Dtor_Transition");
|
sl@0
|
45 |
|
sl@0
|
46 |
inline CUnitTest_Dtor_Transition::CUnitTest_Dtor_Transition(CUnitTestContext& aUTContext,
|
sl@0
|
47 |
TTransitionValidator& aValidator)
|
sl@0
|
48 |
: CTransition(KUnitTestDtorTransition, aUTContext, aValidator)
|
sl@0
|
49 |
{
|
sl@0
|
50 |
// Do nothing here.
|
sl@0
|
51 |
}
|
sl@0
|
52 |
|
sl@0
|
53 |
inline void CUnitTest_Dtor_Transition::TransitMethodL()
|
sl@0
|
54 |
{
|
sl@0
|
55 |
_LIT(KUnitTestDtorTransitMethod, "CUnitTest::Dtor transition");
|
sl@0
|
56 |
Context().DataLogger().LogInformation(KUnitTestDtorTransitMethod);
|
sl@0
|
57 |
delete Context().iUnitTest;
|
sl@0
|
58 |
Context().iUnitTest = NULL;
|
sl@0
|
59 |
}
|
sl@0
|
60 |
|
sl@0
|
61 |
inline CUnitTest_UnitTestContext& CUnitTest_Dtor_Transition::Context() const
|
sl@0
|
62 |
{
|
sl@0
|
63 |
return REINTERPRET_CAST(CUnitTest_UnitTestContext&,iUTContext);
|
sl@0
|
64 |
}
|
sl@0
|
65 |
|
sl@0
|
66 |
// ______________________________________________________________________________
|
sl@0
|
67 |
//
|
sl@0
|
68 |
_LIT(KUnitTestTransitionSetLTransition,"CUnitTest_TransitionSetL_Transition");
|
sl@0
|
69 |
|
sl@0
|
70 |
inline CUnitTest_TransitionSetL_Transition::CUnitTest_TransitionSetL_Transition(CUnitTestContext& aUTContext,
|
sl@0
|
71 |
TTransitionValidator& aValidator)
|
sl@0
|
72 |
: CTransitionType(KUnitTestTransitionSetLTransition, aUTContext, aValidator)
|
sl@0
|
73 |
{
|
sl@0
|
74 |
// Do nothing here.
|
sl@0
|
75 |
}
|
sl@0
|
76 |
|
sl@0
|
77 |
inline void CUnitTest_TransitionSetL_Transition::TransitMethodL()
|
sl@0
|
78 |
{
|
sl@0
|
79 |
_LIT(KUnitTestTransitionSetLTransitMethod, "CUnitTest::TransitionSetL transition");
|
sl@0
|
80 |
Context().DataLogger().LogInformation(KUnitTestTransitionSetLTransitMethod);
|
sl@0
|
81 |
Context().iUnitTestUnderTest->TransitionSetL();
|
sl@0
|
82 |
}
|
sl@0
|
83 |
|
sl@0
|
84 |
inline CUnitTest_UnitTestContext& CUnitTest_TransitionSetL_Transition::Context() const
|
sl@0
|
85 |
{
|
sl@0
|
86 |
return REINTERPRET_CAST(CUnitTest_UnitTestContext&,iUTContext);
|
sl@0
|
87 |
}
|
sl@0
|
88 |
|
sl@0
|
89 |
// ______________________________________________________________________________
|
sl@0
|
90 |
//
|
sl@0
|
91 |
_LIT(KUnitTestGetCurrentTransitionTransition,"CUnitTest_GetCurrentTransition_Transition");
|
sl@0
|
92 |
|
sl@0
|
93 |
inline CUnitTest_GetCurrentTransition_Transition::CUnitTest_GetCurrentTransition_Transition(CUnitTestContext& aUTContext,
|
sl@0
|
94 |
TTransitionValidator& aValidator)
|
sl@0
|
95 |
: CTransition(KUnitTestGetCurrentTransitionTransition, aUTContext, aValidator)
|
sl@0
|
96 |
{
|
sl@0
|
97 |
// Do nothing here.
|
sl@0
|
98 |
}
|
sl@0
|
99 |
|
sl@0
|
100 |
inline void CUnitTest_GetCurrentTransition_Transition::TransitMethodL()
|
sl@0
|
101 |
{
|
sl@0
|
102 |
_LIT(KUnitTestGetCurrentTransitionTransitMethod, "CUnitTest::GetCurrentTransition transition");
|
sl@0
|
103 |
Context().DataLogger().LogInformation(KUnitTestGetCurrentTransitionTransitMethod);
|
sl@0
|
104 |
/*Context().iCurrentTransition =*/ Context().iUnitTestUnderTest->GetCurrentTransition();
|
sl@0
|
105 |
}
|
sl@0
|
106 |
|
sl@0
|
107 |
inline CUnitTest_UnitTestContext& CUnitTest_GetCurrentTransition_Transition::Context() const
|
sl@0
|
108 |
{
|
sl@0
|
109 |
return REINTERPRET_CAST(CUnitTest_UnitTestContext&,iUTContext);
|
sl@0
|
110 |
}
|
sl@0
|
111 |
|
sl@0
|
112 |
// ______________________________________________________________________________
|
sl@0
|
113 |
//
|
sl@0
|
114 |
_LIT(KUnitTestSetCurrentTransitionTransition,"CUnitTest_SetCurrentTransition_Transition");
|
sl@0
|
115 |
|
sl@0
|
116 |
inline CUnitTest_SetCurrentTransition_Transition::CUnitTest_SetCurrentTransition_Transition(CUnitTestContext& aUTContext,
|
sl@0
|
117 |
TTransitionValidator& aValidator)
|
sl@0
|
118 |
: CTransition(KUnitTestSetCurrentTransitionTransition, aUTContext, aValidator)
|
sl@0
|
119 |
{
|
sl@0
|
120 |
// Do nothing here.
|
sl@0
|
121 |
}
|
sl@0
|
122 |
|
sl@0
|
123 |
inline void CUnitTest_SetCurrentTransition_Transition::TransitMethodL()
|
sl@0
|
124 |
{
|
sl@0
|
125 |
_LIT(KUnitTestSetCurrentTransitionTransitMethod, "CUnitTest::SetCurrentTransition transition");
|
sl@0
|
126 |
Context().DataLogger().LogInformation(KUnitTestSetCurrentTransitionTransitMethod);
|
sl@0
|
127 |
Context().iUnitTest->SetCurrentTransition(*(Context().iTransition));
|
sl@0
|
128 |
}
|
sl@0
|
129 |
|
sl@0
|
130 |
inline CUnitTest_UnitTestContext& CUnitTest_SetCurrentTransition_Transition::Context() const
|
sl@0
|
131 |
{
|
sl@0
|
132 |
return REINTERPRET_CAST(CUnitTest_UnitTestContext&,iUTContext);
|
sl@0
|
133 |
}
|
sl@0
|
134 |
|
sl@0
|
135 |
// ______________________________________________________________________________
|
sl@0
|
136 |
//
|
sl@0
|
137 |
_LIT(KUnitTestSetParametersLTransition,"CUnitTest_SetParametersL_Transition");
|
sl@0
|
138 |
|
sl@0
|
139 |
inline CUnitTest_SetParametersL_Transition::CUnitTest_SetParametersL_Transition(CUnitTestContext& aUTContext,
|
sl@0
|
140 |
TTransitionValidator& aValidator)
|
sl@0
|
141 |
: CTransitionType(KUnitTestSetParametersLTransition, aUTContext, aValidator)
|
sl@0
|
142 |
{
|
sl@0
|
143 |
// Do nothing here.
|
sl@0
|
144 |
}
|
sl@0
|
145 |
|
sl@0
|
146 |
inline void CUnitTest_SetParametersL_Transition::TransitMethodL()
|
sl@0
|
147 |
{
|
sl@0
|
148 |
_LIT(KUnitTestSetParametersLTransitMethod, "CUnitTest::SetParametersL transition");
|
sl@0
|
149 |
Context().DataLogger().LogInformation(KUnitTestSetParametersLTransitMethod);
|
sl@0
|
150 |
Context().iUnitTest->SetParametersL(Context().iParams);
|
sl@0
|
151 |
}
|
sl@0
|
152 |
|
sl@0
|
153 |
inline CUnitTest_UnitTestContext& CUnitTest_SetParametersL_Transition::Context() const
|
sl@0
|
154 |
{
|
sl@0
|
155 |
return REINTERPRET_CAST(CUnitTest_UnitTestContext&,iUTContext);
|
sl@0
|
156 |
}
|
sl@0
|
157 |
|
sl@0
|
158 |
// ______________________________________________________________________________
|
sl@0
|
159 |
//
|
sl@0
|
160 |
_LIT(KUnitTestPrepareUnitTestLTransition,"CUnitTest_PrepareUnitTestL_Transition");
|
sl@0
|
161 |
|
sl@0
|
162 |
inline CUnitTest_PrepareUnitTestL_Transition::CUnitTest_PrepareUnitTestL_Transition(CUnitTestContext& aUTContext,
|
sl@0
|
163 |
TTransitionValidator& aValidator)
|
sl@0
|
164 |
: CTransitionType(KUnitTestPrepareUnitTestLTransition, aUTContext, aValidator)
|
sl@0
|
165 |
{
|
sl@0
|
166 |
// Do nothing here.
|
sl@0
|
167 |
}
|
sl@0
|
168 |
|
sl@0
|
169 |
inline void CUnitTest_PrepareUnitTestL_Transition::TransitMethodL()
|
sl@0
|
170 |
{
|
sl@0
|
171 |
_LIT(KUnitTestPrepareUnitTestLTransitMethod, "CUnitTest::PrepareUnitTestL transition");
|
sl@0
|
172 |
Context().DataLogger().LogInformation(KUnitTestPrepareUnitTestLTransitMethod);
|
sl@0
|
173 |
Context().iUnitTest->PrepareUnitTestL();
|
sl@0
|
174 |
}
|
sl@0
|
175 |
|
sl@0
|
176 |
inline CUnitTest_UnitTestContext& CUnitTest_PrepareUnitTestL_Transition::Context() const
|
sl@0
|
177 |
{
|
sl@0
|
178 |
return REINTERPRET_CAST(CUnitTest_UnitTestContext&,iUTContext);
|
sl@0
|
179 |
}
|
sl@0
|
180 |
|
sl@0
|
181 |
// ______________________________________________________________________________
|
sl@0
|
182 |
//
|
sl@0
|
183 |
_LIT(KUnitTestRunTestTransition,"CUnitTest_RunTest_Transition");
|
sl@0
|
184 |
|
sl@0
|
185 |
inline CUnitTest_RunTest_Transition::CUnitTest_RunTest_Transition(CUnitTestContext& aUTContext,
|
sl@0
|
186 |
TTransitionValidator& aValidator)
|
sl@0
|
187 |
: CTransition(KUnitTestRunTestTransition, aUTContext, aValidator)
|
sl@0
|
188 |
{
|
sl@0
|
189 |
// Do nothing here.
|
sl@0
|
190 |
}
|
sl@0
|
191 |
|
sl@0
|
192 |
inline void CUnitTest_RunTest_Transition::TransitMethodL()
|
sl@0
|
193 |
{
|
sl@0
|
194 |
_LIT(KUnitTestRunTestTransitMethod, "CUnitTest::RunTest transition");
|
sl@0
|
195 |
Context().DataLogger().LogInformation(KUnitTestRunTestTransitMethod);
|
sl@0
|
196 |
Context().iUnitTest->RunTest(Context().iTimeAfter);
|
sl@0
|
197 |
}
|
sl@0
|
198 |
|
sl@0
|
199 |
inline CUnitTest_UnitTestContext& CUnitTest_RunTest_Transition::Context() const
|
sl@0
|
200 |
{
|
sl@0
|
201 |
return REINTERPRET_CAST(CUnitTest_UnitTestContext&,iUTContext);
|
sl@0
|
202 |
}
|
sl@0
|
203 |
|
sl@0
|
204 |
// ______________________________________________________________________________
|
sl@0
|
205 |
//
|
sl@0
|
206 |
_LIT(KUnitTestAddTransitionLTransition,"CUnitTest_AddTransitionL_Transition");
|
sl@0
|
207 |
|
sl@0
|
208 |
inline CUnitTest_AddTransitionL_Transition::CUnitTest_AddTransitionL_Transition(CUnitTestContext& aUTContext,
|
sl@0
|
209 |
TTransitionValidator& aValidator)
|
sl@0
|
210 |
: CTransitionType(KUnitTestAddTransitionLTransition, aUTContext, aValidator)
|
sl@0
|
211 |
{
|
sl@0
|
212 |
// Do nothing here.
|
sl@0
|
213 |
}
|
sl@0
|
214 |
|
sl@0
|
215 |
inline void CUnitTest_AddTransitionL_Transition::TransitMethodL()
|
sl@0
|
216 |
{
|
sl@0
|
217 |
_LIT(KUnitTestAddTransitionLTransitMethod, "CUnitTest::AddTransitionL transition");
|
sl@0
|
218 |
Context().DataLogger().LogInformation(KUnitTestAddTransitionLTransitMethod);
|
sl@0
|
219 |
TUnitTest_StateAccessor& accessor = REINTERPRET_CAST(TUnitTest_StateAccessor&, Context().StateAccessor());
|
sl@0
|
220 |
accessor.AddTransitionL(*(Context().iUnitTest), (Context().iTransition));
|
sl@0
|
221 |
}
|
sl@0
|
222 |
|
sl@0
|
223 |
inline CUnitTest_UnitTestContext& CUnitTest_AddTransitionL_Transition::Context() const
|
sl@0
|
224 |
{
|
sl@0
|
225 |
return REINTERPRET_CAST(CUnitTest_UnitTestContext&,iUTContext);
|
sl@0
|
226 |
}
|
sl@0
|
227 |
|
sl@0
|
228 |
// ______________________________________________________________________________
|
sl@0
|
229 |
//
|
sl@0
|
230 |
_LIT(KUnitTestAddBlockingTransitionLTransition,"CUnitTest_AddBlockingTransitionL_Transition");
|
sl@0
|
231 |
|
sl@0
|
232 |
inline CUnitTest_AddBlockingTransitionL_Transition::CUnitTest_AddBlockingTransitionL_Transition(CUnitTestContext& aUTContext,
|
sl@0
|
233 |
TTransitionValidator& aValidator)
|
sl@0
|
234 |
: CTransitionType(KUnitTestAddBlockingTransitionLTransition, aUTContext, aValidator)
|
sl@0
|
235 |
{
|
sl@0
|
236 |
// Do nothing here.
|
sl@0
|
237 |
}
|
sl@0
|
238 |
|
sl@0
|
239 |
inline void CUnitTest_AddBlockingTransitionL_Transition::TransitMethodL()
|
sl@0
|
240 |
{
|
sl@0
|
241 |
_LIT(KUnitTestAddBlockingTransitionLTransitMethod, "CUnitTest::AddBlockingTransitionL transition");
|
sl@0
|
242 |
Context().DataLogger().LogInformation(KUnitTestAddBlockingTransitionLTransitMethod);
|
sl@0
|
243 |
TUnitTest_StateAccessor& accessor = REINTERPRET_CAST(TUnitTest_StateAccessor&, Context().StateAccessor());
|
sl@0
|
244 |
accessor.AddBlockingTransitionL(*(Context().iUnitTest), (Context().iTransition));
|
sl@0
|
245 |
}
|
sl@0
|
246 |
|
sl@0
|
247 |
inline CUnitTest_UnitTestContext& CUnitTest_AddBlockingTransitionL_Transition::Context() const
|
sl@0
|
248 |
{
|
sl@0
|
249 |
return REINTERPRET_CAST(CUnitTest_UnitTestContext&,iUTContext);
|
sl@0
|
250 |
}
|
sl@0
|
251 |
|
sl@0
|
252 |
// ______________________________________________________________________________
|
sl@0
|
253 |
//
|
sl@0
|
254 |
_LIT(KUnitTestAddLeaveErrorCodeLTransition,"CUnitTest_AddLeaveErrorCodeL_Transition");
|
sl@0
|
255 |
|
sl@0
|
256 |
inline CUnitTest_AddLeaveErrorCodeL_Transition::CUnitTest_AddLeaveErrorCodeL_Transition(CUnitTestContext& aUTContext,
|
sl@0
|
257 |
TTransitionValidator& aValidator)
|
sl@0
|
258 |
: CTransitionType(KUnitTestAddLeaveErrorCodeLTransition, aUTContext, aValidator)
|
sl@0
|
259 |
{
|
sl@0
|
260 |
// Do nothing here.
|
sl@0
|
261 |
}
|
sl@0
|
262 |
|
sl@0
|
263 |
inline void CUnitTest_AddLeaveErrorCodeL_Transition::TransitMethodL()
|
sl@0
|
264 |
{
|
sl@0
|
265 |
_LIT(KUnitTestAddLeaveErrorCodeLTransitMethod, "CUnitTest::AddLeaveErrorCodeL transition");
|
sl@0
|
266 |
Context().DataLogger().LogInformation(KUnitTestAddLeaveErrorCodeLTransitMethod);
|
sl@0
|
267 |
TUnitTest_StateAccessor& accessor = REINTERPRET_CAST(TUnitTest_StateAccessor&, Context().StateAccessor());
|
sl@0
|
268 |
accessor.AddLeaveErrorCodeL(*(Context().iUnitTest), (Context().iLeaveErrorCode));
|
sl@0
|
269 |
}
|
sl@0
|
270 |
|
sl@0
|
271 |
inline CUnitTest_UnitTestContext& CUnitTest_AddLeaveErrorCodeL_Transition::Context() const
|
sl@0
|
272 |
{
|
sl@0
|
273 |
return REINTERPRET_CAST(CUnitTest_UnitTestContext&,iUTContext);
|
sl@0
|
274 |
}
|
sl@0
|
275 |
|
sl@0
|
276 |
// ______________________________________________________________________________
|
sl@0
|
277 |
//
|
sl@0
|
278 |
_LIT(KUnitTestUnitTestNameTransition,"CUnitTest_UnitTestName_Transition");
|
sl@0
|
279 |
|
sl@0
|
280 |
inline CUnitTest_UnitTestName_Transition::CUnitTest_UnitTestName_Transition(CUnitTestContext& aUTContext,
|
sl@0
|
281 |
TTransitionValidator& aValidator)
|
sl@0
|
282 |
: CTransition(KUnitTestUnitTestNameTransition, aUTContext, aValidator)
|
sl@0
|
283 |
{
|
sl@0
|
284 |
// Do nothing here.
|
sl@0
|
285 |
}
|
sl@0
|
286 |
|
sl@0
|
287 |
inline void CUnitTest_UnitTestName_Transition::TransitMethodL()
|
sl@0
|
288 |
{
|
sl@0
|
289 |
_LIT(KUnitTestUnitTestNameTransitMethod, "CUnitTest::UnitTestName transition");
|
sl@0
|
290 |
Context().DataLogger().LogInformation(KUnitTestUnitTestNameTransitMethod);
|
sl@0
|
291 |
Context().iUnitTest->UnitTestName();
|
sl@0
|
292 |
}
|
sl@0
|
293 |
|
sl@0
|
294 |
inline CUnitTest_UnitTestContext& CUnitTest_UnitTestName_Transition::Context() const
|
sl@0
|
295 |
{
|
sl@0
|
296 |
return REINTERPRET_CAST(CUnitTest_UnitTestContext&,iUTContext);
|
sl@0
|
297 |
}
|
sl@0
|
298 |
|
sl@0
|
299 |
|
sl@0
|
300 |
// Add additional Transition class Implementations here...
|
sl@0
|
301 |
|