lowlevellibsandfws/pluginfw/Test_Bed/UnitTestTest/UnitTestTransitionValidation.h
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     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 CUnitTest class methods.
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef __UNITTESTTRANSITIONVALIDATION_H__
       
    19 #define __UNITTESTTRANSITIONVALIDATION_H__
       
    20 
       
    21 #include "UnitTestTransitions.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 CUnitTest test class for a transition.
       
    31  */
       
    32 class TUnitTest_Ctor_TransitionValidator : public TTransitionValidator
       
    33 	{
       
    34 public:
       
    35 	/**
       
    36 		@fn				TUnitTest_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 TUnitTest_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 			TUnitTest_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 			TUnitTest_Ctor_TransitionValidator is fully constructed.
       
    71 		@post			No change to the iUTContext class.
       
    72 	*/
       
    73 	virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
       
    74 	};	// TUnitTest_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 CUnitTest test class for a transition.
       
    84  */
       
    85 class TUnitTest_Dtor_TransitionValidator : public TTransitionValidator
       
    86 	{
       
    87 public:
       
    88 	/**
       
    89 		@fn				TUnitTest_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 TUnitTest_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 			TUnitTest_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 			TUnitTest_Dtor_TransitionValidator is fully constructed.
       
   124 		@post			No change to the iUTContext class.
       
   125 	*/
       
   126 	virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
       
   127 	};	// TUnitTest_Dtor_TransitionValidator
       
   128 
       
   129 // ______________________________________________________________________________
       
   130 //
       
   131 /**
       
   132 	@internalComponent
       
   133 
       
   134 	Comments : Provide all the TransitionSetUnit Test's specific
       
   135 	validatation for the state of a transition before and after its execution.
       
   136 	on the CUnitTest test class for a transition.
       
   137  */
       
   138 class TUnitTest_TransitionSet_TransitionValidator : public TTransitionValidator
       
   139 	{
       
   140 public:
       
   141 	/**
       
   142 		@fn				TUnitTest_TransitionSet_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 TUnitTest_TransitionSet_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 			TUnitTest_TransitionSet_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 			TUnitTest_TransitionSet_TransitionValidator is fully constructed.
       
   177 		@post			No change to the iUTContext class.
       
   178 	*/
       
   179 	virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
       
   180 	};	// TUnitTest_TransitionSet_TransitionValidator
       
   181 
       
   182 // ______________________________________________________________________________
       
   183 //
       
   184 /**
       
   185 	@internalComponent
       
   186 
       
   187 	Comments : Provide all the GetCurrentTransitionUnit Test's specific
       
   188 	validatation for the state of a transition before and after its execution.
       
   189 	on the CUnitTest test class for a transition.
       
   190  */
       
   191 class TUnitTest_GetCurrentTransition_TransitionValidator : public TTransitionValidator
       
   192 	{
       
   193 public:
       
   194 	/**
       
   195 		@fn				TUnitTest_GetCurrentTransition_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 TUnitTest_GetCurrentTransition_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 			TUnitTest_GetCurrentTransition_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 			TUnitTest_GetCurrentTransition_TransitionValidator is fully constructed.
       
   230 		@post			No change to the iUTContext class.
       
   231 	*/
       
   232 	virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
       
   233 	};	// TUnitTest_GetCurrentTransition_TransitionValidator
       
   234 
       
   235 // ______________________________________________________________________________
       
   236 //
       
   237 /**
       
   238 	@internalComponent
       
   239 
       
   240 	Comments : Provide all the SetCurrentTransitionUnit Test's specific
       
   241 	validatation for the state of a transition before and after its execution.
       
   242 	on the CUnitTest test class for a transition.
       
   243  */
       
   244 class TUnitTest_SetCurrentTransition_TransitionValidator : public TTransitionValidator
       
   245 	{
       
   246 public:
       
   247 	/**
       
   248 		@fn				TUnitTest_SetCurrentTransition_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 TUnitTest_SetCurrentTransition_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 			TUnitTest_SetCurrentTransition_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 			TUnitTest_SetCurrentTransition_TransitionValidator is fully constructed.
       
   283 		@post			No change to the iUTContext class.
       
   284 	*/
       
   285 	virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
       
   286 	};	// TUnitTest_SetCurrentTransition_TransitionValidator
       
   287 
       
   288 // ______________________________________________________________________________
       
   289 //
       
   290 /**
       
   291 	@internalComponent
       
   292 
       
   293 	Comments : Provide all the SetParametersUnit Test's specific
       
   294 	validatation for the state of a transition before and after its execution.
       
   295 	on the CUnitTest test class for a transition.
       
   296  */
       
   297 class TUnitTest_SetParameters_TransitionValidator : public TTransitionValidator
       
   298 	{
       
   299 public:
       
   300 	/**
       
   301 		@fn				TUnitTest_SetParameters_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 TUnitTest_SetParameters_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 			TUnitTest_SetParameters_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 			TUnitTest_SetParameters_TransitionValidator is fully constructed.
       
   336 		@post			No change to the iUTContext class.
       
   337 	*/
       
   338 	virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
       
   339 	};	// TUnitTest_SetParameters_TransitionValidator
       
   340 
       
   341 // ______________________________________________________________________________
       
   342 //
       
   343 /**
       
   344 	@internalComponent
       
   345 
       
   346 	Comments : Provide all the PrepareUnitTestUnit Test's specific
       
   347 	validatation for the state of a transition before and after its execution.
       
   348 	on the CUnitTest test class for a transition.
       
   349  */
       
   350 class TUnitTest_PrepareUnitTest_TransitionValidator : public TTransitionValidator
       
   351 	{
       
   352 public:
       
   353 	/**
       
   354 		@fn				TUnitTest_PrepareUnitTest_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 TUnitTest_PrepareUnitTest_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 			TUnitTest_PrepareUnitTest_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 			TUnitTest_PrepareUnitTest_TransitionValidator is fully constructed.
       
   389 		@post			No change to the iUTContext class.
       
   390 	*/
       
   391 	virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
       
   392 	};	// TUnitTest_PrepareUnitTest_TransitionValidator
       
   393 
       
   394 // ______________________________________________________________________________
       
   395 //
       
   396 /**
       
   397 	@internalComponent
       
   398 
       
   399 	Comments : Provide all the RunTestUnit Test's specific
       
   400 	validatation for the state of a transition before and after its execution.
       
   401 	on the CUnitTest test class for a transition.
       
   402  */
       
   403 class TUnitTest_RunTest_TransitionValidator : public TTransitionValidator
       
   404 	{
       
   405 public:
       
   406 	/**
       
   407 		@fn				TUnitTest_RunTest_TransitionValidator(CUnitTestContext& aUTContext)
       
   408 		Intended Usage	:	
       
   409 		@leave  		KErrNoMemory
       
   410 		@since			7.0
       
   411 		@param			aUTContext The context within which this transition is executing
       
   412 	 */
       
   413 	inline TUnitTest_RunTest_TransitionValidator(CUnitTestContext& aUTContext);
       
   414 
       
   415 	/**
       
   416 		@fn				ValidatePreConditions()
       
   417 		Intended Usage	: Implemented by the developer to check the
       
   418 						end state of the transition behaviour.
       
   419 		Error Condition	: Invalid pre-conditions
       
   420 		@since			7.0
       
   421 		@return			TBool ETrue if the pre-conditions were valid, EFalse otherwise.
       
   422 		@pre 			TUnitTest_RunTest_TransitionValidator is fully constructed.
       
   423 		@post			No change to the iUTContext class.
       
   424 	*/
       
   425 	virtual inline TBool ValidatePreConditions();
       
   426 
       
   427 	/**
       
   428 		@fn				ValidatePostConditions(TTestBedAsyncState aAsyncState)
       
   429 		Intended Usage	:	Implemented by the developer to check the
       
   430 						end state of the transition behaviour.
       
   431 						When overriding, if the transition calls an asynchronous function
       
   432 						ValidatePostConditions will be called twice. Firstly, after the
       
   433 						asynchronous function has been called and, secondly, after the 
       
   434 						asynchronous request has completed. The parameter aAsyncState can
       
   435 						be used to distinguish between these two cases.
       
   436 		Error Condition	: Invalid post-conditions.
       
   437 		@since			7.0
       
   438 		@param			aAsyncState EAsyncCalled if the async function has been just been called,
       
   439 						EAsyncCompleted if the function has completed.
       
   440 		@return			TBool ETrue if the post-conditions were valid, EFalse otherwise.
       
   441 		@pre 			TUnitTest_RunTest_TransitionValidator is fully constructed.
       
   442 		@post			No change to the iUTContext class.
       
   443 	*/
       
   444 	virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
       
   445 	};	// TUnitTest_RunTest_TransitionValidator
       
   446 
       
   447 // ______________________________________________________________________________
       
   448 //
       
   449 /**
       
   450 	@internalComponent
       
   451 
       
   452 	Comments : Provide all the AddTransitionUnit Test's specific
       
   453 	validatation for the state of a transition before and after its execution.
       
   454 	on the CUnitTest test class for a transition.
       
   455  */
       
   456 class TUnitTest_AddTransition_TransitionValidator : public TTransitionValidator
       
   457 	{
       
   458 public:
       
   459 	/**
       
   460 		@fn				TUnitTest_AddTransition_TransitionValidator(CUnitTestContext& aUTContext)
       
   461 		Intended Usage	:	
       
   462 		@leave  		KErrNoMemory
       
   463 		@since			7.0
       
   464 		@param			aUTContext The context within which this transition is executing
       
   465 	 */
       
   466 	inline TUnitTest_AddTransition_TransitionValidator(CUnitTestContext& aUTContext);
       
   467 
       
   468 	/**
       
   469 		@fn				ValidatePreConditions()
       
   470 		Intended Usage	: Implemented by the developer to check the
       
   471 						end state of the transition behaviour.
       
   472 		Error Condition	: Invalid pre-conditions
       
   473 		@since			7.0
       
   474 		@return			TBool ETrue if the pre-conditions were valid, EFalse otherwise.
       
   475 		@pre 			TUnitTest_AddTransition_TransitionValidator is fully constructed.
       
   476 		@post			No change to the iUTContext class.
       
   477 	*/
       
   478 	virtual inline TBool ValidatePreConditions();
       
   479 
       
   480 	/**
       
   481 		@fn				ValidatePostConditions(TTestBedAsyncState aAsyncState)
       
   482 		Intended Usage	:	Implemented by the developer to check the
       
   483 						end state of the transition behaviour.
       
   484 						When overriding, if the transition calls an asynchronous function
       
   485 						ValidatePostConditions will be called twice. Firstly, after the
       
   486 						asynchronous function has been called and, secondly, after the 
       
   487 						asynchronous request has completed. The parameter aAsyncState can
       
   488 						be used to distinguish between these two cases.
       
   489 		Error Condition	: Invalid post-conditions.
       
   490 		@since			7.0
       
   491 		@param			aAsyncState EAsyncCalled if the async function has been just been called,
       
   492 						EAsyncCompleted if the function has completed.
       
   493 		@return			TBool ETrue if the post-conditions were valid, EFalse otherwise.
       
   494 		@pre 			TUnitTest_AddTransition_TransitionValidator is fully constructed.
       
   495 		@post			No change to the iUTContext class.
       
   496 	*/
       
   497 	virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
       
   498 	};	// TUnitTest_AddTransition_TransitionValidator
       
   499 
       
   500 // ______________________________________________________________________________
       
   501 //
       
   502 /**
       
   503 	@internalComponent
       
   504 
       
   505 	Comments : Provide all the AddBlockingTransitionUnit Test's specific
       
   506 	validatation for the state of a transition before and after its execution.
       
   507 	on the CUnitTest test class for a transition.
       
   508  */
       
   509 class TUnitTest_AddBlockingTransition_TransitionValidator : public TTransitionValidator
       
   510 	{
       
   511 public:
       
   512 	/**
       
   513 		@fn				TUnitTest_AddBlockingTransition_TransitionValidator(CUnitTestContext& aUTContext)
       
   514 		Intended Usage	:	
       
   515 		@leave  		KErrNoMemory
       
   516 		@since			7.0
       
   517 		@param			aUTContext The context within which this transition is executing
       
   518 	 */
       
   519 	inline TUnitTest_AddBlockingTransition_TransitionValidator(CUnitTestContext& aUTContext);
       
   520 
       
   521 	/**
       
   522 		@fn				ValidatePreConditions()
       
   523 		Intended Usage	: Implemented by the developer to check the
       
   524 						end state of the transition behaviour.
       
   525 		Error Condition	: Invalid pre-conditions
       
   526 		@since			7.0
       
   527 		@return			TBool ETrue if the pre-conditions were valid, EFalse otherwise.
       
   528 		@pre 			TUnitTest_AddBlockingTransition_TransitionValidator is fully constructed.
       
   529 		@post			No change to the iUTContext class.
       
   530 	*/
       
   531 	virtual inline TBool ValidatePreConditions();
       
   532 
       
   533 	/**
       
   534 		@fn				ValidatePostConditions(TTestBedAsyncState aAsyncState)
       
   535 		Intended Usage	:	Implemented by the developer to check the
       
   536 						end state of the transition behaviour.
       
   537 						When overriding, if the transition calls an asynchronous function
       
   538 						ValidatePostConditions will be called twice. Firstly, after the
       
   539 						asynchronous function has been called and, secondly, after the 
       
   540 						asynchronous request has completed. The parameter aAsyncState can
       
   541 						be used to distinguish between these two cases.
       
   542 		Error Condition	: Invalid post-conditions.
       
   543 		@since			7.0
       
   544 		@param			aAsyncState EAsyncCalled if the async function has been just been called,
       
   545 						EAsyncCompleted if the function has completed.
       
   546 		@return			TBool ETrue if the post-conditions were valid, EFalse otherwise.
       
   547 		@pre 			TUnitTest_AddBlockingTransition_TransitionValidator is fully constructed.
       
   548 		@post			No change to the iUTContext class.
       
   549 	*/
       
   550 	virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
       
   551 	};	// TUnitTest_AddBlockingTransition_TransitionValidator
       
   552 
       
   553 // ______________________________________________________________________________
       
   554 //
       
   555 /**
       
   556 	@internalComponent
       
   557 
       
   558 	Comments : Provide all the AddLeaveErrorCodeUnit Test's specific
       
   559 	validatation for the state of a transition before and after its execution.
       
   560 	on the CUnitTest test class for a transition.
       
   561  */
       
   562 class TUnitTest_AddLeaveErrorCode_TransitionValidator : public TTransitionValidator
       
   563 	{
       
   564 public:
       
   565 	/**
       
   566 		@fn				TUnitTest_AddLeaveErrorCode_TransitionValidator(CUnitTestContext& aUTContext)
       
   567 		Intended Usage	:	
       
   568 		@leave  		KErrNoMemory
       
   569 		@since			7.0
       
   570 		@param			aUTContext The context within which this transition is executing
       
   571 	 */
       
   572 	inline TUnitTest_AddLeaveErrorCode_TransitionValidator(CUnitTestContext& aUTContext);
       
   573 
       
   574 	/**
       
   575 		@fn				ValidatePreConditions()
       
   576 		Intended Usage	: Implemented by the developer to check the
       
   577 						end state of the transition behaviour.
       
   578 		Error Condition	: Invalid pre-conditions
       
   579 		@since			7.0
       
   580 		@return			TBool ETrue if the pre-conditions were valid, EFalse otherwise.
       
   581 		@pre 			TUnitTest_AddLeaveErrorCode_TransitionValidator is fully constructed.
       
   582 		@post			No change to the iUTContext class.
       
   583 	*/
       
   584 	virtual inline TBool ValidatePreConditions();
       
   585 
       
   586 	/**
       
   587 		@fn				ValidatePostConditions(TTestBedAsyncState aAsyncState)
       
   588 		Intended Usage	:	Implemented by the developer to check the
       
   589 						end state of the transition behaviour.
       
   590 						When overriding, if the transition calls an asynchronous function
       
   591 						ValidatePostConditions will be called twice. Firstly, after the
       
   592 						asynchronous function has been called and, secondly, after the 
       
   593 						asynchronous request has completed. The parameter aAsyncState can
       
   594 						be used to distinguish between these two cases.
       
   595 		Error Condition	: Invalid post-conditions.
       
   596 		@since			7.0
       
   597 		@param			aAsyncState EAsyncCalled if the async function has been just been called,
       
   598 						EAsyncCompleted if the function has completed.
       
   599 		@return			TBool ETrue if the post-conditions were valid, EFalse otherwise.
       
   600 		@pre 			TUnitTest_AddLeaveErrorCode_TransitionValidator is fully constructed.
       
   601 		@post			No change to the iUTContext class.
       
   602 	*/
       
   603 	virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
       
   604 	};	// TUnitTest_AddLeaveErrorCode_TransitionValidator
       
   605 
       
   606 // ______________________________________________________________________________
       
   607 //
       
   608 /**
       
   609 	@internalComponent
       
   610 
       
   611 	Comments : Provide all the UnitTestNameUnit Test's specific
       
   612 	validatation for the state of a transition before and after its execution.
       
   613 	on the CUnitTest test class for a transition.
       
   614  */
       
   615 class TUnitTest_UnitTestName_TransitionValidator : public TTransitionValidator
       
   616 	{
       
   617 public:
       
   618 	/**
       
   619 		@fn				TUnitTest_UnitTestName_TransitionValidator(CUnitTestContext& aUTContext)
       
   620 		Intended Usage	:	
       
   621 		@leave  		KErrNoMemory
       
   622 		@since			7.0
       
   623 		@param			aUTContext The context within which this transition is executing
       
   624 	 */
       
   625 	inline TUnitTest_UnitTestName_TransitionValidator(CUnitTestContext& aUTContext);
       
   626 
       
   627 	/**
       
   628 		@fn				ValidatePreConditions()
       
   629 		Intended Usage	: Implemented by the developer to check the
       
   630 						end state of the transition behaviour.
       
   631 		Error Condition	: Invalid pre-conditions
       
   632 		@since			7.0
       
   633 		@return			TBool ETrue if the pre-conditions were valid, EFalse otherwise.
       
   634 		@pre 			TUnitTest_UnitTestName_TransitionValidator is fully constructed.
       
   635 		@post			No change to the iUTContext class.
       
   636 	*/
       
   637 	virtual inline TBool ValidatePreConditions();
       
   638 
       
   639 	/**
       
   640 		@fn				ValidatePostConditions(TTestBedAsyncState aAsyncState)
       
   641 		Intended Usage	:	Implemented by the developer to check the
       
   642 						end state of the transition behaviour.
       
   643 						When overriding, if the transition calls an asynchronous function
       
   644 						ValidatePostConditions will be called twice. Firstly, after the
       
   645 						asynchronous function has been called and, secondly, after the 
       
   646 						asynchronous request has completed. The parameter aAsyncState can
       
   647 						be used to distinguish between these two cases.
       
   648 		Error Condition	: Invalid post-conditions.
       
   649 		@since			7.0
       
   650 		@param			aAsyncState EAsyncCalled if the async function has been just been called,
       
   651 						EAsyncCompleted if the function has completed.
       
   652 		@return			TBool ETrue if the post-conditions were valid, EFalse otherwise.
       
   653 		@pre 			TUnitTest_UnitTestName_TransitionValidator is fully constructed.
       
   654 		@post			No change to the iUTContext class.
       
   655 	*/
       
   656 	virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
       
   657 	};	// TUnitTest_UnitTestName_TransitionValidator
       
   658 
       
   659 
       
   660 
       
   661 #include "UnitTestTransitionValidation.inl"
       
   662 
       
   663 #endif // __UNITTESTTRANSITIONVALIDATION_H__
       
   664