os/ossrv/lowlevellibsandfws/pluginfw/Framework/SuicideTests/SuicideTransitionValidation.inl
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/lowlevellibsandfws/pluginfw/Framework/SuicideTests/SuicideTransitionValidation.inl	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,80 @@
     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 +// Implementations for the transition validation classes for ECOM
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +// ______________________________________________________________________________
    1.22 +//
    1.23 +inline TSuicideInterface_Ctor_TransitionValidator::TSuicideInterface_Ctor_TransitionValidator(CUnitTestContext& aUTContext)
    1.24 +:TTransitionValidator(aUTContext)
    1.25 +	{
    1.26 +	// Do nothing
    1.27 +	}
    1.28 +
    1.29 +inline TBool TSuicideInterface_Ctor_TransitionValidator::ValidatePreConditions()
    1.30 +	{
    1.31 +	return ETrue;
    1.32 +	}
    1.33 +
    1.34 +inline TBool TSuicideInterface_Ctor_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
    1.35 +	{
    1.36 +	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CSuicideInterface_UnitTestContext&,iUTContext).iExampleInterface))
    1.37 +		return EFalse;
    1.38 +	return ETrue;
    1.39 +	}
    1.40 +
    1.41 +// ______________________________________________________________________________
    1.42 +//
    1.43 +inline TSuicideInterface_Dtor_TransitionValidator::TSuicideInterface_Dtor_TransitionValidator(CUnitTestContext& aUTContext)
    1.44 +:TTransitionValidator(aUTContext)
    1.45 +	{
    1.46 +	// Do nothing
    1.47 +	}
    1.48 +
    1.49 +inline TBool TSuicideInterface_Dtor_TransitionValidator::ValidatePreConditions()
    1.50 +	{
    1.51 +	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CSuicideInterface_UnitTestContext&,iUTContext).iExampleInterface))
    1.52 +		return EFalse;
    1.53 +	return ETrue;
    1.54 +	}
    1.55 +
    1.56 +inline TBool TSuicideInterface_Dtor_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
    1.57 +	{
    1.58 +	return ETrue;
    1.59 +	}
    1.60 +
    1.61 +// ______________________________________________________________________________
    1.62 +//
    1.63 +inline TSuicideInterface_FireAndForget_TransitionValidator::TSuicideInterface_FireAndForget_TransitionValidator(CUnitTestContext& aUTContext)
    1.64 +:TTransitionValidator(aUTContext)
    1.65 +	{
    1.66 +	// Do nothing
    1.67 +	}
    1.68 +
    1.69 +inline TBool TSuicideInterface_FireAndForget_TransitionValidator::ValidatePreConditions()
    1.70 +	{
    1.71 +	// For a c'tor this should be empty.
    1.72 +	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CSuicideInterface_UnitTestContext&,iUTContext).iExampleInterface))
    1.73 +		return EFalse;
    1.74 +	return ETrue;
    1.75 +	}
    1.76 +
    1.77 +inline TBool TSuicideInterface_FireAndForget_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
    1.78 +	{
    1.79 +	// For a d'tor this should be empty.
    1.80 +	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CSuicideInterface_UnitTestContext&,iUTContext).iExampleInterface))
    1.81 +		return EFalse;
    1.82 +	return ETrue;
    1.83 +	}