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 implementation of the validation classes for the CRegistryData tests sl@0: // sl@0: // sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: inline TRegistryData_Ctor_TransitionValidator::TRegistryData_Ctor_TransitionValidator(CUnitTestContext& aUTContext) sl@0: :TTransitionValidator(aUTContext) sl@0: { sl@0: // Do nothing sl@0: } sl@0: sl@0: inline TBool TRegistryData_Ctor_TransitionValidator::ValidatePreConditions() sl@0: { sl@0: // Always true sl@0: return ETrue; sl@0: } sl@0: sl@0: inline TBool TRegistryData_Ctor_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) sl@0: { sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: inline TRegistryData_Dtor_TransitionValidator::TRegistryData_Dtor_TransitionValidator(CUnitTestContext& aUTContext) sl@0: :TTransitionValidator(aUTContext) sl@0: { sl@0: // Do nothing sl@0: } sl@0: sl@0: inline TBool TRegistryData_Dtor_TransitionValidator::ValidatePreConditions() sl@0: { sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: inline TBool TRegistryData_Dtor_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) sl@0: { sl@0: return ETrue; sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: inline TRegistryData_AddDllDataL_TransitionValidator::TRegistryData_AddDllDataL_TransitionValidator(CUnitTestContext& aUTContext) sl@0: :TTransitionValidator(aUTContext) sl@0: { sl@0: // Do nothing sl@0: } sl@0: sl@0: inline TBool TRegistryData_AddDllDataL_TransitionValidator::ValidatePreConditions() sl@0: { sl@0: CRegistryData_UnitTestContext& context = REINTERPRET_CAST(CRegistryData_UnitTestContext&, sl@0: iUTContext); sl@0: TRegistryData_StateAccessor& accessor = REINTERPRET_CAST(TRegistryData_StateAccessor&, sl@0: iUTContext.StateAccessor()); sl@0: sl@0: // Check that the drive we are trying to add to is valid sl@0: if(!(accessor.IsRegisteredDrive(*context.iRegistryData, context.iDriveUnit))) sl@0: { sl@0: _LIT(KAddDllFailedPreConditions, sl@0: "CRegistryData_AddDllDataL_Transition failed pre-conditions"); sl@0: iUTContext.DataLogger().LogInformation(KAddDllFailedPreConditions); sl@0: return EFalse; sl@0: } sl@0: sl@0: if(accessor.InvariantTest(context.iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: inline TBool TRegistryData_AddDllDataL_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) sl@0: { sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: inline TRegistryData_ListImplementations_TransitionValidator::TRegistryData_ListImplementations_TransitionValidator(CUnitTestContext& aUTContext) sl@0: :TTransitionValidator(aUTContext) sl@0: { sl@0: // Do nothing sl@0: } sl@0: sl@0: inline TBool TRegistryData_ListImplementations_TransitionValidator::ValidatePreConditions() sl@0: { sl@0: // Just do an invariant test because we should be able to call this function any time sl@0: // after CRegistryData has been constructed. sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: inline TBool TRegistryData_ListImplementations_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) sl@0: { sl@0: // This post validation checking assumes the use of the CExample plugin implementation sl@0: // It has to because ListImplementationsL takes an interface uid and we give it the sl@0: // CExampleInterface uid. sl@0: sl@0: CRegistryData_UnitTestContext& context = REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext); sl@0: sl@0: const TUid KImplementationClassOne = {0x10009DC3}; sl@0: const TUid KImplementationClassTwo = {0x10009DC4}; sl@0: sl@0: TBool foundOne = EFalse; sl@0: TBool foundTwo = EFalse; sl@0: TInt impCount = context.iUidList->Count(); sl@0: for(TInt index = 0; index < impCount; ++index) sl@0: { sl@0: TUid uid = (*(context.iUidList))[index]->ImplementationUid(); sl@0: if(uid == KImplementationClassOne) sl@0: foundOne = ETrue; sl@0: else if(uid == KImplementationClassTwo) sl@0: foundTwo = ETrue; sl@0: } sl@0: if(foundOne == EFalse || foundTwo == EFalse) sl@0: return EFalse; sl@0: sl@0: if(iUTContext.StateAccessor().InvariantTest(context.iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: inline TRegistryData_GetImplementationInformation_TransitionValidator::TRegistryData_GetImplementationInformation_TransitionValidator(CUnitTestContext& aUTContext) sl@0: :TTransitionValidator(aUTContext) sl@0: { sl@0: // Do nothing sl@0: } sl@0: sl@0: inline TBool TRegistryData_GetImplementationInformation_TransitionValidator::ValidatePreConditions() sl@0: { sl@0: // Just do an invariant test because we should be able to call this any time after sl@0: // CRegistryData has been constructed. sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: inline TBool TRegistryData_GetImplementationInformation_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) sl@0: { sl@0: // Check that the return from GetImplementationInformationL is what we expect sl@0: _LIT8(KTestDataType, "text/wml"); sl@0: CRegistryData_UnitTestContext& context = REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext); sl@0: if(context.iImplementationRef == 0 || sl@0: context.iImplementationRef->DataType().Find(KTestDataType) == KErrNotFound) sl@0: return EFalse; sl@0: sl@0: if(iUTContext.StateAccessor().InvariantTest(context.iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: inline TRegistryData_IsRegisteredWithDate_TransitionValidator::TRegistryData_IsRegisteredWithDate_TransitionValidator(CUnitTestContext& aUTContext) sl@0: :TTransitionValidator(aUTContext) sl@0: { sl@0: // Do nothing sl@0: } sl@0: sl@0: inline TBool TRegistryData_IsRegisteredWithDate_TransitionValidator::ValidatePreConditions() sl@0: { sl@0: // No pre condition checking required other than that the object is constructed. sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: inline TBool TRegistryData_IsRegisteredWithDate_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) sl@0: { sl@0: // No post condition checking other than that this object's state is OK sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: inline TRegistryData_PersistNow_TransitionValidator::TRegistryData_PersistNow_TransitionValidator(CUnitTestContext& aUTContext) sl@0: :TTransitionValidator(aUTContext) sl@0: { sl@0: // Do nothing sl@0: } sl@0: sl@0: inline TBool TRegistryData_PersistNow_TransitionValidator::ValidatePreConditions() sl@0: { sl@0: // No pre condition checking required other than that the object is correctly constructed sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: inline TBool TRegistryData_PersistNow_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) sl@0: { sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: inline TRegistryData_TemporaryUninstall_TransitionValidator::TRegistryData_TemporaryUninstall_TransitionValidator(CUnitTestContext& aUTContext) sl@0: :TTransitionValidator(aUTContext) sl@0: { sl@0: // Do nothing sl@0: } sl@0: sl@0: inline TBool TRegistryData_TemporaryUninstall_TransitionValidator::ValidatePreConditions() sl@0: { sl@0: // Only pre condition is that object is fully constructed sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: inline TBool TRegistryData_TemporaryUninstall_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) sl@0: { sl@0: CRegistryData_UnitTestContext& context = REINTERPRET_CAST(CRegistryData_UnitTestContext&, sl@0: iUTContext); sl@0: TRegistryData_StateAccessor& accessor = REINTERPRET_CAST(TRegistryData_StateAccessor&, sl@0: iUTContext.StateAccessor()); sl@0: sl@0: // Check that the drive we have uninstalled is not valid sl@0: if(accessor.IsRegisteredDrive(*context.iRegistryData, context.iDriveUnit)) sl@0: { sl@0: _LIT(KUninstallFailedPostConditions, sl@0: "CRegistryData_TemporaryUninstallL_Transition failed post-conditions"); sl@0: iUTContext.DataLogger().LogInformation(KUninstallFailedPostConditions); sl@0: return EFalse; sl@0: } sl@0: sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: inline TRegistryData_UndoTemporaryUninstall_TransitionValidator::TRegistryData_UndoTemporaryUninstall_TransitionValidator(CUnitTestContext& aUTContext) sl@0: :TTransitionValidator(aUTContext) sl@0: { sl@0: // Do nothing sl@0: } sl@0: sl@0: inline TBool TRegistryData_UndoTemporaryUninstall_TransitionValidator::ValidatePreConditions() sl@0: { sl@0: // Only pre condition is that object is fully constructed sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: inline TBool TRegistryData_UndoTemporaryUninstall_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) sl@0: { sl@0: CRegistryData_UnitTestContext& context = REINTERPRET_CAST(CRegistryData_UnitTestContext&, sl@0: iUTContext); sl@0: TRegistryData_StateAccessor& accessor = REINTERPRET_CAST(TRegistryData_StateAccessor&, sl@0: iUTContext.StateAccessor()); sl@0: sl@0: // Check that the drive we have uninstalled is not valid sl@0: if(!(accessor.IsRegisteredDrive(*context.iRegistryData, context.iDriveUnit))) sl@0: { sl@0: _LIT(KUndoUninstallFailedPostConditions, sl@0: "CRegistryData_UndoTemporaryUninstallL_Transition failed post-conditions"); sl@0: iUTContext.DataLogger().LogInformation(KUndoUninstallFailedPostConditions); sl@0: return EFalse; sl@0: } sl@0: sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: inline TRegistryData_UpdateDllData_TransitionValidator::TRegistryData_UpdateDllData_TransitionValidator(CUnitTestContext& aUTContext) sl@0: :TTransitionValidator(aUTContext) sl@0: { sl@0: // Do nothing sl@0: } sl@0: sl@0: inline TBool TRegistryData_UpdateDllData_TransitionValidator::ValidatePreConditions() sl@0: { sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: inline TBool TRegistryData_UpdateDllData_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) sl@0: { sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: inline TRegistryData_BuildIndexes_TransitionValidator::TRegistryData_BuildIndexes_TransitionValidator(CUnitTestContext& aUTContext) sl@0: :TTransitionValidator(aUTContext) sl@0: { sl@0: // Do nothing sl@0: } sl@0: sl@0: inline TBool TRegistryData_BuildIndexes_TransitionValidator::ValidatePreConditions() sl@0: { sl@0: // Only pre condition is that object is fully constructed (BuildIndexes is actually sl@0: // called from ConstructL anyway) sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: inline TBool TRegistryData_BuildIndexes_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) sl@0: { sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: inline TRegistryData_IndexedFind_TransitionValidator::TRegistryData_IndexedFind_TransitionValidator(CUnitTestContext& aUTContext) sl@0: :TTransitionValidator(aUTContext) sl@0: { sl@0: // Do nothing sl@0: } sl@0: sl@0: inline TBool TRegistryData_IndexedFind_TransitionValidator::ValidatePreConditions() sl@0: { sl@0: // Only pre condition is that object is fully constructed. sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: inline TBool TRegistryData_IndexedFind_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) sl@0: { sl@0: // No post condition (function is const) sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: inline TRegistryData_Restore_TransitionValidator::TRegistryData_Restore_TransitionValidator(CUnitTestContext& aUTContext) sl@0: :TTransitionValidator(aUTContext) sl@0: { sl@0: // Do nothing sl@0: } sl@0: sl@0: inline TBool TRegistryData_Restore_TransitionValidator::ValidatePreConditions() sl@0: { sl@0: // Only pre condition is that object is fully constructed. sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: inline TBool TRegistryData_Restore_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) sl@0: { sl@0: // The object has been restored from file so just check that it is a valid object sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: inline TRegistryData_Store_TransitionValidator::TRegistryData_Store_TransitionValidator(CUnitTestContext& aUTContext) sl@0: :TTransitionValidator(aUTContext) sl@0: { sl@0: // Do nothing sl@0: } sl@0: sl@0: inline TBool TRegistryData_Store_TransitionValidator::ValidatePreConditions() sl@0: { sl@0: // Only pre condition is that object is fully constructed sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: inline TBool TRegistryData_Store_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) sl@0: { sl@0: // No post condition as function is const sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: inline TRegistryData_MatchOnUid_TransitionValidator::TRegistryData_MatchOnUid_TransitionValidator(CUnitTestContext& aUTContext) sl@0: :TTransitionValidator(aUTContext) sl@0: { sl@0: // Do nothing sl@0: } sl@0: sl@0: inline TBool TRegistryData_MatchOnUid_TransitionValidator::ValidatePreConditions() sl@0: { sl@0: // No pre condition checking because this function is static sl@0: return ETrue; sl@0: } sl@0: sl@0: inline TBool TRegistryData_MatchOnUid_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) sl@0: { sl@0: // No post condition checking because this function is static sl@0: return ETrue; sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: inline TRegistryData_ConstructPolicyIndexL_TransitionValidator::TRegistryData_ConstructPolicyIndexL_TransitionValidator(CUnitTestContext& aUTContext) sl@0: :TTransitionValidator(aUTContext) sl@0: { sl@0: // Do nothing sl@0: } sl@0: sl@0: inline TBool TRegistryData_ConstructPolicyIndexL_TransitionValidator::ValidatePreConditions() sl@0: { sl@0: // Only pre condition is object is fully constructed sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: inline TBool TRegistryData_ConstructPolicyIndexL_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) sl@0: { sl@0: // No post condition because function is const sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: inline TRegistryData_SetPolicyObserver_TransitionValidator::TRegistryData_SetPolicyObserver_TransitionValidator(CUnitTestContext& aUTContext) sl@0: :TTransitionValidator(aUTContext) sl@0: { sl@0: // Do nothing sl@0: } sl@0: sl@0: inline TBool TRegistryData_SetPolicyObserver_TransitionValidator::ValidatePreConditions() sl@0: { sl@0: // Only pre condition is object is fully constructed sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: inline TBool TRegistryData_SetPolicyObserver_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) sl@0: { sl@0: CRegistryData_UnitTestContext& context = REINTERPRET_CAST(CRegistryData_UnitTestContext&, sl@0: iUTContext); sl@0: if(iUTContext.StateAccessor().InvariantTest(context.iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: inline TRegistryData_GetSecondImplInfo_TransitionValidator::TRegistryData_GetSecondImplInfo_TransitionValidator(CUnitTestContext& aUTContext) sl@0: :TTransitionValidator(aUTContext) sl@0: { sl@0: // Do nothing sl@0: } sl@0: sl@0: inline TBool TRegistryData_GetSecondImplInfo_TransitionValidator::ValidatePreConditions() sl@0: { sl@0: CRegistryData_UnitTestContext& context = REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext); sl@0: sl@0: // Copy the result of the earlier GetImplementationInformation so we sl@0: // can compare later sl@0: context.iSecondImplementationRef = context.iImplementationRef; sl@0: sl@0: if(iUTContext.StateAccessor().InvariantTest(context.iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: inline TBool TRegistryData_GetSecondImplInfo_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) sl@0: { sl@0: CRegistryData_UnitTestContext& context = REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext); sl@0: sl@0: // if the second call to GetImplementationInformation does not return the same thing sl@0: // as the first then this test has failed sl@0: if(context.iImplementationRef != context.iSecondImplementationRef) sl@0: return EFalse; sl@0: sl@0: if(iUTContext.StateAccessor().InvariantTest(context.iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: inline TRegistryData_DiscoveriesBeginning_TransitionValidator::TRegistryData_DiscoveriesBeginning_TransitionValidator(CUnitTestContext& aUTContext) sl@0: :TTransitionValidator(aUTContext) sl@0: { sl@0: // Do nothing sl@0: } sl@0: sl@0: inline TBool TRegistryData_DiscoveriesBeginning_TransitionValidator::ValidatePreConditions() sl@0: { sl@0: if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: sl@0: inline TBool TRegistryData_DiscoveriesBeginning_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) sl@0: { sl@0: CRegistryData_UnitTestContext& context = REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext); sl@0: sl@0: if(context.iRegistryData->IndexValid()) sl@0: return EFalse; sl@0: sl@0: if(iUTContext.StateAccessor().InvariantTest(context.iRegistryData)) sl@0: return EFalse; sl@0: return ETrue; sl@0: } sl@0: