|
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 CTestController class methods. |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __TESTCONTROLLERTRANSITIONVALIDATION_H__ |
|
19 #define __TESTCONTROLLERTRANSITIONVALIDATION_H__ |
|
20 |
|
21 #include "TestControllerTransitions.h" |
|
22 |
|
23 // ______________________________________________________________________________ |
|
24 // |
|
25 /** |
|
26 @internalComponent |
|
27 |
|
28 Comments : Provide all the CtorUnit Test's specific |
|
29 validatation for the state of a transition before and after its execution. |
|
30 on the CTestController test class for a transition. |
|
31 */ |
|
32 class TTestController_Ctor_TransitionValidator : public TTransitionValidator |
|
33 { |
|
34 public: |
|
35 /** |
|
36 @fn TTestController_Ctor_TransitionValidator(CUnitTestContext& aUTContext) |
|
37 Intended Usage : Default constructor |
|
38 @leave KErrNoMemory |
|
39 @since 7.0 |
|
40 @param aUTContext The context within which this transition is executing |
|
41 */ |
|
42 inline TTestController_Ctor_TransitionValidator(CUnitTestContext& aUTContext); |
|
43 |
|
44 /** |
|
45 @fn ValidatePreConditions() |
|
46 Intended Usage : Implemented by the developer to check the |
|
47 end state of the transition behaviour. |
|
48 Error Condition : Invalid pre-conditions |
|
49 @since 7.0 |
|
50 @return TBool ETrue if the pre-conditions were valid, EFalse otherwise. |
|
51 @pre TTestController_Ctor_TransitionValidator is fully constructed. |
|
52 @post No change to the iUTContext class. |
|
53 */ |
|
54 virtual inline TBool ValidatePreConditions(); |
|
55 |
|
56 /** |
|
57 @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) |
|
58 Intended Usage : Implemented by the developer to check the |
|
59 end state of the transition behaviour. |
|
60 When overriding, if the transition calls an asynchronous function |
|
61 ValidatePostConditions will be called twice. Firstly, after the |
|
62 asynchronous function has been called and, secondly, after the |
|
63 asynchronous request has completed. The parameter aAsyncState can |
|
64 be used to distinguish between these two cases. |
|
65 Error Condition : Invalid post-conditions. |
|
66 @since 7.0 |
|
67 @param aAsyncState EAsyncCalled if the async function has been just been called, |
|
68 EAsyncCompleted if the function has completed. |
|
69 @return TBool ETrue if the post-conditions were valid, EFalse otherwise. |
|
70 @pre TTestController_Ctor_TransitionValidator is fully constructed. |
|
71 @post No change to the iUTContext class. |
|
72 */ |
|
73 virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); |
|
74 }; // TTestController_Ctor_TransitionValidator |
|
75 |
|
76 // ______________________________________________________________________________ |
|
77 // |
|
78 /** |
|
79 @internalComponent |
|
80 |
|
81 Comments : Provide all the DtorUnit Test's specific |
|
82 validatation for the state of a transition before and after its execution. |
|
83 on the CTestController test class for a transition. |
|
84 */ |
|
85 class TTestController_Dtor_TransitionValidator : public TTransitionValidator |
|
86 { |
|
87 public: |
|
88 /** |
|
89 @fn TTestController_Dtor_TransitionValidator(CUnitTestContext& aUTContext) |
|
90 Intended Usage : |
|
91 @leave KErrNoMemory |
|
92 @since 7.0 |
|
93 @param aUTContext The context within which this transition is executing |
|
94 */ |
|
95 inline TTestController_Dtor_TransitionValidator(CUnitTestContext& aUTContext); |
|
96 |
|
97 /** |
|
98 @fn ValidatePreConditions() |
|
99 Intended Usage : Implemented by the developer to check the |
|
100 end state of the transition behaviour. |
|
101 Error Condition : Invalid pre-conditions |
|
102 @since 7.0 |
|
103 @return TBool ETrue if the pre-conditions were valid, EFalse otherwise. |
|
104 @pre TTestController_Dtor_TransitionValidator is fully constructed. |
|
105 @post No change to the iUTContext class. |
|
106 */ |
|
107 virtual inline TBool ValidatePreConditions(); |
|
108 |
|
109 /** |
|
110 @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) |
|
111 Intended Usage : Implemented by the developer to check the |
|
112 end state of the transition behaviour. |
|
113 When overriding, if the transition calls an asynchronous function |
|
114 ValidatePostConditions will be called twice. Firstly, after the |
|
115 asynchronous function has been called and, secondly, after the |
|
116 asynchronous request has completed. The parameter aAsyncState can |
|
117 be used to distinguish between these two cases. |
|
118 Error Condition : Invalid post-conditions. |
|
119 @since 7.0 |
|
120 @param aAsyncState EAsyncCalled if the async function has been just been called, |
|
121 EAsyncCompleted if the function has completed. |
|
122 @return TBool ETrue if the post-conditions were valid, EFalse otherwise. |
|
123 @pre TTestController_Dtor_TransitionValidator is fully constructed. |
|
124 @post No change to the iUTContext class. |
|
125 */ |
|
126 virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); |
|
127 }; // TTestController_Dtor_TransitionValidator |
|
128 |
|
129 // ______________________________________________________________________________ |
|
130 // |
|
131 /** |
|
132 @internalComponent |
|
133 |
|
134 Comments : Provide all the ScanDriveUnit Test's specific |
|
135 validatation for the state of a transition before and after its execution. |
|
136 on the CTestController test class for a transition. |
|
137 */ |
|
138 class TTestController_ScanDrive_TransitionValidator : public TTransitionValidator |
|
139 { |
|
140 public: |
|
141 /** |
|
142 @fn TTestController_ScanDrive_TransitionValidator(CUnitTestContext& aUTContext) |
|
143 Intended Usage : |
|
144 @leave KErrNoMemory |
|
145 @since 7.0 |
|
146 @param aUTContext The context within which this transition is executing |
|
147 */ |
|
148 inline TTestController_ScanDrive_TransitionValidator(CUnitTestContext& aUTContext); |
|
149 |
|
150 /** |
|
151 @fn ValidatePreConditions() |
|
152 Intended Usage : Implemented by the developer to check the |
|
153 end state of the transition behaviour. |
|
154 Error Condition : Invalid pre-conditions |
|
155 @since 7.0 |
|
156 @return TBool ETrue if the pre-conditions were valid, EFalse otherwise. |
|
157 @pre TTestController_ScanDrive_TransitionValidator is fully constructed. |
|
158 @post No change to the iUTContext class. |
|
159 */ |
|
160 virtual inline TBool ValidatePreConditions(); |
|
161 |
|
162 /** |
|
163 @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) |
|
164 Intended Usage : Implemented by the developer to check the |
|
165 end state of the transition behaviour. |
|
166 When overriding, if the transition calls an asynchronous function |
|
167 ValidatePostConditions will be called twice. Firstly, after the |
|
168 asynchronous function has been called and, secondly, after the |
|
169 asynchronous request has completed. The parameter aAsyncState can |
|
170 be used to distinguish between these two cases. |
|
171 Error Condition : Invalid post-conditions. |
|
172 @since 7.0 |
|
173 @param aAsyncState EAsyncCalled if the async function has been just been called, |
|
174 EAsyncCompleted if the function has completed. |
|
175 @return TBool ETrue if the post-conditions were valid, EFalse otherwise. |
|
176 @pre TTestController_ScanDrive_TransitionValidator is fully constructed. |
|
177 @post No change to the iUTContext class. |
|
178 */ |
|
179 virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); |
|
180 }; // TTestController_ScanDrive_TransitionValidator |
|
181 |
|
182 // ______________________________________________________________________________ |
|
183 // |
|
184 /** |
|
185 @internalComponent |
|
186 |
|
187 Comments : Provide all the DiscoverTestsUnit Test's specific |
|
188 validatation for the state of a transition before and after its execution. |
|
189 on the CTestController test class for a transition. |
|
190 */ |
|
191 class TTestController_DiscoverTests_TransitionValidator : public TTransitionValidator |
|
192 { |
|
193 public: |
|
194 /** |
|
195 @fn TTestController_DiscoverTests_TransitionValidator(CUnitTestContext& aUTContext) |
|
196 Intended Usage : |
|
197 @leave KErrNoMemory |
|
198 @since 7.0 |
|
199 @param aUTContext The context within which this transition is executing |
|
200 */ |
|
201 inline TTestController_DiscoverTests_TransitionValidator(CUnitTestContext& aUTContext); |
|
202 |
|
203 /** |
|
204 @fn ValidatePreConditions() |
|
205 Intended Usage : Implemented by the developer to check the |
|
206 end state of the transition behaviour. |
|
207 Error Condition : Invalid pre-conditions |
|
208 @since 7.0 |
|
209 @return TBool ETrue if the pre-conditions were valid, EFalse otherwise. |
|
210 @pre TTestController_DiscoverTests_TransitionValidator is fully constructed. |
|
211 @post No change to the iUTContext class. |
|
212 */ |
|
213 virtual inline TBool ValidatePreConditions(); |
|
214 |
|
215 /** |
|
216 @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) |
|
217 Intended Usage : Implemented by the developer to check the |
|
218 end state of the transition behaviour. |
|
219 When overriding, if the transition calls an asynchronous function |
|
220 ValidatePostConditions will be called twice. Firstly, after the |
|
221 asynchronous function has been called and, secondly, after the |
|
222 asynchronous request has completed. The parameter aAsyncState can |
|
223 be used to distinguish between these two cases. |
|
224 Error Condition : Invalid post-conditions. |
|
225 @since 7.0 |
|
226 @param aAsyncState EAsyncCalled if the async function has been just been called, |
|
227 EAsyncCompleted if the function has completed. |
|
228 @return TBool ETrue if the post-conditions were valid, EFalse otherwise. |
|
229 @pre TTestController_DiscoverTests_TransitionValidator is fully constructed. |
|
230 @post No change to the iUTContext class. |
|
231 */ |
|
232 virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); |
|
233 }; // TTestController_DiscoverTests_TransitionValidator |
|
234 |
|
235 // ______________________________________________________________________________ |
|
236 // |
|
237 /** |
|
238 @internalComponent |
|
239 |
|
240 Comments : Provide all the FindComponentsUnit Test's specific |
|
241 validatation for the state of a transition before and after its execution. |
|
242 on the CTestController test class for a transition. |
|
243 */ |
|
244 class TTestController_FindComponents_TransitionValidator : public TTransitionValidator |
|
245 { |
|
246 public: |
|
247 /** |
|
248 @fn TTestController_FindComponents_TransitionValidator(CUnitTestContext& aUTContext) |
|
249 Intended Usage : |
|
250 @leave KErrNoMemory |
|
251 @since 7.0 |
|
252 @param aUTContext The context within which this transition is executing |
|
253 */ |
|
254 inline TTestController_FindComponents_TransitionValidator(CUnitTestContext& aUTContext); |
|
255 |
|
256 /** |
|
257 @fn ValidatePreConditions() |
|
258 Intended Usage : Implemented by the developer to check the |
|
259 end state of the transition behaviour. |
|
260 Error Condition : Invalid pre-conditions |
|
261 @since 7.0 |
|
262 @return TBool ETrue if the pre-conditions were valid, EFalse otherwise. |
|
263 @pre TTestController_FindComponents_TransitionValidator is fully constructed. |
|
264 @post No change to the iUTContext class. |
|
265 */ |
|
266 virtual inline TBool ValidatePreConditions(); |
|
267 |
|
268 /** |
|
269 @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) |
|
270 Intended Usage : Implemented by the developer to check the |
|
271 end state of the transition behaviour. |
|
272 When overriding, if the transition calls an asynchronous function |
|
273 ValidatePostConditions will be called twice. Firstly, after the |
|
274 asynchronous function has been called and, secondly, after the |
|
275 asynchronous request has completed. The parameter aAsyncState can |
|
276 be used to distinguish between these two cases. |
|
277 Error Condition : Invalid post-conditions. |
|
278 @since 7.0 |
|
279 @param aAsyncState EAsyncCalled if the async function has been just been called, |
|
280 EAsyncCompleted if the function has completed. |
|
281 @return TBool ETrue if the post-conditions were valid, EFalse otherwise. |
|
282 @pre TTestController_FindComponents_TransitionValidator is fully constructed. |
|
283 @post No change to the iUTContext class. |
|
284 */ |
|
285 virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); |
|
286 }; // TTestController_FindComponents_TransitionValidator |
|
287 |
|
288 // ______________________________________________________________________________ |
|
289 // |
|
290 /** |
|
291 @internalComponent |
|
292 |
|
293 Comments : Provide all the GetUnitTestsUnit Test's specific |
|
294 validatation for the state of a transition before and after its execution. |
|
295 on the CTestController test class for a transition. |
|
296 */ |
|
297 class TTestController_GetUnitTests_TransitionValidator : public TTransitionValidator |
|
298 { |
|
299 public: |
|
300 /** |
|
301 @fn TTestController_GetUnitTests_TransitionValidator(CUnitTestContext& aUTContext) |
|
302 Intended Usage : |
|
303 @leave KErrNoMemory |
|
304 @since 7.0 |
|
305 @param aUTContext The context within which this transition is executing |
|
306 */ |
|
307 inline TTestController_GetUnitTests_TransitionValidator(CUnitTestContext& aUTContext); |
|
308 |
|
309 /** |
|
310 @fn ValidatePreConditions() |
|
311 Intended Usage : Implemented by the developer to check the |
|
312 end state of the transition behaviour. |
|
313 Error Condition : Invalid pre-conditions |
|
314 @since 7.0 |
|
315 @return TBool ETrue if the pre-conditions were valid, EFalse otherwise. |
|
316 @pre TTestController_GetUnitTests_TransitionValidator is fully constructed. |
|
317 @post No change to the iUTContext class. |
|
318 */ |
|
319 virtual inline TBool ValidatePreConditions(); |
|
320 |
|
321 /** |
|
322 @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) |
|
323 Intended Usage : Implemented by the developer to check the |
|
324 end state of the transition behaviour. |
|
325 When overriding, if the transition calls an asynchronous function |
|
326 ValidatePostConditions will be called twice. Firstly, after the |
|
327 asynchronous function has been called and, secondly, after the |
|
328 asynchronous request has completed. The parameter aAsyncState can |
|
329 be used to distinguish between these two cases. |
|
330 Error Condition : Invalid post-conditions. |
|
331 @since 7.0 |
|
332 @param aAsyncState EAsyncCalled if the async function has been just been called, |
|
333 EAsyncCompleted if the function has completed. |
|
334 @return TBool ETrue if the post-conditions were valid, EFalse otherwise. |
|
335 @pre TTestController_GetUnitTests_TransitionValidator is fully constructed. |
|
336 @post No change to the iUTContext class. |
|
337 */ |
|
338 virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); |
|
339 }; // TTestController_GetUnitTests_TransitionValidator |
|
340 |
|
341 // ______________________________________________________________________________ |
|
342 // |
|
343 /** |
|
344 @internalComponent |
|
345 |
|
346 Comments : Provide all the StartUnit Test's specific |
|
347 validatation for the state of a transition before and after its execution. |
|
348 on the CTestController test class for a transition. |
|
349 */ |
|
350 class TTestController_Start_TransitionValidator : public TTransitionValidator |
|
351 { |
|
352 public: |
|
353 /** |
|
354 @fn TTestController_Start_TransitionValidator(CUnitTestContext& aUTContext) |
|
355 Intended Usage : |
|
356 @leave KErrNoMemory |
|
357 @since 7.0 |
|
358 @param aUTContext The context within which this transition is executing |
|
359 */ |
|
360 inline TTestController_Start_TransitionValidator(CUnitTestContext& aUTContext); |
|
361 |
|
362 /** |
|
363 @fn ValidatePreConditions() |
|
364 Intended Usage : Implemented by the developer to check the |
|
365 end state of the transition behaviour. |
|
366 Error Condition : Invalid pre-conditions |
|
367 @since 7.0 |
|
368 @return TBool ETrue if the pre-conditions were valid, EFalse otherwise. |
|
369 @pre TTestController_Start_TransitionValidator is fully constructed. |
|
370 @post No change to the iUTContext class. |
|
371 */ |
|
372 virtual inline TBool ValidatePreConditions(); |
|
373 |
|
374 /** |
|
375 @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) |
|
376 Intended Usage : Implemented by the developer to check the |
|
377 end state of the transition behaviour. |
|
378 When overriding, if the transition calls an asynchronous function |
|
379 ValidatePostConditions will be called twice. Firstly, after the |
|
380 asynchronous function has been called and, secondly, after the |
|
381 asynchronous request has completed. The parameter aAsyncState can |
|
382 be used to distinguish between these two cases. |
|
383 Error Condition : Invalid post-conditions. |
|
384 @since 7.0 |
|
385 @param aAsyncState EAsyncCalled if the async function has been just been called, |
|
386 EAsyncCompleted if the function has completed. |
|
387 @return TBool ETrue if the post-conditions were valid, EFalse otherwise. |
|
388 @pre TTestController_Start_TransitionValidator is fully constructed. |
|
389 @post No change to the iUTContext class. |
|
390 */ |
|
391 virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); |
|
392 }; // TTestController_Start_TransitionValidator |
|
393 |
|
394 |
|
395 #include "TestControllerTransitionValidation.inl" |
|
396 |
|
397 #endif // __TESTCONTROLLERTRANSITIONVALIDATION_H__ |
|
398 |