os/ossrv/lowlevellibsandfws/pluginfw/Test_Bed/TestControllerTest/TestControllerTransitionValidation.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/lowlevellibsandfws/pluginfw/Test_Bed/TestControllerTest/TestControllerTransitionValidation.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,398 @@
1.4 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// The definitions of the transition classes upon the CTestController class methods.
1.18 +//
1.19 +//
1.20 +
1.21 +#ifndef __TESTCONTROLLERTRANSITIONVALIDATION_H__
1.22 +#define __TESTCONTROLLERTRANSITIONVALIDATION_H__
1.23 +
1.24 +#include "TestControllerTransitions.h"
1.25 +
1.26 +// ______________________________________________________________________________
1.27 +//
1.28 +/**
1.29 + @internalComponent
1.30 +
1.31 + Comments : Provide all the CtorUnit Test's specific
1.32 + validatation for the state of a transition before and after its execution.
1.33 + on the CTestController test class for a transition.
1.34 + */
1.35 +class TTestController_Ctor_TransitionValidator : public TTransitionValidator
1.36 + {
1.37 +public:
1.38 + /**
1.39 + @fn TTestController_Ctor_TransitionValidator(CUnitTestContext& aUTContext)
1.40 + Intended Usage : Default constructor
1.41 + @leave KErrNoMemory
1.42 + @since 7.0
1.43 + @param aUTContext The context within which this transition is executing
1.44 + */
1.45 + inline TTestController_Ctor_TransitionValidator(CUnitTestContext& aUTContext);
1.46 +
1.47 + /**
1.48 + @fn ValidatePreConditions()
1.49 + Intended Usage : Implemented by the developer to check the
1.50 + end state of the transition behaviour.
1.51 + Error Condition : Invalid pre-conditions
1.52 + @since 7.0
1.53 + @return TBool ETrue if the pre-conditions were valid, EFalse otherwise.
1.54 + @pre TTestController_Ctor_TransitionValidator is fully constructed.
1.55 + @post No change to the iUTContext class.
1.56 + */
1.57 + virtual inline TBool ValidatePreConditions();
1.58 +
1.59 + /**
1.60 + @fn ValidatePostConditions(TTestBedAsyncState aAsyncState)
1.61 + Intended Usage : Implemented by the developer to check the
1.62 + end state of the transition behaviour.
1.63 + When overriding, if the transition calls an asynchronous function
1.64 + ValidatePostConditions will be called twice. Firstly, after the
1.65 + asynchronous function has been called and, secondly, after the
1.66 + asynchronous request has completed. The parameter aAsyncState can
1.67 + be used to distinguish between these two cases.
1.68 + Error Condition : Invalid post-conditions.
1.69 + @since 7.0
1.70 + @param aAsyncState EAsyncCalled if the async function has been just been called,
1.71 + EAsyncCompleted if the function has completed.
1.72 + @return TBool ETrue if the post-conditions were valid, EFalse otherwise.
1.73 + @pre TTestController_Ctor_TransitionValidator is fully constructed.
1.74 + @post No change to the iUTContext class.
1.75 + */
1.76 + virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
1.77 + }; // TTestController_Ctor_TransitionValidator
1.78 +
1.79 +// ______________________________________________________________________________
1.80 +//
1.81 +/**
1.82 + @internalComponent
1.83 +
1.84 + Comments : Provide all the DtorUnit Test's specific
1.85 + validatation for the state of a transition before and after its execution.
1.86 + on the CTestController test class for a transition.
1.87 + */
1.88 +class TTestController_Dtor_TransitionValidator : public TTransitionValidator
1.89 + {
1.90 +public:
1.91 + /**
1.92 + @fn TTestController_Dtor_TransitionValidator(CUnitTestContext& aUTContext)
1.93 + Intended Usage :
1.94 + @leave KErrNoMemory
1.95 + @since 7.0
1.96 + @param aUTContext The context within which this transition is executing
1.97 + */
1.98 + inline TTestController_Dtor_TransitionValidator(CUnitTestContext& aUTContext);
1.99 +
1.100 + /**
1.101 + @fn ValidatePreConditions()
1.102 + Intended Usage : Implemented by the developer to check the
1.103 + end state of the transition behaviour.
1.104 + Error Condition : Invalid pre-conditions
1.105 + @since 7.0
1.106 + @return TBool ETrue if the pre-conditions were valid, EFalse otherwise.
1.107 + @pre TTestController_Dtor_TransitionValidator is fully constructed.
1.108 + @post No change to the iUTContext class.
1.109 + */
1.110 + virtual inline TBool ValidatePreConditions();
1.111 +
1.112 + /**
1.113 + @fn ValidatePostConditions(TTestBedAsyncState aAsyncState)
1.114 + Intended Usage : Implemented by the developer to check the
1.115 + end state of the transition behaviour.
1.116 + When overriding, if the transition calls an asynchronous function
1.117 + ValidatePostConditions will be called twice. Firstly, after the
1.118 + asynchronous function has been called and, secondly, after the
1.119 + asynchronous request has completed. The parameter aAsyncState can
1.120 + be used to distinguish between these two cases.
1.121 + Error Condition : Invalid post-conditions.
1.122 + @since 7.0
1.123 + @param aAsyncState EAsyncCalled if the async function has been just been called,
1.124 + EAsyncCompleted if the function has completed.
1.125 + @return TBool ETrue if the post-conditions were valid, EFalse otherwise.
1.126 + @pre TTestController_Dtor_TransitionValidator is fully constructed.
1.127 + @post No change to the iUTContext class.
1.128 + */
1.129 + virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
1.130 + }; // TTestController_Dtor_TransitionValidator
1.131 +
1.132 +// ______________________________________________________________________________
1.133 +//
1.134 +/**
1.135 + @internalComponent
1.136 +
1.137 + Comments : Provide all the ScanDriveUnit Test's specific
1.138 + validatation for the state of a transition before and after its execution.
1.139 + on the CTestController test class for a transition.
1.140 + */
1.141 +class TTestController_ScanDrive_TransitionValidator : public TTransitionValidator
1.142 + {
1.143 +public:
1.144 + /**
1.145 + @fn TTestController_ScanDrive_TransitionValidator(CUnitTestContext& aUTContext)
1.146 + Intended Usage :
1.147 + @leave KErrNoMemory
1.148 + @since 7.0
1.149 + @param aUTContext The context within which this transition is executing
1.150 + */
1.151 + inline TTestController_ScanDrive_TransitionValidator(CUnitTestContext& aUTContext);
1.152 +
1.153 + /**
1.154 + @fn ValidatePreConditions()
1.155 + Intended Usage : Implemented by the developer to check the
1.156 + end state of the transition behaviour.
1.157 + Error Condition : Invalid pre-conditions
1.158 + @since 7.0
1.159 + @return TBool ETrue if the pre-conditions were valid, EFalse otherwise.
1.160 + @pre TTestController_ScanDrive_TransitionValidator is fully constructed.
1.161 + @post No change to the iUTContext class.
1.162 + */
1.163 + virtual inline TBool ValidatePreConditions();
1.164 +
1.165 + /**
1.166 + @fn ValidatePostConditions(TTestBedAsyncState aAsyncState)
1.167 + Intended Usage : Implemented by the developer to check the
1.168 + end state of the transition behaviour.
1.169 + When overriding, if the transition calls an asynchronous function
1.170 + ValidatePostConditions will be called twice. Firstly, after the
1.171 + asynchronous function has been called and, secondly, after the
1.172 + asynchronous request has completed. The parameter aAsyncState can
1.173 + be used to distinguish between these two cases.
1.174 + Error Condition : Invalid post-conditions.
1.175 + @since 7.0
1.176 + @param aAsyncState EAsyncCalled if the async function has been just been called,
1.177 + EAsyncCompleted if the function has completed.
1.178 + @return TBool ETrue if the post-conditions were valid, EFalse otherwise.
1.179 + @pre TTestController_ScanDrive_TransitionValidator is fully constructed.
1.180 + @post No change to the iUTContext class.
1.181 + */
1.182 + virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
1.183 + }; // TTestController_ScanDrive_TransitionValidator
1.184 +
1.185 +// ______________________________________________________________________________
1.186 +//
1.187 +/**
1.188 + @internalComponent
1.189 +
1.190 + Comments : Provide all the DiscoverTestsUnit Test's specific
1.191 + validatation for the state of a transition before and after its execution.
1.192 + on the CTestController test class for a transition.
1.193 + */
1.194 +class TTestController_DiscoverTests_TransitionValidator : public TTransitionValidator
1.195 + {
1.196 +public:
1.197 + /**
1.198 + @fn TTestController_DiscoverTests_TransitionValidator(CUnitTestContext& aUTContext)
1.199 + Intended Usage :
1.200 + @leave KErrNoMemory
1.201 + @since 7.0
1.202 + @param aUTContext The context within which this transition is executing
1.203 + */
1.204 + inline TTestController_DiscoverTests_TransitionValidator(CUnitTestContext& aUTContext);
1.205 +
1.206 + /**
1.207 + @fn ValidatePreConditions()
1.208 + Intended Usage : Implemented by the developer to check the
1.209 + end state of the transition behaviour.
1.210 + Error Condition : Invalid pre-conditions
1.211 + @since 7.0
1.212 + @return TBool ETrue if the pre-conditions were valid, EFalse otherwise.
1.213 + @pre TTestController_DiscoverTests_TransitionValidator is fully constructed.
1.214 + @post No change to the iUTContext class.
1.215 + */
1.216 + virtual inline TBool ValidatePreConditions();
1.217 +
1.218 + /**
1.219 + @fn ValidatePostConditions(TTestBedAsyncState aAsyncState)
1.220 + Intended Usage : Implemented by the developer to check the
1.221 + end state of the transition behaviour.
1.222 + When overriding, if the transition calls an asynchronous function
1.223 + ValidatePostConditions will be called twice. Firstly, after the
1.224 + asynchronous function has been called and, secondly, after the
1.225 + asynchronous request has completed. The parameter aAsyncState can
1.226 + be used to distinguish between these two cases.
1.227 + Error Condition : Invalid post-conditions.
1.228 + @since 7.0
1.229 + @param aAsyncState EAsyncCalled if the async function has been just been called,
1.230 + EAsyncCompleted if the function has completed.
1.231 + @return TBool ETrue if the post-conditions were valid, EFalse otherwise.
1.232 + @pre TTestController_DiscoverTests_TransitionValidator is fully constructed.
1.233 + @post No change to the iUTContext class.
1.234 + */
1.235 + virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
1.236 + }; // TTestController_DiscoverTests_TransitionValidator
1.237 +
1.238 +// ______________________________________________________________________________
1.239 +//
1.240 +/**
1.241 + @internalComponent
1.242 +
1.243 + Comments : Provide all the FindComponentsUnit Test's specific
1.244 + validatation for the state of a transition before and after its execution.
1.245 + on the CTestController test class for a transition.
1.246 + */
1.247 +class TTestController_FindComponents_TransitionValidator : public TTransitionValidator
1.248 + {
1.249 +public:
1.250 + /**
1.251 + @fn TTestController_FindComponents_TransitionValidator(CUnitTestContext& aUTContext)
1.252 + Intended Usage :
1.253 + @leave KErrNoMemory
1.254 + @since 7.0
1.255 + @param aUTContext The context within which this transition is executing
1.256 + */
1.257 + inline TTestController_FindComponents_TransitionValidator(CUnitTestContext& aUTContext);
1.258 +
1.259 + /**
1.260 + @fn ValidatePreConditions()
1.261 + Intended Usage : Implemented by the developer to check the
1.262 + end state of the transition behaviour.
1.263 + Error Condition : Invalid pre-conditions
1.264 + @since 7.0
1.265 + @return TBool ETrue if the pre-conditions were valid, EFalse otherwise.
1.266 + @pre TTestController_FindComponents_TransitionValidator is fully constructed.
1.267 + @post No change to the iUTContext class.
1.268 + */
1.269 + virtual inline TBool ValidatePreConditions();
1.270 +
1.271 + /**
1.272 + @fn ValidatePostConditions(TTestBedAsyncState aAsyncState)
1.273 + Intended Usage : Implemented by the developer to check the
1.274 + end state of the transition behaviour.
1.275 + When overriding, if the transition calls an asynchronous function
1.276 + ValidatePostConditions will be called twice. Firstly, after the
1.277 + asynchronous function has been called and, secondly, after the
1.278 + asynchronous request has completed. The parameter aAsyncState can
1.279 + be used to distinguish between these two cases.
1.280 + Error Condition : Invalid post-conditions.
1.281 + @since 7.0
1.282 + @param aAsyncState EAsyncCalled if the async function has been just been called,
1.283 + EAsyncCompleted if the function has completed.
1.284 + @return TBool ETrue if the post-conditions were valid, EFalse otherwise.
1.285 + @pre TTestController_FindComponents_TransitionValidator is fully constructed.
1.286 + @post No change to the iUTContext class.
1.287 + */
1.288 + virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
1.289 + }; // TTestController_FindComponents_TransitionValidator
1.290 +
1.291 +// ______________________________________________________________________________
1.292 +//
1.293 +/**
1.294 + @internalComponent
1.295 +
1.296 + Comments : Provide all the GetUnitTestsUnit Test's specific
1.297 + validatation for the state of a transition before and after its execution.
1.298 + on the CTestController test class for a transition.
1.299 + */
1.300 +class TTestController_GetUnitTests_TransitionValidator : public TTransitionValidator
1.301 + {
1.302 +public:
1.303 + /**
1.304 + @fn TTestController_GetUnitTests_TransitionValidator(CUnitTestContext& aUTContext)
1.305 + Intended Usage :
1.306 + @leave KErrNoMemory
1.307 + @since 7.0
1.308 + @param aUTContext The context within which this transition is executing
1.309 + */
1.310 + inline TTestController_GetUnitTests_TransitionValidator(CUnitTestContext& aUTContext);
1.311 +
1.312 + /**
1.313 + @fn ValidatePreConditions()
1.314 + Intended Usage : Implemented by the developer to check the
1.315 + end state of the transition behaviour.
1.316 + Error Condition : Invalid pre-conditions
1.317 + @since 7.0
1.318 + @return TBool ETrue if the pre-conditions were valid, EFalse otherwise.
1.319 + @pre TTestController_GetUnitTests_TransitionValidator is fully constructed.
1.320 + @post No change to the iUTContext class.
1.321 + */
1.322 + virtual inline TBool ValidatePreConditions();
1.323 +
1.324 + /**
1.325 + @fn ValidatePostConditions(TTestBedAsyncState aAsyncState)
1.326 + Intended Usage : Implemented by the developer to check the
1.327 + end state of the transition behaviour.
1.328 + When overriding, if the transition calls an asynchronous function
1.329 + ValidatePostConditions will be called twice. Firstly, after the
1.330 + asynchronous function has been called and, secondly, after the
1.331 + asynchronous request has completed. The parameter aAsyncState can
1.332 + be used to distinguish between these two cases.
1.333 + Error Condition : Invalid post-conditions.
1.334 + @since 7.0
1.335 + @param aAsyncState EAsyncCalled if the async function has been just been called,
1.336 + EAsyncCompleted if the function has completed.
1.337 + @return TBool ETrue if the post-conditions were valid, EFalse otherwise.
1.338 + @pre TTestController_GetUnitTests_TransitionValidator is fully constructed.
1.339 + @post No change to the iUTContext class.
1.340 + */
1.341 + virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
1.342 + }; // TTestController_GetUnitTests_TransitionValidator
1.343 +
1.344 +// ______________________________________________________________________________
1.345 +//
1.346 +/**
1.347 + @internalComponent
1.348 +
1.349 + Comments : Provide all the StartUnit Test's specific
1.350 + validatation for the state of a transition before and after its execution.
1.351 + on the CTestController test class for a transition.
1.352 + */
1.353 +class TTestController_Start_TransitionValidator : public TTransitionValidator
1.354 + {
1.355 +public:
1.356 + /**
1.357 + @fn TTestController_Start_TransitionValidator(CUnitTestContext& aUTContext)
1.358 + Intended Usage :
1.359 + @leave KErrNoMemory
1.360 + @since 7.0
1.361 + @param aUTContext The context within which this transition is executing
1.362 + */
1.363 + inline TTestController_Start_TransitionValidator(CUnitTestContext& aUTContext);
1.364 +
1.365 + /**
1.366 + @fn ValidatePreConditions()
1.367 + Intended Usage : Implemented by the developer to check the
1.368 + end state of the transition behaviour.
1.369 + Error Condition : Invalid pre-conditions
1.370 + @since 7.0
1.371 + @return TBool ETrue if the pre-conditions were valid, EFalse otherwise.
1.372 + @pre TTestController_Start_TransitionValidator is fully constructed.
1.373 + @post No change to the iUTContext class.
1.374 + */
1.375 + virtual inline TBool ValidatePreConditions();
1.376 +
1.377 + /**
1.378 + @fn ValidatePostConditions(TTestBedAsyncState aAsyncState)
1.379 + Intended Usage : Implemented by the developer to check the
1.380 + end state of the transition behaviour.
1.381 + When overriding, if the transition calls an asynchronous function
1.382 + ValidatePostConditions will be called twice. Firstly, after the
1.383 + asynchronous function has been called and, secondly, after the
1.384 + asynchronous request has completed. The parameter aAsyncState can
1.385 + be used to distinguish between these two cases.
1.386 + Error Condition : Invalid post-conditions.
1.387 + @since 7.0
1.388 + @param aAsyncState EAsyncCalled if the async function has been just been called,
1.389 + EAsyncCompleted if the function has completed.
1.390 + @return TBool ETrue if the post-conditions were valid, EFalse otherwise.
1.391 + @pre TTestController_Start_TransitionValidator is fully constructed.
1.392 + @post No change to the iUTContext class.
1.393 + */
1.394 + virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
1.395 + }; // TTestController_Start_TransitionValidator
1.396 +
1.397 +
1.398 +#include "TestControllerTransitionValidation.inl"
1.399 +
1.400 +#endif // __TESTCONTROLLERTRANSITIONVALIDATION_H__
1.401 +