os/ossrv/lowlevellibsandfws/pluginfw/Framework/LoadManagerTest/LoadManagerTransitionValidation.inl
Update contrib.
1 // Copyright (c) 1997-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // The implementation of the validation classes for CLoadManager transitions.
18 // ______________________________________________________________________________
20 inline TLoadManager_Ctor_TransitionValidator::TLoadManager_Ctor_TransitionValidator(CUnitTestContext& aUTContext)
21 :TTransitionValidator(aUTContext)
26 inline TBool TLoadManager_Ctor_TransitionValidator::ValidatePreConditions()
31 inline TBool TLoadManager_Ctor_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
33 if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CLoadManager_UnitTestContext&,iUTContext).iLoadManager))
38 // ______________________________________________________________________________
40 inline TLoadManager_Dtor_TransitionValidator::TLoadManager_Dtor_TransitionValidator(CUnitTestContext& aUTContext)
41 :TTransitionValidator(aUTContext)
46 inline TBool TLoadManager_Dtor_TransitionValidator::ValidatePreConditions()
48 if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CLoadManager_UnitTestContext&,iUTContext).iLoadManager))
53 inline TBool TLoadManager_Dtor_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
58 // ______________________________________________________________________________
60 inline TLoadManager_InstantiationMethod_TransitionValidator::TLoadManager_InstantiationMethod_TransitionValidator(CUnitTestContext& aUTContext)
61 :TTransitionValidator(aUTContext)
66 inline TBool TLoadManager_InstantiationMethod_TransitionValidator::ValidatePreConditions()
68 CLoadManager_UnitTestContext& context = REINTERPRET_CAST(CLoadManager_UnitTestContext&,iUTContext);
69 if(context.StateAccessor().InvariantTest(context.iLoadManager))
71 return context.iLoadMethod == NULL;
74 inline TBool TLoadManager_InstantiationMethod_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
76 CLoadManager_UnitTestContext& context = REINTERPRET_CAST(CLoadManager_UnitTestContext&,iUTContext);
77 if(context.StateAccessor().InvariantTest(context.iLoadManager))
79 return (context.iLoadMethod != NULL);
82 // ______________________________________________________________________________
84 inline TLoadManager_InstantiationFailure_TransitionValidator::TLoadManager_InstantiationFailure_TransitionValidator(CUnitTestContext& aUTContext)
85 :TTransitionValidator(aUTContext)
90 inline TBool TLoadManager_InstantiationFailure_TransitionValidator::ValidatePreConditions()
92 CLoadManager_UnitTestContext& context = REINTERPRET_CAST(CLoadManager_UnitTestContext&,iUTContext);
93 if(context.StateAccessor().InvariantTest(context.iLoadManager))
95 return context.iLoadMethod == NULL;
98 inline TBool TLoadManager_InstantiationFailure_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
100 CLoadManager_UnitTestContext& context = REINTERPRET_CAST(CLoadManager_UnitTestContext&,iUTContext);
101 if(context.StateAccessor().InvariantTest(context.iLoadManager))
103 return (context.iLoadMethod == NULL);
106 // ______________________________________________________________________________
108 inline TLoadManager_DestroyThis_TransitionValidator::TLoadManager_DestroyThis_TransitionValidator(CUnitTestContext& aUTContext)
109 :TTransitionValidator(aUTContext)
114 inline TBool TLoadManager_DestroyThis_TransitionValidator::ValidatePreConditions()
116 if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CLoadManager_UnitTestContext&,iUTContext).iLoadManager))
121 inline TBool TLoadManager_DestroyThis_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
123 if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CLoadManager_UnitTestContext&,iUTContext).iLoadManager))