lowlevellibsandfws/pluginfw/Framework/BackupNotifierTest/BackupNotifierTransitionValidation.h
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     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 CBackupNotifier class methods.
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef __BACKUPNOTIFIERTRANSITIONVALIDATION_H__
       
    19 #define __BACKUPNOTIFIERTRANSITIONVALIDATION_H__
       
    20 
       
    21 #include "BackupNotifierTransitions.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 CBackupNotifier test class for a transition.
       
    31  */
       
    32 class TBackupNotifier_Ctor_TransitionValidator : public TTransitionValidator
       
    33 	{
       
    34 public:
       
    35 	/**
       
    36 		@fn				TBackupNotifier_Ctor_TransitionValidator(CUnitTestContext& aUTContext)
       
    37 		Intended Usage	:	
       
    38 		@leave			KErrNoMemory
       
    39 		@since			7.0
       
    40 		@param			aUTContext The context within which this transition is executing
       
    41 	 */
       
    42 	inline TBackupNotifier_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 			TBackupNotifier_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 			TBackupNotifier_Ctor_TransitionValidator is fully constructed.
       
    71 		@post			No change to the iUTContext class.
       
    72 	*/
       
    73 	virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
       
    74 	};	// TBackupNotifier_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 CBackupNotifier test class for a transition.
       
    84  */
       
    85 class TBackupNotifier_Dtor_TransitionValidator : public TTransitionValidator
       
    86 	{
       
    87 public:
       
    88 	/**
       
    89 		@fn				TBackupNotifier_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 TBackupNotifier_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 			TBackupNotifier_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 			TBackupNotifier_Dtor_TransitionValidator is fully constructed.
       
   124 		@post			No change to the iUTContext class.
       
   125 	*/
       
   126 	virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState);
       
   127 	};	// TBackupNotifier_Dtor_TransitionValidator
       
   128 
       
   129 #include "BackupNotifierTransitionValidation.inl"
       
   130 
       
   131 #endif // __BACKUPNOTIFIERTRANSITIONVALIDATION_H__
       
   132