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