|
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 definitions of the transition classes upon the CUnitTest class methods. |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __UNITTESTTRANSITIONS_H__ |
|
19 #define __UNITTESTTRANSITIONS_H__ |
|
20 |
|
21 #include "TestUtilities.h" |
|
22 #include "StateAccessor.h" |
|
23 #include "LeakTestTransition.h" |
|
24 #include <ecom/test_bed/datalogger.h> |
|
25 #include <ecom/test_bed/unittest.h> |
|
26 #include "UnitTestStateAccessor.h" |
|
27 #include <ecom/test_bed/unittest.h> |
|
28 |
|
29 #define CTransitionType CLeakTestTransition |
|
30 |
|
31 // ______________________________________________________________________________ |
|
32 // |
|
33 /** |
|
34 @internalComponent |
|
35 |
|
36 Comments : Provide all the CUnitTest specific |
|
37 parameters and behaviour on the CUnitTest |
|
38 test class for a transition. |
|
39 */ |
|
40 class CUnitTest_UnitTestContext : public CUnitTestContext |
|
41 { |
|
42 public: |
|
43 /** |
|
44 @fn CUnitTest_UnitTestContext(CDataLogger& aDataLogger, |
|
45 MStateAccessor& aStateAccessor, |
|
46 MTransitionObserver& aObserver) |
|
47 Intended Usage : Default constructor. |
|
48 Error Condition : None. |
|
49 @since 7.0 |
|
50 @param aDataLogger The output logging object. |
|
51 @param aObserver The observer of this UnitTest's Transitions. |
|
52 @param aStateAccessor WhiteBox state access to the CUnitTest class under test. |
|
53 @pre None. |
|
54 @post CUnitTest_UnitTestContext is fully constructed, and initialised. |
|
55 */ |
|
56 inline CUnitTest_UnitTestContext(CDataLogger& aDataLogger, |
|
57 MStateAccessor& aStateAccessor, |
|
58 MTransitionObserver& aObserver); |
|
59 |
|
60 /** |
|
61 @fn ~CUnitTest_UnitTestContext() |
|
62 Intended Usage : Default Destructor |
|
63 @since 7.0 |
|
64 @pre CUnitTest_UnitTestContext is fully constructed. |
|
65 @post CUnitTest_UnitTestContext is fully destroyed |
|
66 */ |
|
67 virtual inline ~CUnitTest_UnitTestContext(); |
|
68 |
|
69 |
|
70 CUnitTest* iUnitTest; |
|
71 // CUnitTestTestDerivation* iUnitTestDerived; |
|
72 const TDesC* iName; |
|
73 CDataLogger* iDataLogger; |
|
74 MUnitTestObserver* iUnitTestObserver; |
|
75 TTimeIntervalMicroSeconds32 iTimeAfter; |
|
76 CTransition* iTransition; |
|
77 TAny* iParams; |
|
78 CUnitTestTestDerivation* iUnitTestUnderTest; |
|
79 CTransition* iCurrentTransition; |
|
80 TInt iLeaveErrorCode; |
|
81 |
|
82 }; // CUnitTest_UnitTestContext |
|
83 |
|
84 // ______________________________________________________________________________ |
|
85 // |
|
86 /** |
|
87 @internalComponent |
|
88 |
|
89 Comments : Transition test of the CUnitTest::NewL method. |
|
90 */ |
|
91 class CUnitTest_NewL_Transition : public CTransitionType |
|
92 { |
|
93 public: |
|
94 /** |
|
95 @fn CUnitTest_NewL_Transition(CUnitTestContext& aUTContext, |
|
96 TTransitionValidator& aValidator) |
|
97 Intended Usage : Standard c'tor method. |
|
98 Error Condition : None. |
|
99 @since 7.0 |
|
100 @param aUTContext The context this transition is operating in. |
|
101 @param aValidator Used for checking the pre & post conditions of the test object. |
|
102 @pre None. |
|
103 @post CUnitTest_NewL_Transition is fully constructed. |
|
104 */ |
|
105 CUnitTest_NewL_Transition(CUnitTestContext& aUTContext, |
|
106 TTransitionValidator& aValidator); |
|
107 /** |
|
108 @fn TransitMethodL() |
|
109 Intended Usage : To execute the CUnitTest::NewL method for the test harness. |
|
110 Error Condition : Leaves with an error code. |
|
111 @leave KErrNoMemory, (@see CUnitTest::NewL) |
|
112 @since 7.0 |
|
113 @return None |
|
114 @pre CUnitTest_NewL_Transition is fully constructed. |
|
115 @post No change in the CUnitTest_NewL_Transition apart |
|
116 from iUnitTest, which may have changed state. |
|
117 (@see CUnitTest::NewL post-condition) for iUnitTest's new state. |
|
118 */ |
|
119 inline void TransitMethodL(); |
|
120 |
|
121 /** |
|
122 @fn Context() const |
|
123 Intended Usage : To provide access to the unit test context cast to the correct type. |
|
124 Error Condition : None. |
|
125 @since 7.0 |
|
126 @return The unit test context cast to a CUnitTest_UnitTestContext |
|
127 @pre iUTContext is a valid CUnitTest_UnitTestContext. |
|
128 @post No change in the CUnitTest_NewL_Transition |
|
129 */ |
|
130 inline CUnitTest_UnitTestContext& Context() const; |
|
131 }; // CUnitTest_NewL_Transition |
|
132 |
|
133 // ______________________________________________________________________________ |
|
134 // |
|
135 /** |
|
136 @internalComponent |
|
137 |
|
138 Comments : Transition test of the CUnitTest::Dtor method. |
|
139 */ |
|
140 class CUnitTest_Dtor_Transition : public CTransition |
|
141 { |
|
142 public: |
|
143 /** |
|
144 @fn CUnitTest_Dtor_Transition(CUnitTestContext& aUTContext, |
|
145 TTransitionValidator& aValidator) |
|
146 Intended Usage : Standard c'tor method. |
|
147 Error Condition : None. |
|
148 @since 7.0 |
|
149 @param aUTContext The context this transition is operating in. |
|
150 @param aValidator Used for checking the pre & post conditions of the test object. |
|
151 @pre None. |
|
152 @post CUnitTest_Dtor_Transition is fully constructed. |
|
153 */ |
|
154 CUnitTest_Dtor_Transition(CUnitTestContext& aUTContext, |
|
155 TTransitionValidator& aValidator); |
|
156 /** |
|
157 @fn TransitMethodL() |
|
158 Intended Usage : To execute the CUnitTest::Dtor method for the test harness. |
|
159 Error Condition : Leaves with an error code. |
|
160 @leave KErrNoMemory, (@see CUnitTest::Dtor) |
|
161 @since 7.0 |
|
162 @return None |
|
163 @pre CUnitTest_Dtor_Transition is fully constructed. |
|
164 @post No change in the CUnitTest_Dtor_Transition apart |
|
165 from iUnitTest, which may have changed state. |
|
166 (@see CUnitTest::Dtor post-condition) for iUnitTest's new state. |
|
167 */ |
|
168 inline void TransitMethodL(); |
|
169 |
|
170 /** |
|
171 @fn Context() const |
|
172 Intended Usage : To provide access to the unit test context cast to the correct type. |
|
173 Error Condition : None. |
|
174 @since 7.0 |
|
175 @return The unit test context cast to a CUnitTest_UnitTestContext |
|
176 @pre iUTContext is a valid CUnitTest_UnitTestContext. |
|
177 @post No change in the CUnitTest_Dtor_Transition |
|
178 */ |
|
179 inline CUnitTest_UnitTestContext& Context() const; |
|
180 }; // CUnitTest_Dtor_Transition |
|
181 |
|
182 // ______________________________________________________________________________ |
|
183 // |
|
184 /** |
|
185 @internalComponent |
|
186 |
|
187 Comments : Transition test of the CUnitTest::TransitionSetL method. |
|
188 */ |
|
189 class CUnitTest_TransitionSetL_Transition : public CTransitionType |
|
190 { |
|
191 public: |
|
192 /** |
|
193 @fn CUnitTest_TransitionSetL_Transition(CUnitTestContext& aUTContext, |
|
194 TTransitionValidator& aValidator) |
|
195 Intended Usage : Standard c'tor method. |
|
196 Error Condition : None. |
|
197 @since 7.0 |
|
198 @param aUTContext The context this transition is operating in. |
|
199 @param aValidator Used for checking the pre & post conditions of the test object. |
|
200 @pre None. |
|
201 @post CUnitTest_TransitionSetL_Transition is fully constructed. |
|
202 */ |
|
203 CUnitTest_TransitionSetL_Transition(CUnitTestContext& aUTContext, |
|
204 TTransitionValidator& aValidator); |
|
205 /** |
|
206 @fn TransitMethodL() |
|
207 Intended Usage : To execute the CUnitTest::TransitionSetL method for the test harness. |
|
208 Error Condition : Leaves with an error code. |
|
209 @leave KErrNoMemory, (@see CUnitTest::TransitionSetL) |
|
210 @since 7.0 |
|
211 @return None |
|
212 @pre CUnitTest_TransitionSetL_Transition is fully constructed. |
|
213 @post No change in the CUnitTest_TransitionSetL_Transition apart |
|
214 from iUnitTest, which may have changed state. |
|
215 (@see CUnitTest::TransitionSetL post-condition) for iUnitTest's new state. |
|
216 */ |
|
217 inline void TransitMethodL(); |
|
218 |
|
219 /** |
|
220 @fn Context() const |
|
221 Intended Usage : To provide access to the unit test context cast to the correct type. |
|
222 Error Condition : None. |
|
223 @since 7.0 |
|
224 @return The unit test context cast to a CUnitTest_UnitTestContext |
|
225 @pre iUTContext is a valid CUnitTest_UnitTestContext. |
|
226 @post No change in the CUnitTest_TransitionSetL_Transition |
|
227 */ |
|
228 inline CUnitTest_UnitTestContext& Context() const; |
|
229 }; // CUnitTest_TransitionSetL_Transition |
|
230 |
|
231 // ______________________________________________________________________________ |
|
232 // |
|
233 /** |
|
234 @internalComponent |
|
235 |
|
236 Comments : Transition test of the CUnitTest::GetCurrentTransition method. |
|
237 */ |
|
238 class CUnitTest_GetCurrentTransition_Transition : public CTransition |
|
239 { |
|
240 public: |
|
241 /** |
|
242 @fn CUnitTest_GetCurrentTransition_Transition(CUnitTestContext& aUTContext, |
|
243 TTransitionValidator& aValidator) |
|
244 Intended Usage : Standard c'tor method. |
|
245 Error Condition : None. |
|
246 @since 7.0 |
|
247 @param aUTContext The context this transition is operating in. |
|
248 @param aValidator Used for checking the pre & post conditions of the test object. |
|
249 @pre None. |
|
250 @post CUnitTest_GetCurrentTransition_Transition is fully constructed. |
|
251 */ |
|
252 CUnitTest_GetCurrentTransition_Transition(CUnitTestContext& aUTContext, |
|
253 TTransitionValidator& aValidator); |
|
254 /** |
|
255 @fn TransitMethodL() |
|
256 Intended Usage : To execute the CUnitTest::GetCurrentTransition method for the test harness. |
|
257 Error Condition : Leaves with an error code. |
|
258 @leave KErrNoMemory, (@see CUnitTest::GetCurrentTransition) |
|
259 @since 7.0 |
|
260 @return None |
|
261 @pre CUnitTest_GetCurrentTransition_Transition is fully constructed. |
|
262 @post No change in the CUnitTest_GetCurrentTransition_Transition apart |
|
263 from iUnitTest, which may have changed state. |
|
264 (@see CUnitTest::GetCurrentTransition post-condition) for iUnitTest's new state. |
|
265 */ |
|
266 inline void TransitMethodL(); |
|
267 |
|
268 /** |
|
269 @fn Context() const |
|
270 Intended Usage : To provide access to the unit test context cast to the correct type. |
|
271 Error Condition : None. |
|
272 @since 7.0 |
|
273 @return The unit test context cast to a CUnitTest_UnitTestContext |
|
274 @pre iUTContext is a valid CUnitTest_UnitTestContext. |
|
275 @post No change in the CUnitTest_GetCurrentTransition_Transition |
|
276 */ |
|
277 inline CUnitTest_UnitTestContext& Context() const; |
|
278 }; // CUnitTest_GetCurrentTransition_Transition |
|
279 |
|
280 // ______________________________________________________________________________ |
|
281 // |
|
282 /** |
|
283 @internalComponent |
|
284 |
|
285 Comments : Transition test of the CUnitTest::SetCurrentTransition method. |
|
286 */ |
|
287 class CUnitTest_SetCurrentTransition_Transition : public CTransition |
|
288 { |
|
289 public: |
|
290 /** |
|
291 @fn CUnitTest_SetCurrentTransition_Transition(CUnitTestContext& aUTContext, |
|
292 TTransitionValidator& aValidator) |
|
293 Intended Usage : Standard c'tor method. |
|
294 Error Condition : None. |
|
295 @since 7.0 |
|
296 @param aUTContext The context this transition is operating in. |
|
297 @param aValidator Used for checking the pre & post conditions of the test object. |
|
298 @pre None. |
|
299 @post CUnitTest_SetCurrentTransition_Transition is fully constructed. |
|
300 */ |
|
301 CUnitTest_SetCurrentTransition_Transition(CUnitTestContext& aUTContext, |
|
302 TTransitionValidator& aValidator); |
|
303 /** |
|
304 @fn TransitMethodL() |
|
305 Intended Usage : To execute the CUnitTest::SetCurrentTransition method for the test harness. |
|
306 Error Condition : Leaves with an error code. |
|
307 @leave KErrNoMemory, (@see CUnitTest::SetCurrentTransition) |
|
308 @since 7.0 |
|
309 @return None |
|
310 @pre CUnitTest_SetCurrentTransition_Transition is fully constructed. |
|
311 @post No change in the CUnitTest_SetCurrentTransition_Transition apart |
|
312 from iUnitTest, which may have changed state. |
|
313 (@see CUnitTest::SetCurrentTransition post-condition) for iUnitTest's new state. |
|
314 */ |
|
315 inline void TransitMethodL(); |
|
316 |
|
317 /** |
|
318 @fn Context() const |
|
319 Intended Usage : To provide access to the unit test context cast to the correct type. |
|
320 Error Condition : None. |
|
321 @since 7.0 |
|
322 @return The unit test context cast to a CUnitTest_UnitTestContext |
|
323 @pre iUTContext is a valid CUnitTest_UnitTestContext. |
|
324 @post No change in the CUnitTest_SetCurrentTransition_Transition |
|
325 */ |
|
326 inline CUnitTest_UnitTestContext& Context() const; |
|
327 }; // CUnitTest_SetCurrentTransition_Transition |
|
328 |
|
329 // ______________________________________________________________________________ |
|
330 // |
|
331 /** |
|
332 @internalComponent |
|
333 |
|
334 Comments : Transition test of the CUnitTest::SetParametersL method. |
|
335 */ |
|
336 class CUnitTest_SetParametersL_Transition : public CTransitionType |
|
337 { |
|
338 public: |
|
339 /** |
|
340 @fn CUnitTest_SetParametersL_Transition(CUnitTestContext& aUTContext, |
|
341 TTransitionValidator& aValidator) |
|
342 Intended Usage : Standard c'tor method. |
|
343 Error Condition : None. |
|
344 @since 7.0 |
|
345 @param aUTContext The context this transition is operating in. |
|
346 @param aValidator Used for checking the pre & post conditions of the test object. |
|
347 @pre None. |
|
348 @post CUnitTest_SetParametersL_Transition is fully constructed. |
|
349 */ |
|
350 CUnitTest_SetParametersL_Transition(CUnitTestContext& aUTContext, |
|
351 TTransitionValidator& aValidator); |
|
352 /** |
|
353 @fn TransitMethodL() |
|
354 Intended Usage : To execute the CUnitTest::SetParametersL method for the test harness. |
|
355 Error Condition : Leaves with an error code. |
|
356 @leave KErrNoMemory, (@see CUnitTest::SetParametersL) |
|
357 @since 7.0 |
|
358 @return None |
|
359 @pre CUnitTest_SetParametersL_Transition is fully constructed. |
|
360 @post No change in the CUnitTest_SetParametersL_Transition apart |
|
361 from iUnitTest, which may have changed state. |
|
362 (@see CUnitTest::SetParametersL post-condition) for iUnitTest's new state. |
|
363 */ |
|
364 inline void TransitMethodL(); |
|
365 |
|
366 /** |
|
367 @fn Context() const |
|
368 Intended Usage : To provide access to the unit test context cast to the correct type. |
|
369 Error Condition : None. |
|
370 @since 7.0 |
|
371 @return The unit test context cast to a CUnitTest_UnitTestContext |
|
372 @pre iUTContext is a valid CUnitTest_UnitTestContext. |
|
373 @post No change in the CUnitTest_SetParametersL_Transition |
|
374 */ |
|
375 inline CUnitTest_UnitTestContext& Context() const; |
|
376 }; // CUnitTest_SetParametersL_Transition |
|
377 |
|
378 // ______________________________________________________________________________ |
|
379 // |
|
380 /** |
|
381 @internalComponent |
|
382 |
|
383 Comments : Transition test of the CUnitTest::PrepareUnitTestL method. |
|
384 */ |
|
385 class CUnitTest_PrepareUnitTestL_Transition : public CTransitionType |
|
386 { |
|
387 public: |
|
388 /** |
|
389 @fn CUnitTest_PrepareUnitTestL_Transition(CUnitTestContext& aUTContext, |
|
390 TTransitionValidator& aValidator) |
|
391 Intended Usage : Standard c'tor method. |
|
392 Error Condition : None. |
|
393 @since 7.0 |
|
394 @param aUTContext The context this transition is operating in. |
|
395 @param aValidator Used for checking the pre & post conditions of the test object. |
|
396 @pre None. |
|
397 @post CUnitTest_PrepareUnitTestL_Transition is fully constructed. |
|
398 */ |
|
399 CUnitTest_PrepareUnitTestL_Transition(CUnitTestContext& aUTContext, |
|
400 TTransitionValidator& aValidator); |
|
401 /** |
|
402 @fn TransitMethodL() |
|
403 Intended Usage : To execute the CUnitTest::PrepareUnitTestL method for the test harness. |
|
404 Error Condition : Leaves with an error code. |
|
405 @leave KErrNoMemory, (@see CUnitTest::PrepareUnitTestL) |
|
406 @since 7.0 |
|
407 @return None |
|
408 @pre CUnitTest_PrepareUnitTestL_Transition is fully constructed. |
|
409 @post No change in the CUnitTest_PrepareUnitTestL_Transition apart |
|
410 from iUnitTest, which may have changed state. |
|
411 (@see CUnitTest::PrepareUnitTestL post-condition) for iUnitTest's new state. |
|
412 */ |
|
413 inline void TransitMethodL(); |
|
414 |
|
415 /** |
|
416 @fn Context() const |
|
417 Intended Usage : To provide access to the unit test context cast to the correct type. |
|
418 Error Condition : None. |
|
419 @since 7.0 |
|
420 @return The unit test context cast to a CUnitTest_UnitTestContext |
|
421 @pre iUTContext is a valid CUnitTest_UnitTestContext. |
|
422 @post No change in the CUnitTest_PrepareUnitTestL_Transition |
|
423 */ |
|
424 inline CUnitTest_UnitTestContext& Context() const; |
|
425 }; // CUnitTest_PrepareUnitTestL_Transition |
|
426 |
|
427 // ______________________________________________________________________________ |
|
428 // |
|
429 /** |
|
430 @internalComponent |
|
431 |
|
432 Comments : Transition test of the CUnitTest::RunTest method. |
|
433 */ |
|
434 class CUnitTest_RunTest_Transition : public CTransition |
|
435 { |
|
436 public: |
|
437 /** |
|
438 @fn CUnitTest_RunTest_Transition(CUnitTestContext& aUTContext, |
|
439 TTransitionValidator& aValidator) |
|
440 Intended Usage : Standard c'tor method. |
|
441 Error Condition : None. |
|
442 @since 7.0 |
|
443 @param aUTContext The context this transition is operating in. |
|
444 @param aValidator Used for checking the pre & post conditions of the test object. |
|
445 @pre None. |
|
446 @post CUnitTest_RunTest_Transition is fully constructed. |
|
447 */ |
|
448 CUnitTest_RunTest_Transition(CUnitTestContext& aUTContext, |
|
449 TTransitionValidator& aValidator); |
|
450 /** |
|
451 @fn TransitMethodL() |
|
452 Intended Usage : To execute the CUnitTest::RunTest method for the test harness. |
|
453 Error Condition : Leaves with an error code. |
|
454 @leave KErrNoMemory, (@see CUnitTest::RunTest) |
|
455 @since 7.0 |
|
456 @return None |
|
457 @pre CUnitTest_RunTest_Transition is fully constructed. |
|
458 @post No change in the CUnitTest_RunTest_Transition apart |
|
459 from iUnitTest, which may have changed state. |
|
460 (@see CUnitTest::RunTest post-condition) for iUnitTest's new state. |
|
461 */ |
|
462 inline void TransitMethodL(); |
|
463 |
|
464 /** |
|
465 @fn Context() const |
|
466 Intended Usage : To provide access to the unit test context cast to the correct type. |
|
467 Error Condition : None. |
|
468 @since 7.0 |
|
469 @return The unit test context cast to a CUnitTest_UnitTestContext |
|
470 @pre iUTContext is a valid CUnitTest_UnitTestContext. |
|
471 @post No change in the CUnitTest_RunTest_Transition |
|
472 */ |
|
473 inline CUnitTest_UnitTestContext& Context() const; |
|
474 }; // CUnitTest_RunTest_Transition |
|
475 |
|
476 |
|
477 // ______________________________________________________________________________ |
|
478 // |
|
479 /** |
|
480 @internalComponent |
|
481 |
|
482 Comments : Transition test of the CUnitTest::AddTransitionL method. |
|
483 */ |
|
484 class CUnitTest_AddTransitionL_Transition : public CTransitionType |
|
485 { |
|
486 public: |
|
487 /** |
|
488 @fn CUnitTest_AddTransitionL_Transition(CUnitTestContext& aUTContext, |
|
489 TTransitionValidator& aValidator) |
|
490 Intended Usage : Standard c'tor method. |
|
491 Error Condition : None. |
|
492 @since 7.0 |
|
493 @param aUTContext The context this transition is operating in. |
|
494 @param aValidator Used for checking the pre & post conditions of the test object. |
|
495 @pre None. |
|
496 @post CUnitTest_AddTransitionL_Transition is fully constructed. |
|
497 */ |
|
498 CUnitTest_AddTransitionL_Transition(CUnitTestContext& aUTContext, |
|
499 TTransitionValidator& aValidator); |
|
500 /** |
|
501 @fn TransitMethodL() |
|
502 Intended Usage : To execute the CUnitTest::AddTransitionL method for the test harness. |
|
503 Error Condition : Leaves with an error code. |
|
504 @leave KErrNoMemory, (@see CUnitTest::AddTransitionL) |
|
505 @since 7.0 |
|
506 @return None |
|
507 @pre CUnitTest_AddTransitionL_Transition is fully constructed. |
|
508 @post No change in the CUnitTest_AddTransitionL_Transition apart |
|
509 from iUnitTest, which may have changed state. |
|
510 (@see CUnitTest::AddTransitionL post-condition) for iUnitTest's new state. |
|
511 */ |
|
512 inline void TransitMethodL(); |
|
513 |
|
514 /** |
|
515 @fn Context() const |
|
516 Intended Usage : To provide access to the unit test context cast to the correct type. |
|
517 Error Condition : None. |
|
518 @since 7.0 |
|
519 @return The unit test context cast to a CUnitTest_UnitTestContext |
|
520 @pre iUTContext is a valid CUnitTest_UnitTestContext. |
|
521 @post No change in the CUnitTest_AddTransitionL_Transition |
|
522 */ |
|
523 inline CUnitTest_UnitTestContext& Context() const; |
|
524 }; // CUnitTest_AddTransitionL_Transition |
|
525 |
|
526 // ______________________________________________________________________________ |
|
527 // |
|
528 /** |
|
529 @internalComponent |
|
530 |
|
531 Comments : Transition test of the CUnitTest::AddBlockingTransitionL method. |
|
532 */ |
|
533 class CUnitTest_AddBlockingTransitionL_Transition : public CTransitionType |
|
534 { |
|
535 public: |
|
536 /** |
|
537 @fn CUnitTest_AddBlockingTransitionL_Transition(CUnitTestContext& aUTContext, |
|
538 TTransitionValidator& aValidator) |
|
539 Intended Usage : Standard c'tor method. |
|
540 Error Condition : None. |
|
541 @since 7.0 |
|
542 @param aUTContext The context this transition is operating in. |
|
543 @param aValidator Used for checking the pre & post conditions of the test object. |
|
544 @pre None. |
|
545 @post CUnitTest_AddBlockingTransitionL_Transition is fully constructed. |
|
546 */ |
|
547 CUnitTest_AddBlockingTransitionL_Transition(CUnitTestContext& aUTContext, |
|
548 TTransitionValidator& aValidator); |
|
549 /** |
|
550 @fn TransitMethodL() |
|
551 Intended Usage : To execute the CUnitTest::AddBlockingTransitionL method for the test harness. |
|
552 Error Condition : Leaves with an error code. |
|
553 @leave KErrNoMemory, (@see CUnitTest::AddBlockingTransitionL) |
|
554 @since 7.0 |
|
555 @return None |
|
556 @pre CUnitTest_AddBlockingTransitionL_Transition is fully constructed. |
|
557 @post No change in the CUnitTest_AddBlockingTransitionL_Transition apart |
|
558 from iUnitTest, which may have changed state. |
|
559 (@see CUnitTest::AddBlockingTransitionL post-condition) for iUnitTest's new state. |
|
560 */ |
|
561 inline void TransitMethodL(); |
|
562 |
|
563 /** |
|
564 @fn Context() const |
|
565 Intended Usage : To provide access to the unit test context cast to the correct type. |
|
566 Error Condition : None. |
|
567 @since 7.0 |
|
568 @return The unit test context cast to a CUnitTest_UnitTestContext |
|
569 @pre iUTContext is a valid CUnitTest_UnitTestContext. |
|
570 @post No change in the CUnitTest_AddBlockingTransitionL_Transition |
|
571 */ |
|
572 inline CUnitTest_UnitTestContext& Context() const; |
|
573 }; // CUnitTest_AddBlockingTransitionL_Transition |
|
574 |
|
575 // ______________________________________________________________________________ |
|
576 // |
|
577 /** |
|
578 @internalComponent |
|
579 |
|
580 Comments : Transition test of the CUnitTest::AddLeaveErrorCodeL method. |
|
581 */ |
|
582 class CUnitTest_AddLeaveErrorCodeL_Transition : public CTransitionType |
|
583 { |
|
584 public: |
|
585 /** |
|
586 @fn CUnitTest_AddLeaveErrorCodeL_Transition(CUnitTestContext& aUTContext, |
|
587 TTransitionValidator& aValidator) |
|
588 Intended Usage : Standard c'tor method. |
|
589 Error Condition : None. |
|
590 @since 7.0 |
|
591 @param aUTContext The context this transition is operating in. |
|
592 @param aValidator Used for checking the pre & post conditions of the test object. |
|
593 @pre None. |
|
594 @post CUnitTest_AddLeaveErrorCodeL_Transition is fully constructed. |
|
595 */ |
|
596 CUnitTest_AddLeaveErrorCodeL_Transition(CUnitTestContext& aUTContext, |
|
597 TTransitionValidator& aValidator); |
|
598 /** |
|
599 @fn TransitMethodL() |
|
600 Intended Usage : To execute the CUnitTest::AddLeaveErrorCodeL method for the test harness. |
|
601 Error Condition : Leaves with an error code. |
|
602 @leave KErrNoMemory, (@see CUnitTest::AddLeaveErrorCodeL) |
|
603 @since 7.0 |
|
604 @return None |
|
605 @pre CUnitTest_AddLeaveErrorCodeL_Transition is fully constructed. |
|
606 @post No change in the CUnitTest_AddLeaveErrorCodeL_Transition apart |
|
607 from iUnitTest, which may have changed state. |
|
608 (@see CUnitTest::AddLeaveErrorCodeL post-condition) for iUnitTest's new state. |
|
609 */ |
|
610 inline void TransitMethodL(); |
|
611 |
|
612 /** |
|
613 @fn Context() const |
|
614 Intended Usage : To provide access to the unit test context cast to the correct type. |
|
615 Error Condition : None. |
|
616 @since 7.0 |
|
617 @return The unit test context cast to a CUnitTest_UnitTestContext |
|
618 @pre iUTContext is a valid CUnitTest_UnitTestContext. |
|
619 @post No change in the CUnitTest_AddLeaveErrorCodeL_Transition |
|
620 */ |
|
621 inline CUnitTest_UnitTestContext& Context() const; |
|
622 }; // CUnitTest_AddLeaveErrorCodeL_Transition |
|
623 |
|
624 // ______________________________________________________________________________ |
|
625 // |
|
626 /** |
|
627 @internalComponent |
|
628 |
|
629 Comments : Transition test of the CUnitTest::UnitTestName method. |
|
630 */ |
|
631 class CUnitTest_UnitTestName_Transition : public CTransition |
|
632 { |
|
633 public: |
|
634 /** |
|
635 @fn CUnitTest_UnitTestName_Transition(CUnitTestContext& aUTContext, |
|
636 TTransitionValidator& aValidator) |
|
637 Intended Usage : Standard c'tor method. |
|
638 Error Condition : None. |
|
639 @since 7.0 |
|
640 @param aUTContext The context this transition is operating in. |
|
641 @param aValidator Used for checking the pre & post conditions of the test object. |
|
642 @pre None. |
|
643 @post CUnitTest_UnitTestName_Transition is fully constructed. |
|
644 */ |
|
645 CUnitTest_UnitTestName_Transition(CUnitTestContext& aUTContext, |
|
646 TTransitionValidator& aValidator); |
|
647 /** |
|
648 @fn TransitMethodL() |
|
649 Intended Usage : To execute the CUnitTest::UnitTestName method for the test harness. |
|
650 Error Condition : Leaves with an error code. |
|
651 @leave KErrNoMemory, (@see CUnitTest::UnitTestName) |
|
652 @since 7.0 |
|
653 @return None |
|
654 @pre CUnitTest_UnitTestName_Transition is fully constructed. |
|
655 @post No change in the CUnitTest_UnitTestName_Transition apart |
|
656 from iUnitTest, which may have changed state. |
|
657 (@see CUnitTest::UnitTestName post-condition) for iUnitTest's new state. |
|
658 */ |
|
659 inline void TransitMethodL(); |
|
660 |
|
661 /** |
|
662 @fn Context() const |
|
663 Intended Usage : To provide access to the unit test context cast to the correct type. |
|
664 Error Condition : None. |
|
665 @since 7.0 |
|
666 @return The unit test context cast to a CUnitTest_UnitTestContext |
|
667 @pre iUTContext is a valid CUnitTest_UnitTestContext. |
|
668 @post No change in the CUnitTest_UnitTestName_Transition |
|
669 */ |
|
670 inline CUnitTest_UnitTestContext& Context() const; |
|
671 }; // CUnitTest_UnitTestName_Transition |
|
672 |
|
673 |
|
674 // Add additional Transition class definitions here... |
|
675 |
|
676 #include "UnitTestTransitions.inl" |
|
677 |
|
678 #include "UnitTestUnitTestContext.inl" |
|
679 |
|
680 #endif // __UNITTESTTRANSITIONS_H__ |
|
681 |