lowlevellibsandfws/pluginfw/Test_Bed/ComponentInfoTest/ComponentInfoTransitionValidation.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 CComponentInfo class methods.
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef __COMPONENTINFOTRANSITIONVALIDATION_H__
       
    19 #define __COMPONENTINFOTRANSITIONVALIDATION_H__
       
    20 
       
    21 #include "ComponentInfoTransitions.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 CComponentInfo test class for a transition.
       
    31  */
       
    32 class TComponentInfo_Ctor_TransitionValidator : public TTransitionValidator
       
    33 	{
       
    34 public:
       
    35 	/**
       
    36 		@fn				TComponentInfo_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 TComponentInfo_Ctor_TransitionValidator(CUnitTestContext& aUTContext);
       
    43 
       
    44 	/**
       
    45 		@fn				ValidatePreConditions()
       
    46 		Intended Usage	: Checks the start state of the ComponentInfo transition behaviour.
       
    47 		Error Condition	: Invalid pre-conditions
       
    48 		@since			7.0
       
    49 		@return			ETrue if the pre-conditions were valid, EFalse otherwise.
       
    50 		@pre 			TComponentInfo_Ctor_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			7.0
       
    66 		@param			aAsyncState EAsyncCalled if the async function has been just been called,
       
    67 						EAsyncCompleted if the function has completed.
       
    68 		@return			ETrue if the post-conditions were valid, EFalse otherwise.
       
    69 		@pre 			TComponentInfo_Ctor_TransitionValidator is fully constructed.
       
    70 		@post			No change to the iUTContext class.
       
    71 	*/
       
    72 	virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
       
    73 	};	// TComponentInfo_Ctor_TransitionValidator
       
    74 
       
    75 // ______________________________________________________________________________
       
    76 //
       
    77 /**
       
    78 	@internalComponent
       
    79 
       
    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 CComponentInfo test class for a transition.
       
    83  */
       
    84 class TComponentInfo_Dtor_TransitionValidator : public TTransitionValidator
       
    85 	{
       
    86 public:
       
    87 	/**
       
    88 		@fn				TComponentInfo_Dtor_TransitionValidator(CUnitTestContext& aUTContext)
       
    89 		Intended Usage	:	
       
    90 		@leave  		KErrNoMemory
       
    91 		@since			7.0
       
    92 		@param			aUTContext The context within which this transition is executing
       
    93 	 */
       
    94 	inline TComponentInfo_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 			TComponentInfo_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 			TComponentInfo_Dtor_TransitionValidator is fully constructed.
       
   123 		@post			No change to the iUTContext class.
       
   124 	*/
       
   125 	virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
       
   126 	};	// TComponentInfo_Dtor_TransitionValidator
       
   127 
       
   128 // ______________________________________________________________________________
       
   129 //
       
   130 /**
       
   131 	@internalComponent
       
   132 
       
   133 	Comments : Provide all the EntryUnit Test's specific
       
   134 	validatation for the state of a transition before and after its execution.
       
   135 	on the CComponentInfo test class for a transition.
       
   136  */
       
   137 class TComponentInfo_Entry_TransitionValidator : public TTransitionValidator
       
   138 	{
       
   139 public:
       
   140 	/**
       
   141 		@fn				TComponentInfo_Entry_TransitionValidator(CUnitTestContext& aUTContext)
       
   142 		Intended Usage	:	
       
   143 		@leave			KErrNoMemory
       
   144 		@since			7.0
       
   145 		@param			aUTContext The context within which this transition is executing
       
   146 	 */
       
   147 	inline TComponentInfo_Entry_TransitionValidator(CUnitTestContext& aUTContext);
       
   148 
       
   149 	/**
       
   150 		@fn				ValidatePreConditions()
       
   151 		Intended Usage	: Implemented by the developer to check the
       
   152 						end state of the transition behaviour.
       
   153 		Error Condition	: Invalid pre-conditions
       
   154 		@since			7.0
       
   155 		@return			TBool ETrue if the pre-conditions were valid, EFalse otherwise.
       
   156 		@pre 			TComponentInfo_Entry_TransitionValidator is fully constructed.
       
   157 		@post			No change to the iUTContext class.
       
   158 	*/
       
   159 	virtual inline TBool ValidatePreConditions();
       
   160 
       
   161 	/**
       
   162 		@fn				ValidatePostConditions(TTestBedAsyncState aAsyncState)
       
   163 		Intended Usage	:	Implemented by the developer to check the
       
   164 						end state of the transition behaviour.
       
   165 						When overriding, if the transition calls an asynchronous function
       
   166 						ValidatePostConditions will be called twice. Firstly, after the
       
   167 						asynchronous function has been called and, secondly, after the 
       
   168 						asynchronous request has completed. The parameter aAsyncState can
       
   169 						be used to distinguish between these two cases.
       
   170 		Error Condition	: Invalid post-conditions.
       
   171 		@since			7.0
       
   172 		@param			aAsyncState EAsyncCalled if the async function has been just been called,
       
   173 						EAsyncCompleted if the function has completed.
       
   174 		@return			TBool ETrue if the post-conditions were valid, EFalse otherwise.
       
   175 		@pre 			TComponentInfo_Entry_TransitionValidator is fully constructed.
       
   176 		@post			No change to the iUTContext class.
       
   177 	*/
       
   178 	virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
       
   179 	};	// TComponentInfo_Entry_TransitionValidator
       
   180 
       
   181 // ______________________________________________________________________________
       
   182 //
       
   183 /**
       
   184 	@internalComponent
       
   185 
       
   186 	Comments : Provide all the UnitTestsInfoUnit Test's specific
       
   187 	validatation for the state of a transition before and after its execution.
       
   188 	on the CComponentInfo test class for a transition.
       
   189  */
       
   190 class TComponentInfo_UnitTestsInfo_TransitionValidator : public TTransitionValidator
       
   191 	{
       
   192 public:
       
   193 	/**
       
   194 		@fn				TComponentInfo_UnitTestsInfo_TransitionValidator(CUnitTestContext& aUTContext)
       
   195 		Intended Usage	:	
       
   196 		@leave  		KErrNoMemory
       
   197 		@since			7.0
       
   198 		@param			aUTContext The context within which this transition is executing
       
   199 	 */
       
   200 	inline TComponentInfo_UnitTestsInfo_TransitionValidator(CUnitTestContext& aUTContext);
       
   201 
       
   202 	/**
       
   203 		@fn				ValidatePreConditions()
       
   204 		Intended Usage	: Implemented by the developer to check the
       
   205 						end state of the transition behaviour.
       
   206 		Error Condition	: Invalid pre-conditions
       
   207 		@since			7.0
       
   208 		@return			TBool ETrue if the pre-conditions were valid, EFalse otherwise.
       
   209 		@pre 			TComponentInfo_UnitTestsInfo_TransitionValidator is fully constructed.
       
   210 		@post			No change to the iUTContext class.
       
   211 	*/
       
   212 	virtual inline TBool ValidatePreConditions();
       
   213 
       
   214 	/**
       
   215 		@fn				ValidatePostConditions(TTestBedAsyncState aAsyncState)
       
   216 		Intended Usage	:	Implemented by the developer to check the
       
   217 						end state of the transition behaviour.
       
   218 						When overriding, if the transition calls an asynchronous function
       
   219 						ValidatePostConditions will be called twice. Firstly, after the
       
   220 						asynchronous function has been called and, secondly, after the 
       
   221 						asynchronous request has completed. The parameter aAsyncState can
       
   222 						be used to distinguish between these two cases.
       
   223 		Error Condition	: Invalid post-conditions.
       
   224 		@since			7.0
       
   225 		@param			aAsyncState EAsyncCalled if the async function has been just been called,
       
   226 						EAsyncCompleted if the function has completed.
       
   227 		@return			TBool ETrue if the post-conditions were valid, EFalse otherwise.
       
   228 		@pre 			TComponentInfo_UnitTestsInfo_TransitionValidator is fully constructed.
       
   229 		@post			No change to the iUTContext class.
       
   230 	*/
       
   231 	virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
       
   232 	};	// TComponentInfo_UnitTestsInfo_TransitionValidator
       
   233 
       
   234 
       
   235 
       
   236 #include "ComponentInfoTransitionValidation.inl"
       
   237 
       
   238 #endif // __COMPONENTINFOTRANSITIONVALIDATION_H__
       
   239