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 CTestController class methods. sl@0: // sl@0: // sl@0: sl@0: #ifndef __TESTCONTROLLERTRANSITIONVALIDATION_H__ sl@0: #define __TESTCONTROLLERTRANSITIONVALIDATION_H__ sl@0: sl@0: #include "TestControllerTransitions.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 CTestController test class for a transition. sl@0: */ sl@0: class TTestController_Ctor_TransitionValidator : public TTransitionValidator sl@0: { sl@0: public: sl@0: /** sl@0: @fn TTestController_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 TTestController_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 TTestController_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 TTestController_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: }; // TTestController_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 CTestController test class for a transition. sl@0: */ sl@0: class TTestController_Dtor_TransitionValidator : public TTransitionValidator sl@0: { sl@0: public: sl@0: /** sl@0: @fn TTestController_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 TTestController_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 TTestController_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 TTestController_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: }; // TTestController_Dtor_TransitionValidator sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: /** sl@0: @internalComponent sl@0: sl@0: Comments : Provide all the ScanDriveUnit Test's specific sl@0: validatation for the state of a transition before and after its execution. sl@0: on the CTestController test class for a transition. sl@0: */ sl@0: class TTestController_ScanDrive_TransitionValidator : public TTransitionValidator sl@0: { sl@0: public: sl@0: /** sl@0: @fn TTestController_ScanDrive_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 TTestController_ScanDrive_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 TTestController_ScanDrive_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 TTestController_ScanDrive_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: }; // TTestController_ScanDrive_TransitionValidator sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: /** sl@0: @internalComponent sl@0: sl@0: Comments : Provide all the DiscoverTestsUnit Test's specific sl@0: validatation for the state of a transition before and after its execution. sl@0: on the CTestController test class for a transition. sl@0: */ sl@0: class TTestController_DiscoverTests_TransitionValidator : public TTransitionValidator sl@0: { sl@0: public: sl@0: /** sl@0: @fn TTestController_DiscoverTests_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 TTestController_DiscoverTests_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 TTestController_DiscoverTests_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 TTestController_DiscoverTests_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: }; // TTestController_DiscoverTests_TransitionValidator sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: /** sl@0: @internalComponent sl@0: sl@0: Comments : Provide all the FindComponentsUnit Test's specific sl@0: validatation for the state of a transition before and after its execution. sl@0: on the CTestController test class for a transition. sl@0: */ sl@0: class TTestController_FindComponents_TransitionValidator : public TTransitionValidator sl@0: { sl@0: public: sl@0: /** sl@0: @fn TTestController_FindComponents_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 TTestController_FindComponents_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 TTestController_FindComponents_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 TTestController_FindComponents_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: }; // TTestController_FindComponents_TransitionValidator sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: /** sl@0: @internalComponent sl@0: sl@0: Comments : Provide all the GetUnitTestsUnit Test's specific sl@0: validatation for the state of a transition before and after its execution. sl@0: on the CTestController test class for a transition. sl@0: */ sl@0: class TTestController_GetUnitTests_TransitionValidator : public TTransitionValidator sl@0: { sl@0: public: sl@0: /** sl@0: @fn TTestController_GetUnitTests_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 TTestController_GetUnitTests_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 TTestController_GetUnitTests_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 TTestController_GetUnitTests_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: }; // TTestController_GetUnitTests_TransitionValidator sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: /** sl@0: @internalComponent sl@0: sl@0: Comments : Provide all the StartUnit Test's specific sl@0: validatation for the state of a transition before and after its execution. sl@0: on the CTestController test class for a transition. sl@0: */ sl@0: class TTestController_Start_TransitionValidator : public TTransitionValidator sl@0: { sl@0: public: sl@0: /** sl@0: @fn TTestController_Start_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 TTestController_Start_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 TTestController_Start_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 TTestController_Start_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: }; // TTestController_Start_TransitionValidator sl@0: sl@0: sl@0: #include "TestControllerTransitionValidation.inl" sl@0: sl@0: #endif // __TESTCONTROLLERTRANSITIONVALIDATION_H__ sl@0: