sl@0: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // The definitions of the transition classes upon the CUnitTest class methods. sl@0: // sl@0: // sl@0: sl@0: #ifndef __UNITTESTTRANSITIONVALIDATION_H__ sl@0: #define __UNITTESTTRANSITIONVALIDATION_H__ sl@0: sl@0: #include "UnitTestTransitions.h" sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: /** sl@0: @internalComponent sl@0: sl@0: Comments : Provide all the CtorUnit Test's specific sl@0: validatation for the state of a transition before and after its execution. sl@0: on the CUnitTest test class for a transition. sl@0: */ sl@0: class TUnitTest_Ctor_TransitionValidator : public TTransitionValidator sl@0: { sl@0: public: sl@0: /** sl@0: @fn TUnitTest_Ctor_TransitionValidator(CUnitTestContext& aUTContext) sl@0: Intended Usage : Default constructor. sl@0: @leave KErrNoMemory sl@0: @since 7.0 sl@0: @param aUTContext The context within which this transition is executing sl@0: */ sl@0: inline TUnitTest_Ctor_TransitionValidator(CUnitTestContext& aUTContext); sl@0: sl@0: /** sl@0: @fn ValidatePreConditions() sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: Error Condition : Invalid pre-conditions sl@0: @since 7.0 sl@0: @return TBool ETrue if the pre-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_Ctor_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePreConditions(); sl@0: sl@0: /** sl@0: @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: When overriding, if the transition calls an asynchronous function sl@0: ValidatePostConditions will be called twice. Firstly, after the sl@0: asynchronous function has been called and, secondly, after the sl@0: asynchronous request has completed. The parameter aAsyncState can sl@0: be used to distinguish between these two cases. sl@0: Error Condition : Invalid post-conditions. sl@0: @since 7.0 sl@0: @param aAsyncState EAsyncCalled if the async function has been just been called, sl@0: EAsyncCompleted if the function has completed. sl@0: @return TBool ETrue if the post-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_Ctor_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); sl@0: }; // TUnitTest_Ctor_TransitionValidator sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: /** sl@0: @internalComponent sl@0: sl@0: Comments : Provide all the DtorUnit Test's specific sl@0: validatation for the state of a transition before and after its execution. sl@0: on the CUnitTest test class for a transition. sl@0: */ sl@0: class TUnitTest_Dtor_TransitionValidator : public TTransitionValidator sl@0: { sl@0: public: sl@0: /** sl@0: @fn TUnitTest_Dtor_TransitionValidator(CUnitTestContext& aUTContext) sl@0: Intended Usage : sl@0: @leave KErrNoMemory sl@0: @since 7.0 sl@0: @param aUTContext The context within which this transition is executing sl@0: */ sl@0: inline TUnitTest_Dtor_TransitionValidator(CUnitTestContext& aUTContext); sl@0: sl@0: /** sl@0: @fn ValidatePreConditions() sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: Error Condition : Invalid pre-conditions sl@0: @since 7.0 sl@0: @return TBool ETrue if the pre-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_Dtor_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePreConditions(); sl@0: sl@0: /** sl@0: @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: When overriding, if the transition calls an asynchronous function sl@0: ValidatePostConditions will be called twice. Firstly, after the sl@0: asynchronous function has been called and, secondly, after the sl@0: asynchronous request has completed. The parameter aAsyncState can sl@0: be used to distinguish between these two cases. sl@0: Error Condition : Invalid post-conditions. sl@0: @since 7.0 sl@0: @param aAsyncState EAsyncCalled if the async function has been just been called, sl@0: EAsyncCompleted if the function has completed. sl@0: @return TBool ETrue if the post-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_Dtor_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); sl@0: }; // TUnitTest_Dtor_TransitionValidator sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: /** sl@0: @internalComponent sl@0: sl@0: Comments : Provide all the TransitionSetUnit Test's specific sl@0: validatation for the state of a transition before and after its execution. sl@0: on the CUnitTest test class for a transition. sl@0: */ sl@0: class TUnitTest_TransitionSet_TransitionValidator : public TTransitionValidator sl@0: { sl@0: public: sl@0: /** sl@0: @fn TUnitTest_TransitionSet_TransitionValidator(CUnitTestContext& aUTContext) sl@0: Intended Usage : sl@0: @leave KErrNoMemory sl@0: @since 7.0 sl@0: @param aUTContext The context within which this transition is executing sl@0: */ sl@0: inline TUnitTest_TransitionSet_TransitionValidator(CUnitTestContext& aUTContext); sl@0: sl@0: /** sl@0: @fn ValidatePreConditions() sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: Error Condition : Invalid pre-conditions sl@0: @since 7.0 sl@0: @return TBool ETrue if the pre-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_TransitionSet_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePreConditions(); sl@0: sl@0: /** sl@0: @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: When overriding, if the transition calls an asynchronous function sl@0: ValidatePostConditions will be called twice. Firstly, after the sl@0: asynchronous function has been called and, secondly, after the sl@0: asynchronous request has completed. The parameter aAsyncState can sl@0: be used to distinguish between these two cases. sl@0: Error Condition : Invalid post-conditions. sl@0: @since 7.0 sl@0: @param aAsyncState EAsyncCalled if the async function has been just been called, sl@0: EAsyncCompleted if the function has completed. sl@0: @return TBool ETrue if the post-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_TransitionSet_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); sl@0: }; // TUnitTest_TransitionSet_TransitionValidator sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: /** sl@0: @internalComponent sl@0: sl@0: Comments : Provide all the GetCurrentTransitionUnit Test's specific sl@0: validatation for the state of a transition before and after its execution. sl@0: on the CUnitTest test class for a transition. sl@0: */ sl@0: class TUnitTest_GetCurrentTransition_TransitionValidator : public TTransitionValidator sl@0: { sl@0: public: sl@0: /** sl@0: @fn TUnitTest_GetCurrentTransition_TransitionValidator(CUnitTestContext& aUTContext) sl@0: Intended Usage : sl@0: @leave KErrNoMemory sl@0: @since 7.0 sl@0: @param aUTContext The context within which this transition is executing sl@0: */ sl@0: inline TUnitTest_GetCurrentTransition_TransitionValidator(CUnitTestContext& aUTContext); sl@0: sl@0: /** sl@0: @fn ValidatePreConditions() sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: Error Condition : Invalid pre-conditions sl@0: @since 7.0 sl@0: @return TBool ETrue if the pre-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_GetCurrentTransition_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePreConditions(); sl@0: sl@0: /** sl@0: @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: When overriding, if the transition calls an asynchronous function sl@0: ValidatePostConditions will be called twice. Firstly, after the sl@0: asynchronous function has been called and, secondly, after the sl@0: asynchronous request has completed. The parameter aAsyncState can sl@0: be used to distinguish between these two cases. sl@0: Error Condition : Invalid post-conditions. sl@0: @since 7.0 sl@0: @param aAsyncState EAsyncCalled if the async function has been just been called, sl@0: EAsyncCompleted if the function has completed. sl@0: @return TBool ETrue if the post-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_GetCurrentTransition_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); sl@0: }; // TUnitTest_GetCurrentTransition_TransitionValidator sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: /** sl@0: @internalComponent sl@0: sl@0: Comments : Provide all the SetCurrentTransitionUnit Test's specific sl@0: validatation for the state of a transition before and after its execution. sl@0: on the CUnitTest test class for a transition. sl@0: */ sl@0: class TUnitTest_SetCurrentTransition_TransitionValidator : public TTransitionValidator sl@0: { sl@0: public: sl@0: /** sl@0: @fn TUnitTest_SetCurrentTransition_TransitionValidator(CUnitTestContext& aUTContext) sl@0: Intended Usage : sl@0: @leave KErrNoMemory sl@0: @since 7.0 sl@0: @param aUTContext The context within which this transition is executing sl@0: */ sl@0: inline TUnitTest_SetCurrentTransition_TransitionValidator(CUnitTestContext& aUTContext); sl@0: sl@0: /** sl@0: @fn ValidatePreConditions() sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: Error Condition : Invalid pre-conditions sl@0: @since 7.0 sl@0: @return TBool ETrue if the pre-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_SetCurrentTransition_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePreConditions(); sl@0: sl@0: /** sl@0: @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: When overriding, if the transition calls an asynchronous function sl@0: ValidatePostConditions will be called twice. Firstly, after the sl@0: asynchronous function has been called and, secondly, after the sl@0: asynchronous request has completed. The parameter aAsyncState can sl@0: be used to distinguish between these two cases. sl@0: Error Condition : Invalid post-conditions. sl@0: @since 7.0 sl@0: @param aAsyncState EAsyncCalled if the async function has been just been called, sl@0: EAsyncCompleted if the function has completed. sl@0: @return TBool ETrue if the post-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_SetCurrentTransition_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); sl@0: }; // TUnitTest_SetCurrentTransition_TransitionValidator sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: /** sl@0: @internalComponent sl@0: sl@0: Comments : Provide all the SetParametersUnit Test's specific sl@0: validatation for the state of a transition before and after its execution. sl@0: on the CUnitTest test class for a transition. sl@0: */ sl@0: class TUnitTest_SetParameters_TransitionValidator : public TTransitionValidator sl@0: { sl@0: public: sl@0: /** sl@0: @fn TUnitTest_SetParameters_TransitionValidator(CUnitTestContext& aUTContext) sl@0: Intended Usage : sl@0: @leave KErrNoMemory sl@0: @since 7.0 sl@0: @param aUTContext The context within which this transition is executing sl@0: */ sl@0: inline TUnitTest_SetParameters_TransitionValidator(CUnitTestContext& aUTContext); sl@0: sl@0: /** sl@0: @fn ValidatePreConditions() sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: Error Condition : Invalid pre-conditions sl@0: @since 7.0 sl@0: @return TBool ETrue if the pre-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_SetParameters_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePreConditions(); sl@0: sl@0: /** sl@0: @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: When overriding, if the transition calls an asynchronous function sl@0: ValidatePostConditions will be called twice. Firstly, after the sl@0: asynchronous function has been called and, secondly, after the sl@0: asynchronous request has completed. The parameter aAsyncState can sl@0: be used to distinguish between these two cases. sl@0: Error Condition : Invalid post-conditions. sl@0: @since 7.0 sl@0: @param aAsyncState EAsyncCalled if the async function has been just been called, sl@0: EAsyncCompleted if the function has completed. sl@0: @return TBool ETrue if the post-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_SetParameters_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); sl@0: }; // TUnitTest_SetParameters_TransitionValidator sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: /** sl@0: @internalComponent sl@0: sl@0: Comments : Provide all the PrepareUnitTestUnit Test's specific sl@0: validatation for the state of a transition before and after its execution. sl@0: on the CUnitTest test class for a transition. sl@0: */ sl@0: class TUnitTest_PrepareUnitTest_TransitionValidator : public TTransitionValidator sl@0: { sl@0: public: sl@0: /** sl@0: @fn TUnitTest_PrepareUnitTest_TransitionValidator(CUnitTestContext& aUTContext) sl@0: Intended Usage : sl@0: @leave KErrNoMemory sl@0: @since 7.0 sl@0: @param aUTContext The context within which this transition is executing sl@0: */ sl@0: inline TUnitTest_PrepareUnitTest_TransitionValidator(CUnitTestContext& aUTContext); sl@0: sl@0: /** sl@0: @fn ValidatePreConditions() sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: Error Condition : Invalid pre-conditions sl@0: @since 7.0 sl@0: @return TBool ETrue if the pre-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_PrepareUnitTest_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePreConditions(); sl@0: sl@0: /** sl@0: @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: When overriding, if the transition calls an asynchronous function sl@0: ValidatePostConditions will be called twice. Firstly, after the sl@0: asynchronous function has been called and, secondly, after the sl@0: asynchronous request has completed. The parameter aAsyncState can sl@0: be used to distinguish between these two cases. sl@0: Error Condition : Invalid post-conditions. sl@0: @since 7.0 sl@0: @param aAsyncState EAsyncCalled if the async function has been just been called, sl@0: EAsyncCompleted if the function has completed. sl@0: @return TBool ETrue if the post-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_PrepareUnitTest_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); sl@0: }; // TUnitTest_PrepareUnitTest_TransitionValidator sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: /** sl@0: @internalComponent sl@0: sl@0: Comments : Provide all the RunTestUnit Test's specific sl@0: validatation for the state of a transition before and after its execution. sl@0: on the CUnitTest test class for a transition. sl@0: */ sl@0: class TUnitTest_RunTest_TransitionValidator : public TTransitionValidator sl@0: { sl@0: public: sl@0: /** sl@0: @fn TUnitTest_RunTest_TransitionValidator(CUnitTestContext& aUTContext) sl@0: Intended Usage : sl@0: @leave KErrNoMemory sl@0: @since 7.0 sl@0: @param aUTContext The context within which this transition is executing sl@0: */ sl@0: inline TUnitTest_RunTest_TransitionValidator(CUnitTestContext& aUTContext); sl@0: sl@0: /** sl@0: @fn ValidatePreConditions() sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: Error Condition : Invalid pre-conditions sl@0: @since 7.0 sl@0: @return TBool ETrue if the pre-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_RunTest_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePreConditions(); sl@0: sl@0: /** sl@0: @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: When overriding, if the transition calls an asynchronous function sl@0: ValidatePostConditions will be called twice. Firstly, after the sl@0: asynchronous function has been called and, secondly, after the sl@0: asynchronous request has completed. The parameter aAsyncState can sl@0: be used to distinguish between these two cases. sl@0: Error Condition : Invalid post-conditions. sl@0: @since 7.0 sl@0: @param aAsyncState EAsyncCalled if the async function has been just been called, sl@0: EAsyncCompleted if the function has completed. sl@0: @return TBool ETrue if the post-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_RunTest_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); sl@0: }; // TUnitTest_RunTest_TransitionValidator sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: /** sl@0: @internalComponent sl@0: sl@0: Comments : Provide all the AddTransitionUnit Test's specific sl@0: validatation for the state of a transition before and after its execution. sl@0: on the CUnitTest test class for a transition. sl@0: */ sl@0: class TUnitTest_AddTransition_TransitionValidator : public TTransitionValidator sl@0: { sl@0: public: sl@0: /** sl@0: @fn TUnitTest_AddTransition_TransitionValidator(CUnitTestContext& aUTContext) sl@0: Intended Usage : sl@0: @leave KErrNoMemory sl@0: @since 7.0 sl@0: @param aUTContext The context within which this transition is executing sl@0: */ sl@0: inline TUnitTest_AddTransition_TransitionValidator(CUnitTestContext& aUTContext); sl@0: sl@0: /** sl@0: @fn ValidatePreConditions() sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: Error Condition : Invalid pre-conditions sl@0: @since 7.0 sl@0: @return TBool ETrue if the pre-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_AddTransition_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePreConditions(); sl@0: sl@0: /** sl@0: @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: When overriding, if the transition calls an asynchronous function sl@0: ValidatePostConditions will be called twice. Firstly, after the sl@0: asynchronous function has been called and, secondly, after the sl@0: asynchronous request has completed. The parameter aAsyncState can sl@0: be used to distinguish between these two cases. sl@0: Error Condition : Invalid post-conditions. sl@0: @since 7.0 sl@0: @param aAsyncState EAsyncCalled if the async function has been just been called, sl@0: EAsyncCompleted if the function has completed. sl@0: @return TBool ETrue if the post-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_AddTransition_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); sl@0: }; // TUnitTest_AddTransition_TransitionValidator sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: /** sl@0: @internalComponent sl@0: sl@0: Comments : Provide all the AddBlockingTransitionUnit Test's specific sl@0: validatation for the state of a transition before and after its execution. sl@0: on the CUnitTest test class for a transition. sl@0: */ sl@0: class TUnitTest_AddBlockingTransition_TransitionValidator : public TTransitionValidator sl@0: { sl@0: public: sl@0: /** sl@0: @fn TUnitTest_AddBlockingTransition_TransitionValidator(CUnitTestContext& aUTContext) sl@0: Intended Usage : sl@0: @leave KErrNoMemory sl@0: @since 7.0 sl@0: @param aUTContext The context within which this transition is executing sl@0: */ sl@0: inline TUnitTest_AddBlockingTransition_TransitionValidator(CUnitTestContext& aUTContext); sl@0: sl@0: /** sl@0: @fn ValidatePreConditions() sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: Error Condition : Invalid pre-conditions sl@0: @since 7.0 sl@0: @return TBool ETrue if the pre-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_AddBlockingTransition_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePreConditions(); sl@0: sl@0: /** sl@0: @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: When overriding, if the transition calls an asynchronous function sl@0: ValidatePostConditions will be called twice. Firstly, after the sl@0: asynchronous function has been called and, secondly, after the sl@0: asynchronous request has completed. The parameter aAsyncState can sl@0: be used to distinguish between these two cases. sl@0: Error Condition : Invalid post-conditions. sl@0: @since 7.0 sl@0: @param aAsyncState EAsyncCalled if the async function has been just been called, sl@0: EAsyncCompleted if the function has completed. sl@0: @return TBool ETrue if the post-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_AddBlockingTransition_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); sl@0: }; // TUnitTest_AddBlockingTransition_TransitionValidator sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: /** sl@0: @internalComponent sl@0: sl@0: Comments : Provide all the AddLeaveErrorCodeUnit Test's specific sl@0: validatation for the state of a transition before and after its execution. sl@0: on the CUnitTest test class for a transition. sl@0: */ sl@0: class TUnitTest_AddLeaveErrorCode_TransitionValidator : public TTransitionValidator sl@0: { sl@0: public: sl@0: /** sl@0: @fn TUnitTest_AddLeaveErrorCode_TransitionValidator(CUnitTestContext& aUTContext) sl@0: Intended Usage : sl@0: @leave KErrNoMemory sl@0: @since 7.0 sl@0: @param aUTContext The context within which this transition is executing sl@0: */ sl@0: inline TUnitTest_AddLeaveErrorCode_TransitionValidator(CUnitTestContext& aUTContext); sl@0: sl@0: /** sl@0: @fn ValidatePreConditions() sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: Error Condition : Invalid pre-conditions sl@0: @since 7.0 sl@0: @return TBool ETrue if the pre-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_AddLeaveErrorCode_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePreConditions(); sl@0: sl@0: /** sl@0: @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: When overriding, if the transition calls an asynchronous function sl@0: ValidatePostConditions will be called twice. Firstly, after the sl@0: asynchronous function has been called and, secondly, after the sl@0: asynchronous request has completed. The parameter aAsyncState can sl@0: be used to distinguish between these two cases. sl@0: Error Condition : Invalid post-conditions. sl@0: @since 7.0 sl@0: @param aAsyncState EAsyncCalled if the async function has been just been called, sl@0: EAsyncCompleted if the function has completed. sl@0: @return TBool ETrue if the post-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_AddLeaveErrorCode_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); sl@0: }; // TUnitTest_AddLeaveErrorCode_TransitionValidator sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: /** sl@0: @internalComponent sl@0: sl@0: Comments : Provide all the UnitTestNameUnit Test's specific sl@0: validatation for the state of a transition before and after its execution. sl@0: on the CUnitTest test class for a transition. sl@0: */ sl@0: class TUnitTest_UnitTestName_TransitionValidator : public TTransitionValidator sl@0: { sl@0: public: sl@0: /** sl@0: @fn TUnitTest_UnitTestName_TransitionValidator(CUnitTestContext& aUTContext) sl@0: Intended Usage : sl@0: @leave KErrNoMemory sl@0: @since 7.0 sl@0: @param aUTContext The context within which this transition is executing sl@0: */ sl@0: inline TUnitTest_UnitTestName_TransitionValidator(CUnitTestContext& aUTContext); sl@0: sl@0: /** sl@0: @fn ValidatePreConditions() sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: Error Condition : Invalid pre-conditions sl@0: @since 7.0 sl@0: @return TBool ETrue if the pre-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_UnitTestName_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePreConditions(); sl@0: sl@0: /** sl@0: @fn ValidatePostConditions(TTestBedAsyncState aAsyncState) sl@0: Intended Usage : Implemented by the developer to check the sl@0: end state of the transition behaviour. sl@0: When overriding, if the transition calls an asynchronous function sl@0: ValidatePostConditions will be called twice. Firstly, after the sl@0: asynchronous function has been called and, secondly, after the sl@0: asynchronous request has completed. The parameter aAsyncState can sl@0: be used to distinguish between these two cases. sl@0: Error Condition : Invalid post-conditions. sl@0: @since 7.0 sl@0: @param aAsyncState EAsyncCalled if the async function has been just been called, sl@0: EAsyncCompleted if the function has completed. sl@0: @return TBool ETrue if the post-conditions were valid, EFalse otherwise. sl@0: @pre TUnitTest_UnitTestName_TransitionValidator is fully constructed. sl@0: @post No change to the iUTContext class. sl@0: */ sl@0: virtual inline TBool ValidatePostConditions(TTestBedAsyncState aAsyncState); sl@0: }; // TUnitTest_UnitTestName_TransitionValidator sl@0: sl@0: sl@0: sl@0: #include "UnitTestTransitionValidation.inl" sl@0: sl@0: #endif // __UNITTESTTRANSITIONVALIDATION_H__ sl@0: