|
1 // Copyright (c) 2001-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 CWspHeaderWriter class methods. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file WspHeaderWriterTransitionValidation.h |
|
20 */ |
|
21 |
|
22 #ifndef __WSPHEADERWRITERTRANSITIONVALIDATION_H__ |
|
23 #define __WSPHEADERWRITERTRANSITIONVALIDATION_H__ |
|
24 |
|
25 #include "WspHeaderWriterTransitions.h" |
|
26 |
|
27 // ______________________________________________________________________________ |
|
28 // |
|
29 /** |
|
30 @internal |
|
31 @class TWspHeaderWriter_Ctor_TransitionValidator |
|
32 @Depends CWspHeaderWriter & TTransitionValidator |
|
33 |
|
34 Comments : Provide all the CtorUnit Test's specific |
|
35 validatation for the state of a transition before and after its execution. |
|
36 on the CWspHeaderWriter test class for a transition. |
|
37 */ |
|
38 class TWspHeaderWriter_Ctor_TransitionValidator : public TTransitionValidator |
|
39 { |
|
40 public: |
|
41 /** |
|
42 @fn TWspHeaderWriter_Ctor_TransitionValidator(CUnitTestContext& aUTContext) |
|
43 Intended Usage : Standard constructor |
|
44 @exception KErrNoMemory |
|
45 @since 7.0 |
|
46 @param aUTContext The context within which this transition is executing |
|
47 */ |
|
48 inline TWspHeaderWriter_Ctor_TransitionValidator(CUnitTestContext& aUTContext); |
|
49 |
|
50 /** |
|
51 @fn ValidatePreConditions() |
|
52 Intended Usage : Checks the start state |
|
53 of the WspHeaderWriter_Ctor transition behaviour. |
|
54 Error Condition : Invalid pre-conditions |
|
55 @since 7.0 |
|
56 @return ETrue if the pre-conditions were valid, EFalse otherwise. |
|
57 @pre TWspHeaderWriter_Ctor_TransitionValidator is fully constructed. |
|
58 @post No change to the CWspHeaderWriter class. |
|
59 */ |
|
60 virtual inline TBool ValidatePreConditions(); |
|
61 |
|
62 /** |
|
63 @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) |
|
64 Intended Usage : Checks the start state |
|
65 of the WspHeaderWriter_Ctor transition behaviour. |
|
66 When overriding, if the transition calls an asynchronous function |
|
67 ValidatePostConditions will be called twice. Firstly, after the |
|
68 asynchronous function has been called and, secondly, after the |
|
69 asynchronous request has completed. The parameter aAsyncState can |
|
70 be used to distinguish between these two cases. |
|
71 Error Condition : Invalid post-conditions. |
|
72 @since 7.0 |
|
73 @param aAsyncState EAsyncCalled if the async function has been just been called, |
|
74 EAsyncCompleted if the function has completed. |
|
75 @return ETrue if the post-conditions were valid, EFalse otherwise. |
|
76 @pre TWspHeaderWriter_Ctor_TransitionValidator is fully constructed. |
|
77 @post No change to the CWspHeaderWriter class. |
|
78 */ |
|
79 virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); |
|
80 }; // TWspHeaderWriter_Ctor_TransitionValidator |
|
81 |
|
82 // ______________________________________________________________________________ |
|
83 // |
|
84 /** |
|
85 @internal |
|
86 @class TWspHeaderWriter_Dtor_TransitionValidator |
|
87 @Depends CWspHeaderWriter & TTransitionValidator |
|
88 |
|
89 Comments : Provide all the DtorUnit Test's specific |
|
90 validatation for the state of a transition before and after its execution. |
|
91 on the CWspHeaderWriter test class for a transition. |
|
92 */ |
|
93 class TWspHeaderWriter_Dtor_TransitionValidator : public TTransitionValidator |
|
94 { |
|
95 public: |
|
96 /** |
|
97 @fn TWspHeaderWriter_Dtor_TransitionValidator(CUnitTestContext& aUTContext) |
|
98 Intended Usage : Standard constructor |
|
99 @exception KErrNoMemory |
|
100 @since 7.0 |
|
101 @param aUTContext The context within which this transition is executing |
|
102 */ |
|
103 inline TWspHeaderWriter_Dtor_TransitionValidator(CUnitTestContext& aUTContext); |
|
104 |
|
105 /** |
|
106 @fn ValidatePreConditions() |
|
107 Intended Usage : Checks the start state |
|
108 of the WspHeaderWriter_Dtor transition behaviour. |
|
109 Error Condition : Invalid pre-conditions |
|
110 @since 7.0 |
|
111 @return ETrue if the pre-conditions were valid, EFalse otherwise. |
|
112 @pre TWspHeaderWriter_Dtor_TransitionValidator is fully constructed. |
|
113 @post No change to the CWspHeaderWriter class. |
|
114 */ |
|
115 virtual inline TBool ValidatePreConditions(); |
|
116 |
|
117 /** |
|
118 @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) |
|
119 Intended Usage : Checks the start state |
|
120 of the WspHeaderWriter_Dtor transition behaviour. |
|
121 When overriding, if the transition calls an asynchronous function |
|
122 ValidatePostConditions will be called twice. Firstly, after the |
|
123 asynchronous function has been called and, secondly, after the |
|
124 asynchronous request has completed. The parameter aAsyncState can |
|
125 be used to distinguish between these two cases. |
|
126 Error Condition : Invalid post-conditions. |
|
127 @since 7.0 |
|
128 @param aAsyncState EAsyncCalled if the async function has been just been called, |
|
129 EAsyncCompleted if the function has completed. |
|
130 @return ETrue if the post-conditions were valid, EFalse otherwise. |
|
131 @pre TWspHeaderWriter_Dtor_TransitionValidator is fully constructed. |
|
132 @post No change to the CWspHeaderWriter class. |
|
133 */ |
|
134 virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); |
|
135 }; // TWspHeaderWriter_Dtor_TransitionValidator |
|
136 |
|
137 // ______________________________________________________________________________ |
|
138 // |
|
139 /** |
|
140 @internal |
|
141 @class TWspHeaderWriter_EncodeHeaderL_TransitionValidator |
|
142 @Depends CWspHeaderWriter & TTransitionValidator |
|
143 |
|
144 Comments : Provide all the EncodeHeaderLUnit Test's specific |
|
145 validatation for the state of a transition before and after its execution. |
|
146 on the CWspHeaderWriter test class for a transition. |
|
147 */ |
|
148 class TWspHeaderWriter_EncodeHeaderL_TransitionValidator : public TTransitionValidator |
|
149 { |
|
150 public: |
|
151 /** |
|
152 @fn TWspHeaderWriter_EncodeHeaderL_TransitionValidator(CUnitTestContext& aUTContext) |
|
153 Intended Usage : Standard constructor |
|
154 @exception KErrNoMemory |
|
155 @since 7.0 |
|
156 @param aUTContext The context within which this transition is executing |
|
157 */ |
|
158 inline TWspHeaderWriter_EncodeHeaderL_TransitionValidator(CUnitTestContext& aUTContext); |
|
159 |
|
160 /** |
|
161 @fn ValidatePreConditions() |
|
162 Intended Usage : Checks the start state |
|
163 of the WspHeaderWriter_EncodeHeaderL transition behaviour. |
|
164 Error Condition : Invalid pre-conditions |
|
165 @since 7.0 |
|
166 @return ETrue if the pre-conditions were valid, EFalse otherwise. |
|
167 @pre TWspHeaderWriter_EncodeHeaderL_TransitionValidator is fully constructed. |
|
168 @post No change to the CWspHeaderWriter class. |
|
169 */ |
|
170 virtual inline TBool ValidatePreConditions(); |
|
171 |
|
172 /** |
|
173 @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) |
|
174 Intended Usage : Checks the start state |
|
175 of the WspHeaderWriter_EncodeHeaderL transition behaviour. |
|
176 When overriding, if the transition calls an asynchronous function |
|
177 ValidatePostConditions will be called twice. Firstly, after the |
|
178 asynchronous function has been called and, secondly, after the |
|
179 asynchronous request has completed. The parameter aAsyncState can |
|
180 be used to distinguish between these two cases. |
|
181 Error Condition : Invalid post-conditions. |
|
182 @since 7.0 |
|
183 @param aAsyncState EAsyncCalled if the async function has been just been called, |
|
184 EAsyncCompleted if the function has completed. |
|
185 @return ETrue if the post-conditions were valid, EFalse otherwise. |
|
186 @pre TWspHeaderWriter_EncodeHeaderL_TransitionValidator is fully constructed. |
|
187 @post No change to the CWspHeaderWriter class. |
|
188 */ |
|
189 virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); |
|
190 }; // TWspHeaderWriter_EncodeHeaderL_TransitionValidator |
|
191 |
|
192 #include "WspHeaderWriterTransitionValidation.inl" |
|
193 |
|
194 #endif // __WSPHEADERWRITERTRANSITIONVALIDATION_H__ |
|
195 |