os/ossrv/lowlevellibsandfws/pluginfw/Framework/BackupNotifierTest/BackupNotifierTransitionValidation.inl
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 2001-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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // The implementation of the transition validation classes upon the CBackupNotifier class methods.
    15 // 
    16 //
    17 
    18 // ______________________________________________________________________________
    19 //
    20 inline TBackupNotifier_Ctor_TransitionValidator::TBackupNotifier_Ctor_TransitionValidator(CUnitTestContext& aUTContext)
    21 :TTransitionValidator(aUTContext)
    22 	{
    23 	// Do nothing
    24 	}
    25 
    26 _LIT(KCtorFailedInvariant,
    27 	"CBackupNotifier_Ctor_Transition invariant failure");
    28 
    29 inline TBool TBackupNotifier_Ctor_TransitionValidator::ValidatePreConditions()
    30 	{
    31 	return ETrue;
    32 	}
    33 
    34 inline TBool TBackupNotifier_Ctor_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
    35 	{
    36 	// For a d'tor this should be empty.
    37 	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CBackupNotifier_UnitTestContext&,iUTContext).iBackupNotifier))
    38 		{
    39 		iUTContext.DataLogger().LogInformation(KCtorFailedInvariant);
    40 		return EFalse;
    41 		}
    42 	return ETrue;
    43 	}
    44 
    45 // ______________________________________________________________________________
    46 //
    47 inline TBackupNotifier_Dtor_TransitionValidator::TBackupNotifier_Dtor_TransitionValidator(CUnitTestContext& aUTContext)
    48 :TTransitionValidator(aUTContext)
    49 	{
    50 	// Do nothing
    51 	}
    52 
    53 _LIT(KDtorFailedInvariant,
    54 	"CBackupNotifier_Dtor_Transition invariant failure");
    55 
    56 inline TBool TBackupNotifier_Dtor_TransitionValidator::ValidatePreConditions()
    57 	{
    58 	// For a c'tor this should be empty.
    59 	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CBackupNotifier_UnitTestContext&,iUTContext).iBackupNotifier))
    60 		{
    61 		iUTContext.DataLogger().LogInformation(KDtorFailedInvariant);
    62 		return EFalse;
    63 		}
    64 	return ETrue;
    65 	}
    66 
    67 inline TBool TBackupNotifier_Dtor_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
    68 	{
    69 	return ETrue;
    70 	}
    71