|
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 RStringPool class methods. |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __STRINGPOOLTRANSITIONVALIDATION_H__ |
|
19 #define __STRINGPOOLTRANSITIONVALIDATION_H__ |
|
20 |
|
21 #include "StringPoolTransitions.h" |
|
22 |
|
23 // ______________________________________________________________________________ |
|
24 // |
|
25 /** |
|
26 @internalComponent |
|
27 Comments : Provide all the TrueUnit Test's specific |
|
28 validatation for the state of a transition before and after its execution. |
|
29 on the RStringPool test class for a transition. |
|
30 */ |
|
31 class TStringPool_True_TransitionValidator : public TTransitionValidator |
|
32 { |
|
33 public: |
|
34 /** |
|
35 @fn TStringPool_True_TransitionValidator(CUnitTestContext& aUTContext) |
|
36 Intended Usage : |
|
37 @leave KErrNoMemory |
|
38 @since 6.0 |
|
39 @param aUTContext The context within which this transition is executing |
|
40 */ |
|
41 inline TStringPool_True_TransitionValidator(CUnitTestContext& aUTContext); |
|
42 |
|
43 /** |
|
44 @fn ValidatePreConditions() |
|
45 Intended Usage : Implemented by the developer to check the |
|
46 end state of the transition behaviour. |
|
47 Error Condition : Invalid pre-conditions |
|
48 @since 6.0 |
|
49 @return TBool ETrue if the pre-conditions were valid, EFalse otherwise. |
|
50 @pre TStringPool_True_TransitionValidator is fully constructed. |
|
51 @post No change to the iUTContext class. |
|
52 */ |
|
53 virtual inline TBool ValidatePreConditions(); |
|
54 |
|
55 /** |
|
56 @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) |
|
57 Intended Usage : Implemented by the developer to check the |
|
58 end state of the transition behaviour. |
|
59 When overriding, if the transition calls an asynchronous function |
|
60 ValidatePostConditions will be called twice. Firstly, after the |
|
61 asynchronous function has been called and, secondly, after the |
|
62 asynchronous request has completed. The parameter aAsyncState can |
|
63 be used to distinguish between these two cases. |
|
64 Error Condition : Invalid post-conditions. |
|
65 @since 6.0 |
|
66 @param aAsyncState EAsyncCalled if the async function has been just been called, |
|
67 EAsyncCompleted if the function has completed. |
|
68 @return TBool ETrue if the post-conditions were valid, EFalse otherwise. |
|
69 @pre TStringPool_True_TransitionValidator is fully constructed. |
|
70 @post No change to the iUTContext class. |
|
71 */ |
|
72 virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); |
|
73 }; // TStringPool_True_TransitionValidator |
|
74 |
|
75 // ______________________________________________________________________________ |
|
76 // |
|
77 /** |
|
78 @internalComponent |
|
79 Comments : Provide all the FalseUnit Test's specific |
|
80 validatation for the state of a transition before and after its execution. |
|
81 on the RStringPool test class for a transition. |
|
82 */ |
|
83 class TStringPool_False_TransitionValidator : public TTransitionValidator |
|
84 { |
|
85 public: |
|
86 /** |
|
87 @fn TStringPool_False_TransitionValidator(CUnitTestContext& aUTContext) |
|
88 Intended Usage : |
|
89 @leave KErrNoMemory |
|
90 @since 6.0 |
|
91 @param aUTContext The context within which this transition is executing |
|
92 */ |
|
93 inline TStringPool_False_TransitionValidator(CUnitTestContext& aUTContext); |
|
94 |
|
95 /** |
|
96 @fn ValidatePreConditions() |
|
97 Intended Usage : Implemented by the developer to check the |
|
98 end state of the transition behaviour. |
|
99 Error Condition : Invalid pre-conditions |
|
100 @since 6.0 |
|
101 @return TBool ETrue if the pre-conditions were valid, EFalse otherwise. |
|
102 @pre TStringPool_False_TransitionValidator is fully constructed. |
|
103 @post No change to the iUTContext class. |
|
104 */ |
|
105 virtual inline TBool ValidatePreConditions(); |
|
106 |
|
107 /** |
|
108 @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) |
|
109 Intended Usage : Implemented by the developer to check the |
|
110 end state of the transition behaviour. |
|
111 When overriding, if the transition calls an asynchronous function |
|
112 ValidatePostConditions will be called twice. Firstly, after the |
|
113 asynchronous function has been called and, secondly, after the |
|
114 asynchronous request has completed. The parameter aAsyncState can |
|
115 be used to distinguish between these two cases. |
|
116 Error Condition : Invalid post-conditions. |
|
117 @since 6.0 |
|
118 @param aAsyncState EAsyncCalled if the async function has been just been called, |
|
119 EAsyncCompleted if the function has completed. |
|
120 @return TBool ETrue if the post-conditions were valid, EFalse otherwise. |
|
121 @pre TStringPool_False_TransitionValidator is fully constructed. |
|
122 @post No change to the iUTContext class. |
|
123 */ |
|
124 virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); |
|
125 }; // TStringPool_False_TransitionValidator |
|
126 |
|
127 #include "StringPoolTransitionValidation.inl" |
|
128 |
|
129 #endif // __STRINGPOOLTRANSITIONVALIDATION_H__ |
|
130 |