lowlevellibsandfws/pluginfw/Framework/LoadManagerTest/LoadManagerTransitionValidation.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 definition of the validation classes for CLoadManager testing.
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef __LOADMANAGERTRANSITIONVALIDATION_H__
       
    19 #define __LOADMANAGERTRANSITIONVALIDATION_H__
       
    20 
       
    21 #include "LoadManagerTransitions.h"
       
    22 
       
    23 
       
    24 // ______________________________________________________________________________
       
    25 //
       
    26 /**
       
    27 	@internalComponent
       
    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 CLoadManager test class for a transition.
       
    31  */
       
    32 class TLoadManager_Ctor_TransitionValidator : public TTransitionValidator
       
    33 	{
       
    34 public:
       
    35 	/**
       
    36 		@fn				TLoadManager_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 TLoadManager_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 			TLoadManager_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 			TLoadManager_Ctor_TransitionValidator is fully constructed.
       
    71 		@post			No change to the iUTContext class.
       
    72 	*/
       
    73 	virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
       
    74 	};	// TLoadManager_Ctor_TransitionValidator
       
    75 
       
    76 // ______________________________________________________________________________
       
    77 //
       
    78 /**
       
    79 	@internalComponent
       
    80 	Comments : Provide all the DtorUnit Test's specific
       
    81 	validatation for the state of a transition before and after its execution.
       
    82 	on the CLoadManager test class for a transition.
       
    83  */
       
    84 class TLoadManager_Dtor_TransitionValidator : public TTransitionValidator
       
    85 	{
       
    86 public:
       
    87 	/**
       
    88 		@fn				TLoadManager_Dtor_TransitionValidator(CUnitTestContext& aUTContext)
       
    89 		Intended Usage	: Default constructor.
       
    90 		@leave  		KErrNoMemory
       
    91 		@since			7.0
       
    92 		@param			aUTContext The context within which this transition is executing
       
    93 	 */
       
    94 	inline TLoadManager_Dtor_TransitionValidator(CUnitTestContext& aUTContext);
       
    95 
       
    96 	/**
       
    97 		@fn				ValidatePreConditions()
       
    98 		Intended Usage	: Implemented by the developer to check the
       
    99 						end state of the transition behaviour.
       
   100 		Error Condition	: Invalid pre-conditions
       
   101 		@since			7.0
       
   102 		@return			TBool ETrue if the pre-conditions were valid, EFalse otherwise.
       
   103 		@pre 			TLoadManager_Dtor_TransitionValidator is fully constructed.
       
   104 		@post			No change to the iUTContext class.
       
   105 	*/
       
   106 	virtual inline TBool ValidatePreConditions();
       
   107 
       
   108 	/**
       
   109 		@fn				ValidatePostConditions(TTestBedAsyncState aAsyncState)
       
   110 		Intended Usage	:	Implemented by the developer to check the
       
   111 						end state of the transition behaviour.
       
   112 						When overriding, if the transition calls an asynchronous function
       
   113 						ValidatePostConditions will be called twice. Firstly, after the
       
   114 						asynchronous function has been called and, secondly, after the 
       
   115 						asynchronous request has completed. The parameter aAsyncState can
       
   116 						be used to distinguish between these two cases.
       
   117 		Error Condition	: Invalid post-conditions.
       
   118 		@since			7.0
       
   119 		@param			aAsyncState EAsyncCalled if the async function has been just been called,
       
   120 						EAsyncCompleted if the function has completed.
       
   121 		@return			TBool ETrue if the post-conditions were valid, EFalse otherwise.
       
   122 		@pre 			TLoadManager_Dtor_TransitionValidator is fully constructed.
       
   123 		@post			No change to the iUTContext class.
       
   124 	*/
       
   125 	virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
       
   126 	};	// TLoadManager_Dtor_TransitionValidator
       
   127 
       
   128 // ______________________________________________________________________________
       
   129 //
       
   130 /**
       
   131 	@internalComponent 
       
   132 	Comments : Provide all the InstantiationMethodUnit Test's specific
       
   133 	validatation for the state of a transition before and after its execution.
       
   134 	on the CLoadManager test class for a transition.
       
   135  */
       
   136 class TLoadManager_InstantiationMethod_TransitionValidator : public TTransitionValidator
       
   137 	{
       
   138 public:
       
   139 	/**
       
   140 		@fn				TLoadManager_InstantiationMethod_TransitionValidator(CUnitTestContext& aUTContext)
       
   141 		Intended Usage	: Default constructor
       
   142 		@leave  		KErrNoMemory
       
   143 		@since			7.0
       
   144 		@param			aUTContext The context within which this transition is executing
       
   145 	 */
       
   146 	inline TLoadManager_InstantiationMethod_TransitionValidator(CUnitTestContext& aUTContext);
       
   147 
       
   148 	/**
       
   149 		@fn				ValidatePreConditions()
       
   150 		Intended Usage	: Implemented by the developer to check the
       
   151 						end state of the transition behaviour.
       
   152 		Error Condition	: Invalid pre-conditions
       
   153 		@since			7.0
       
   154 		@return			TBool ETrue if the pre-conditions were valid, EFalse otherwise.
       
   155 		@pre 			TLoadManager_InstantiationMethod_TransitionValidator is fully constructed.
       
   156 		@post			No change to the iUTContext class.
       
   157 	*/
       
   158 	virtual inline TBool ValidatePreConditions();
       
   159 
       
   160 	/**
       
   161 		@fn				ValidatePostConditions(TTestBedAsyncState aAsyncState)
       
   162 		Intended Usage	:	Implemented by the developer to check the
       
   163 						end state of the transition behaviour.
       
   164 						When overriding, if the transition calls an asynchronous function
       
   165 						ValidatePostConditions will be called twice. Firstly, after the
       
   166 						asynchronous function has been called and, secondly, after the 
       
   167 						asynchronous request has completed. The parameter aAsyncState can
       
   168 						be used to distinguish between these two cases.
       
   169 		Error Condition	: Invalid post-conditions.
       
   170 		@since			7.0
       
   171 		@param			aAsyncState EAsyncCalled if the async function has been just been called,
       
   172 						EAsyncCompleted if the function has completed.
       
   173 		@return			TBool ETrue if the post-conditions were valid, EFalse otherwise.
       
   174 		@pre 			TLoadManager_InstantiationMethod_TransitionValidator is fully constructed.
       
   175 		@post			No change to the iUTContext class.
       
   176 	*/
       
   177 	virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
       
   178 	};	// TLoadManager_InstantiationMethod_TransitionValidator
       
   179 
       
   180 // ______________________________________________________________________________
       
   181 //
       
   182 /**
       
   183 	@internalComponent
       
   184 	Comments : Provide all the InstantiationMethodUnit Test's specific
       
   185 	validatation for the state of a transition before and after its execution.
       
   186 	on the CLoadManager test class for a transition.
       
   187  */
       
   188 class TLoadManager_InstantiationFailure_TransitionValidator : public TTransitionValidator
       
   189 	{
       
   190 public:
       
   191 	/**
       
   192 		@fn				TLoadManager_InstantiationFailure_TransitionValidator(CUnitTestContext& aUTContext)
       
   193 		Intended Usage	:	
       
   194 		@leave  		KErrNoMemory
       
   195 		@since			7.0
       
   196 		@param			aUTContext The context within which this transition is executing
       
   197 	 */
       
   198 	inline TLoadManager_InstantiationFailure_TransitionValidator(CUnitTestContext& aUTContext);
       
   199 
       
   200 	/**
       
   201 		@fn				ValidatePreConditions()
       
   202 		Intended Usage	: Implemented by the developer to check the
       
   203 						end state of the transition behaviour.
       
   204 		Error Condition	: Invalid pre-conditions
       
   205 		@since			7.0
       
   206 		@return			TBool ETrue if the pre-conditions were valid, EFalse otherwise.
       
   207 		@pre 			TLoadManager_InstantiationFailure_TransitionValidator is fully constructed.
       
   208 		@post			No change to the iUTContext class.
       
   209 	*/
       
   210 	virtual inline TBool ValidatePreConditions();
       
   211 
       
   212 	/**
       
   213 		@fn				ValidatePostConditions(TTestBedAsyncState aAsyncState)
       
   214 		Intended Usage	:	Implemented by the developer to check the
       
   215 						end state of the transition behaviour.
       
   216 						When overriding, if the transition calls an asynchronous function
       
   217 						ValidatePostConditions will be called twice. Firstly, after the
       
   218 						asynchronous function has been called and, secondly, after the 
       
   219 						asynchronous request has completed. The parameter aAsyncState can
       
   220 						be used to distinguish between these two cases.
       
   221 		Error Condition	: Invalid post-conditions.
       
   222 		@since			7.0
       
   223 		@param			aAsyncState EAsyncCalled if the async function has been just been called,
       
   224 						EAsyncCompleted if the function has completed.
       
   225 		@return			TBool ETrue if the post-conditions were valid, EFalse otherwise.
       
   226 		@pre 			TLoadManager_InstantiationFailure_TransitionValidator is fully constructed.
       
   227 		@post			No change to the iUTContext class.
       
   228 	*/
       
   229 	virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
       
   230 	};	// TLoadManager_InstantiationFailure_TransitionValidator
       
   231 
       
   232 // ______________________________________________________________________________
       
   233 //
       
   234 /**
       
   235 	@internalComponent
       
   236 	Comments : Provide all the DestroyThisUnit Test's specific
       
   237 	validatation for the state of a transition before and after its execution.
       
   238 	on the CLoadManager test class for a transition.
       
   239  */
       
   240 class TLoadManager_DestroyThis_TransitionValidator : public TTransitionValidator
       
   241 	{
       
   242 public:
       
   243 	/**
       
   244 		@fn				TLoadManager_DestroyThis_TransitionValidator(CUnitTestContext& aUTContext)
       
   245 		Intended Usage	: Default constructor
       
   246 		@leave  		KErrNoMemory
       
   247 		@since			7.0
       
   248 		@param			aUTContext The context within which this transition is executing
       
   249 	 */
       
   250 	inline TLoadManager_DestroyThis_TransitionValidator(CUnitTestContext& aUTContext);
       
   251 
       
   252 	/**
       
   253 		@fn				ValidatePreConditions()
       
   254 		Intended Usage	: Implemented by the developer to check the
       
   255 						end state of the transition behaviour.
       
   256 		Error Condition	: Invalid pre-conditions
       
   257 		@since			7.0
       
   258 		@return			TBool ETrue if the pre-conditions were valid, EFalse otherwise.
       
   259 		@pre 			TLoadManager_DestroyThis_TransitionValidator is fully constructed.
       
   260 		@post			No change to the iUTContext class.
       
   261 	*/
       
   262 	virtual inline TBool ValidatePreConditions();
       
   263 
       
   264 	/**
       
   265 		@fn				ValidatePostConditions(TTestBedAsyncState aAsyncState)
       
   266 		Intended Usage	:	Implemented by the developer to check the
       
   267 						end state of the transition behaviour.
       
   268 						When overriding, if the transition calls an asynchronous function
       
   269 						ValidatePostConditions will be called twice. Firstly, after the
       
   270 						asynchronous function has been called and, secondly, after the 
       
   271 						asynchronous request has completed. The parameter aAsyncState can
       
   272 						be used to distinguish between these two cases.
       
   273 		Error Condition	: Invalid post-conditions.
       
   274 		@since			7.0
       
   275 		@param			aAsyncState EAsyncCalled if the async function has been just been called,
       
   276 						EAsyncCompleted if the function has completed.
       
   277 		@return			TBool ETrue if the post-conditions were valid, EFalse otherwise.
       
   278 		@pre 			TLoadManager_DestroyThis_TransitionValidator is fully constructed.
       
   279 		@post			No change to the iUTContext class.
       
   280 	*/
       
   281 	virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
       
   282 	};	// TLoadManager_DestroyThis_TransitionValidator
       
   283 
       
   284 #include "LoadManagerTransitionValidation.inl"
       
   285 
       
   286 #endif // __LOADMANAGERTRANSITIONVALIDATION_H__