os/ossrv/lowlevellibsandfws/pluginfw/Test_Bed/TestManagerTest/TestManagerTransitionValidation.inl
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/lowlevellibsandfws/pluginfw/Test_Bed/TestManagerTest/TestManagerTransitionValidation.inl	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,100 @@
     1.4 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// The implementation of the transition validation classes upon the CTestManager class methods.
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +// ______________________________________________________________________________
    1.22 +//
    1.23 +inline TTestManager_Ctor_TransitionValidator::TTestManager_Ctor_TransitionValidator(CUnitTestContext& aUTContext)
    1.24 +:TTransitionValidator(aUTContext)
    1.25 +	{
    1.26 +	// Do nothing
    1.27 +	}
    1.28 +
    1.29 +inline TBool TTestManager_Ctor_TransitionValidator::ValidatePreConditions()
    1.30 +	{
    1.31 +	return ETrue;
    1.32 +	}
    1.33 +
    1.34 +inline TBool TTestManager_Ctor_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
    1.35 +	{
    1.36 +	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CTestManager_UnitTestContext&,iUTContext).iTestManager))
    1.37 +		return EFalse;
    1.38 +	return ETrue;
    1.39 +	}
    1.40 +
    1.41 +// ______________________________________________________________________________
    1.42 +//
    1.43 +inline TTestManager_Dtor_TransitionValidator::TTestManager_Dtor_TransitionValidator(CUnitTestContext& aUTContext)
    1.44 +:TTransitionValidator(aUTContext)
    1.45 +	{
    1.46 +	// Do nothing
    1.47 +	}
    1.48 +
    1.49 +inline TBool TTestManager_Dtor_TransitionValidator::ValidatePreConditions()
    1.50 +	{
    1.51 +	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CTestManager_UnitTestContext&,iUTContext).iTestManager))
    1.52 +		return EFalse;
    1.53 +	return ETrue;
    1.54 +	}
    1.55 +
    1.56 +inline TBool TTestManager_Dtor_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
    1.57 +	{
    1.58 +	return ETrue;
    1.59 +	}
    1.60 +
    1.61 +// ______________________________________________________________________________
    1.62 +//
    1.63 +inline TTestManager_RunTests_TransitionValidator::TTestManager_RunTests_TransitionValidator(CUnitTestContext& aUTContext)
    1.64 +:TTransitionValidator(aUTContext)
    1.65 +	{
    1.66 +	// Do nothing
    1.67 +	}
    1.68 +
    1.69 +inline TBool TTestManager_RunTests_TransitionValidator::ValidatePreConditions()
    1.70 +	{
    1.71 +	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CTestManager_UnitTestContext&,iUTContext).iTestManager))
    1.72 +		return EFalse;
    1.73 +	return ETrue;
    1.74 +	}
    1.75 +
    1.76 +inline TBool TTestManager_RunTests_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
    1.77 +	{
    1.78 +	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CTestManager_UnitTestContext&,iUTContext).iTestManager))
    1.79 +		return EFalse;
    1.80 +	return ETrue;
    1.81 +	}
    1.82 +
    1.83 +// ______________________________________________________________________________
    1.84 +//
    1.85 +inline TTestManager_TestComponent_TransitionValidator::TTestManager_TestComponent_TransitionValidator(CUnitTestContext& aUTContext)
    1.86 +:TTransitionValidator(aUTContext)
    1.87 +	{
    1.88 +	// Do nothing
    1.89 +	}
    1.90 +
    1.91 +inline TBool TTestManager_TestComponent_TransitionValidator::ValidatePreConditions()
    1.92 +	{
    1.93 +	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CTestManager_UnitTestContext&,iUTContext).iTestManager))
    1.94 +		return EFalse;
    1.95 +	return ETrue;
    1.96 +	}
    1.97 +
    1.98 +inline TBool TTestManager_TestComponent_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
    1.99 +	{
   1.100 +	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CTestManager_UnitTestContext&,iUTContext).iTestManager))
   1.101 +		return EFalse;
   1.102 +	return ETrue;
   1.103 +	}