os/ossrv/lowlevellibsandfws/pluginfw/Framework/RegistryDataTest/RegistryDataTransitionValidation.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.
sl@0
     1
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// The implementation of the validation classes for the CRegistryData tests
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
// ______________________________________________________________________________
sl@0
    19
//
sl@0
    20
inline TRegistryData_Ctor_TransitionValidator::TRegistryData_Ctor_TransitionValidator(CUnitTestContext& aUTContext)
sl@0
    21
:TTransitionValidator(aUTContext)
sl@0
    22
	{
sl@0
    23
	// Do nothing
sl@0
    24
	}
sl@0
    25
sl@0
    26
inline TBool TRegistryData_Ctor_TransitionValidator::ValidatePreConditions()
sl@0
    27
	{
sl@0
    28
	// Always true
sl@0
    29
	return ETrue;
sl@0
    30
	}
sl@0
    31
sl@0
    32
inline TBool TRegistryData_Ctor_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
sl@0
    33
	{
sl@0
    34
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
    35
		return EFalse;
sl@0
    36
	return ETrue;
sl@0
    37
	}
sl@0
    38
sl@0
    39
// ______________________________________________________________________________
sl@0
    40
//
sl@0
    41
inline TRegistryData_Dtor_TransitionValidator::TRegistryData_Dtor_TransitionValidator(CUnitTestContext& aUTContext)
sl@0
    42
:TTransitionValidator(aUTContext)
sl@0
    43
	{
sl@0
    44
	// Do nothing
sl@0
    45
	}
sl@0
    46
sl@0
    47
inline TBool TRegistryData_Dtor_TransitionValidator::ValidatePreConditions()
sl@0
    48
	{
sl@0
    49
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
    50
		return EFalse;
sl@0
    51
	return ETrue;
sl@0
    52
	}
sl@0
    53
sl@0
    54
inline TBool TRegistryData_Dtor_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
sl@0
    55
	{
sl@0
    56
	return ETrue;
sl@0
    57
	}
sl@0
    58
sl@0
    59
// ______________________________________________________________________________
sl@0
    60
//
sl@0
    61
inline TRegistryData_AddDllDataL_TransitionValidator::TRegistryData_AddDllDataL_TransitionValidator(CUnitTestContext& aUTContext)
sl@0
    62
:TTransitionValidator(aUTContext)
sl@0
    63
	{
sl@0
    64
	// Do nothing
sl@0
    65
	}
sl@0
    66
sl@0
    67
inline TBool TRegistryData_AddDllDataL_TransitionValidator::ValidatePreConditions()
sl@0
    68
	{
sl@0
    69
	CRegistryData_UnitTestContext& context = REINTERPRET_CAST(CRegistryData_UnitTestContext&,
sl@0
    70
															  iUTContext);
sl@0
    71
	TRegistryData_StateAccessor& accessor = REINTERPRET_CAST(TRegistryData_StateAccessor&,
sl@0
    72
															 iUTContext.StateAccessor());
sl@0
    73
sl@0
    74
	// Check that the drive we are trying to add to is valid
sl@0
    75
	if(!(accessor.IsRegisteredDrive(*context.iRegistryData, context.iDriveUnit)))
sl@0
    76
		{
sl@0
    77
		_LIT(KAddDllFailedPreConditions, 
sl@0
    78
			 "CRegistryData_AddDllDataL_Transition failed pre-conditions");
sl@0
    79
		iUTContext.DataLogger().LogInformation(KAddDllFailedPreConditions);
sl@0
    80
		return EFalse;
sl@0
    81
		}
sl@0
    82
sl@0
    83
	if(accessor.InvariantTest(context.iRegistryData))
sl@0
    84
		return EFalse;
sl@0
    85
	return ETrue;
sl@0
    86
	}
sl@0
    87
sl@0
    88
inline TBool TRegistryData_AddDllDataL_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
sl@0
    89
	{
sl@0
    90
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
    91
		return EFalse;
sl@0
    92
	return ETrue;
sl@0
    93
	}
sl@0
    94
sl@0
    95
// ______________________________________________________________________________
sl@0
    96
//
sl@0
    97
inline TRegistryData_ListImplementations_TransitionValidator::TRegistryData_ListImplementations_TransitionValidator(CUnitTestContext& aUTContext)
sl@0
    98
:TTransitionValidator(aUTContext)
sl@0
    99
	{
sl@0
   100
	// Do nothing
sl@0
   101
	}
sl@0
   102
sl@0
   103
inline TBool TRegistryData_ListImplementations_TransitionValidator::ValidatePreConditions()
sl@0
   104
	{
sl@0
   105
	// Just do an invariant test because we should be able to call this function any time
sl@0
   106
	// after CRegistryData has been constructed.
sl@0
   107
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   108
		return EFalse;
sl@0
   109
	return ETrue;
sl@0
   110
	}
sl@0
   111
sl@0
   112
inline TBool TRegistryData_ListImplementations_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
sl@0
   113
	{
sl@0
   114
	// This post validation checking assumes the use of the CExample plugin implementation
sl@0
   115
	// It has to because ListImplementationsL takes an interface uid and we give it the 
sl@0
   116
	// CExampleInterface uid.
sl@0
   117
sl@0
   118
	CRegistryData_UnitTestContext& context = REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext);
sl@0
   119
sl@0
   120
	const TUid KImplementationClassOne = {0x10009DC3};
sl@0
   121
	const TUid KImplementationClassTwo = {0x10009DC4};
sl@0
   122
	
sl@0
   123
	TBool foundOne = EFalse;
sl@0
   124
	TBool foundTwo = EFalse;
sl@0
   125
	TInt impCount = context.iUidList->Count();
sl@0
   126
	for(TInt index = 0; index < impCount; ++index)
sl@0
   127
		{
sl@0
   128
		TUid uid = (*(context.iUidList))[index]->ImplementationUid();
sl@0
   129
		if(uid == KImplementationClassOne)
sl@0
   130
			foundOne = ETrue;
sl@0
   131
		else if(uid == KImplementationClassTwo)
sl@0
   132
			foundTwo = ETrue;
sl@0
   133
		}
sl@0
   134
	if(foundOne == EFalse || foundTwo == EFalse)
sl@0
   135
		return EFalse;
sl@0
   136
sl@0
   137
	if(iUTContext.StateAccessor().InvariantTest(context.iRegistryData))
sl@0
   138
		return EFalse;
sl@0
   139
	return ETrue;
sl@0
   140
	}
sl@0
   141
sl@0
   142
// ______________________________________________________________________________
sl@0
   143
//
sl@0
   144
inline TRegistryData_GetImplementationInformation_TransitionValidator::TRegistryData_GetImplementationInformation_TransitionValidator(CUnitTestContext& aUTContext)
sl@0
   145
:TTransitionValidator(aUTContext)
sl@0
   146
	{
sl@0
   147
	// Do nothing
sl@0
   148
	}
sl@0
   149
sl@0
   150
inline TBool TRegistryData_GetImplementationInformation_TransitionValidator::ValidatePreConditions()
sl@0
   151
	{
sl@0
   152
	// Just do an invariant test because we should be able to call this any time after
sl@0
   153
	// CRegistryData has been constructed.
sl@0
   154
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   155
		return EFalse;
sl@0
   156
	return ETrue;
sl@0
   157
	}
sl@0
   158
sl@0
   159
inline TBool TRegistryData_GetImplementationInformation_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
sl@0
   160
	{
sl@0
   161
	// Check that the return from GetImplementationInformationL is what we expect
sl@0
   162
	_LIT8(KTestDataType, "text/wml");
sl@0
   163
	CRegistryData_UnitTestContext& context = REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext);
sl@0
   164
	if(context.iImplementationRef == 0 ||
sl@0
   165
	   context.iImplementationRef->DataType().Find(KTestDataType) == KErrNotFound)
sl@0
   166
		return EFalse;
sl@0
   167
sl@0
   168
	if(iUTContext.StateAccessor().InvariantTest(context.iRegistryData))
sl@0
   169
		return EFalse;
sl@0
   170
	return ETrue;
sl@0
   171
	}
sl@0
   172
sl@0
   173
// ______________________________________________________________________________
sl@0
   174
//
sl@0
   175
inline TRegistryData_IsRegisteredWithDate_TransitionValidator::TRegistryData_IsRegisteredWithDate_TransitionValidator(CUnitTestContext& aUTContext)
sl@0
   176
:TTransitionValidator(aUTContext)
sl@0
   177
	{
sl@0
   178
	// Do nothing
sl@0
   179
	}
sl@0
   180
sl@0
   181
inline TBool TRegistryData_IsRegisteredWithDate_TransitionValidator::ValidatePreConditions()
sl@0
   182
	{
sl@0
   183
	// No pre condition checking required other than that the object is constructed.
sl@0
   184
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   185
		return EFalse;
sl@0
   186
	return ETrue;
sl@0
   187
	}
sl@0
   188
sl@0
   189
inline TBool TRegistryData_IsRegisteredWithDate_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
sl@0
   190
	{
sl@0
   191
	// No post condition checking other than that this object's state is OK
sl@0
   192
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   193
		return EFalse;
sl@0
   194
	return ETrue;
sl@0
   195
	}
sl@0
   196
sl@0
   197
// ______________________________________________________________________________
sl@0
   198
//
sl@0
   199
inline TRegistryData_PersistNow_TransitionValidator::TRegistryData_PersistNow_TransitionValidator(CUnitTestContext& aUTContext)
sl@0
   200
:TTransitionValidator(aUTContext)
sl@0
   201
	{
sl@0
   202
	// Do nothing
sl@0
   203
	}
sl@0
   204
sl@0
   205
inline TBool TRegistryData_PersistNow_TransitionValidator::ValidatePreConditions()
sl@0
   206
	{
sl@0
   207
	// No pre condition checking required other than that the object is correctly constructed
sl@0
   208
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   209
		return EFalse;
sl@0
   210
	return ETrue;
sl@0
   211
	}
sl@0
   212
sl@0
   213
inline TBool TRegistryData_PersistNow_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
sl@0
   214
	{
sl@0
   215
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   216
		return EFalse;
sl@0
   217
	return ETrue;
sl@0
   218
	}
sl@0
   219
sl@0
   220
// ______________________________________________________________________________
sl@0
   221
//
sl@0
   222
inline TRegistryData_TemporaryUninstall_TransitionValidator::TRegistryData_TemporaryUninstall_TransitionValidator(CUnitTestContext& aUTContext)
sl@0
   223
:TTransitionValidator(aUTContext)
sl@0
   224
	{
sl@0
   225
	// Do nothing
sl@0
   226
	}
sl@0
   227
sl@0
   228
inline TBool TRegistryData_TemporaryUninstall_TransitionValidator::ValidatePreConditions()
sl@0
   229
	{
sl@0
   230
	// Only pre condition is that object is fully constructed
sl@0
   231
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   232
		return EFalse;
sl@0
   233
	return ETrue;
sl@0
   234
	}
sl@0
   235
sl@0
   236
inline TBool TRegistryData_TemporaryUninstall_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
sl@0
   237
	{
sl@0
   238
	CRegistryData_UnitTestContext& context = REINTERPRET_CAST(CRegistryData_UnitTestContext&,
sl@0
   239
															  iUTContext);
sl@0
   240
	TRegistryData_StateAccessor& accessor = REINTERPRET_CAST(TRegistryData_StateAccessor&,
sl@0
   241
															 iUTContext.StateAccessor());
sl@0
   242
sl@0
   243
	// Check that the drive we have uninstalled is not valid
sl@0
   244
	if(accessor.IsRegisteredDrive(*context.iRegistryData, context.iDriveUnit))
sl@0
   245
		{
sl@0
   246
		_LIT(KUninstallFailedPostConditions, 
sl@0
   247
			 "CRegistryData_TemporaryUninstallL_Transition failed post-conditions");
sl@0
   248
		iUTContext.DataLogger().LogInformation(KUninstallFailedPostConditions);
sl@0
   249
		return EFalse;
sl@0
   250
		}
sl@0
   251
sl@0
   252
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   253
		return EFalse;
sl@0
   254
	return ETrue;
sl@0
   255
	}
sl@0
   256
sl@0
   257
// ______________________________________________________________________________
sl@0
   258
//
sl@0
   259
inline TRegistryData_UndoTemporaryUninstall_TransitionValidator::TRegistryData_UndoTemporaryUninstall_TransitionValidator(CUnitTestContext& aUTContext)
sl@0
   260
:TTransitionValidator(aUTContext)
sl@0
   261
	{
sl@0
   262
	// Do nothing
sl@0
   263
	}
sl@0
   264
sl@0
   265
inline TBool TRegistryData_UndoTemporaryUninstall_TransitionValidator::ValidatePreConditions()
sl@0
   266
	{
sl@0
   267
	// Only pre condition is that object is fully constructed
sl@0
   268
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   269
		return EFalse;
sl@0
   270
	return ETrue;
sl@0
   271
	}
sl@0
   272
sl@0
   273
inline TBool TRegistryData_UndoTemporaryUninstall_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
sl@0
   274
	{
sl@0
   275
	CRegistryData_UnitTestContext& context = REINTERPRET_CAST(CRegistryData_UnitTestContext&,
sl@0
   276
															  iUTContext);
sl@0
   277
	TRegistryData_StateAccessor& accessor = REINTERPRET_CAST(TRegistryData_StateAccessor&,
sl@0
   278
															 iUTContext.StateAccessor());
sl@0
   279
sl@0
   280
	// Check that the drive we have uninstalled is not valid
sl@0
   281
	if(!(accessor.IsRegisteredDrive(*context.iRegistryData, context.iDriveUnit)))
sl@0
   282
		{
sl@0
   283
		_LIT(KUndoUninstallFailedPostConditions, 
sl@0
   284
			 "CRegistryData_UndoTemporaryUninstallL_Transition failed post-conditions");
sl@0
   285
		iUTContext.DataLogger().LogInformation(KUndoUninstallFailedPostConditions);
sl@0
   286
		return EFalse;
sl@0
   287
		}
sl@0
   288
sl@0
   289
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   290
		return EFalse;
sl@0
   291
	return ETrue;
sl@0
   292
	}
sl@0
   293
sl@0
   294
// ______________________________________________________________________________
sl@0
   295
//
sl@0
   296
inline TRegistryData_UpdateDllData_TransitionValidator::TRegistryData_UpdateDllData_TransitionValidator(CUnitTestContext& aUTContext)
sl@0
   297
:TTransitionValidator(aUTContext)
sl@0
   298
	{
sl@0
   299
	// Do nothing
sl@0
   300
	}
sl@0
   301
sl@0
   302
inline TBool TRegistryData_UpdateDllData_TransitionValidator::ValidatePreConditions()
sl@0
   303
	{
sl@0
   304
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   305
		return EFalse;
sl@0
   306
	return ETrue;
sl@0
   307
	}
sl@0
   308
sl@0
   309
inline TBool TRegistryData_UpdateDllData_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
sl@0
   310
	{
sl@0
   311
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   312
		return EFalse;
sl@0
   313
	return ETrue;
sl@0
   314
	}
sl@0
   315
sl@0
   316
// ______________________________________________________________________________
sl@0
   317
//
sl@0
   318
inline TRegistryData_BuildIndexes_TransitionValidator::TRegistryData_BuildIndexes_TransitionValidator(CUnitTestContext& aUTContext)
sl@0
   319
:TTransitionValidator(aUTContext)
sl@0
   320
	{
sl@0
   321
	// Do nothing
sl@0
   322
	}
sl@0
   323
sl@0
   324
inline TBool TRegistryData_BuildIndexes_TransitionValidator::ValidatePreConditions()
sl@0
   325
	{
sl@0
   326
	// Only pre condition is that object is fully constructed (BuildIndexes is actually
sl@0
   327
	// called from ConstructL anyway)
sl@0
   328
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   329
		return EFalse;
sl@0
   330
	return ETrue;
sl@0
   331
	}
sl@0
   332
sl@0
   333
inline TBool TRegistryData_BuildIndexes_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
sl@0
   334
	{
sl@0
   335
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   336
		return EFalse;
sl@0
   337
	return ETrue;
sl@0
   338
	}
sl@0
   339
sl@0
   340
// ______________________________________________________________________________
sl@0
   341
//
sl@0
   342
inline TRegistryData_IndexedFind_TransitionValidator::TRegistryData_IndexedFind_TransitionValidator(CUnitTestContext& aUTContext)
sl@0
   343
:TTransitionValidator(aUTContext)
sl@0
   344
	{
sl@0
   345
	// Do nothing
sl@0
   346
	}
sl@0
   347
sl@0
   348
inline TBool TRegistryData_IndexedFind_TransitionValidator::ValidatePreConditions()
sl@0
   349
	{
sl@0
   350
	// Only pre condition is that object is fully constructed.
sl@0
   351
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   352
		return EFalse;
sl@0
   353
	return ETrue;
sl@0
   354
	}
sl@0
   355
sl@0
   356
inline TBool TRegistryData_IndexedFind_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
sl@0
   357
	{
sl@0
   358
	// No post condition (function is const)
sl@0
   359
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   360
		return EFalse;
sl@0
   361
	return ETrue;
sl@0
   362
	}
sl@0
   363
sl@0
   364
// ______________________________________________________________________________
sl@0
   365
//
sl@0
   366
inline TRegistryData_Restore_TransitionValidator::TRegistryData_Restore_TransitionValidator(CUnitTestContext& aUTContext)
sl@0
   367
:TTransitionValidator(aUTContext)
sl@0
   368
	{
sl@0
   369
	// Do nothing
sl@0
   370
	}
sl@0
   371
sl@0
   372
inline TBool TRegistryData_Restore_TransitionValidator::ValidatePreConditions()
sl@0
   373
	{
sl@0
   374
	// Only pre condition is that object is fully constructed.
sl@0
   375
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   376
		return EFalse;
sl@0
   377
	return ETrue;
sl@0
   378
	}
sl@0
   379
sl@0
   380
inline TBool TRegistryData_Restore_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
sl@0
   381
	{
sl@0
   382
	// The object has been restored from file so just check that it is a valid object
sl@0
   383
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   384
		return EFalse;
sl@0
   385
	return ETrue;
sl@0
   386
	}
sl@0
   387
sl@0
   388
// ______________________________________________________________________________
sl@0
   389
//
sl@0
   390
inline TRegistryData_Store_TransitionValidator::TRegistryData_Store_TransitionValidator(CUnitTestContext& aUTContext)
sl@0
   391
:TTransitionValidator(aUTContext)
sl@0
   392
	{
sl@0
   393
	// Do nothing
sl@0
   394
	}
sl@0
   395
sl@0
   396
inline TBool TRegistryData_Store_TransitionValidator::ValidatePreConditions()
sl@0
   397
	{
sl@0
   398
	// Only pre condition is that object is fully constructed
sl@0
   399
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   400
		return EFalse;
sl@0
   401
	return ETrue;
sl@0
   402
	}
sl@0
   403
sl@0
   404
inline TBool TRegistryData_Store_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
sl@0
   405
	{
sl@0
   406
	// No post condition as function is const
sl@0
   407
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   408
		return EFalse;
sl@0
   409
	return ETrue;
sl@0
   410
	}
sl@0
   411
sl@0
   412
// ______________________________________________________________________________
sl@0
   413
//
sl@0
   414
inline TRegistryData_MatchOnUid_TransitionValidator::TRegistryData_MatchOnUid_TransitionValidator(CUnitTestContext& aUTContext)
sl@0
   415
:TTransitionValidator(aUTContext)
sl@0
   416
	{
sl@0
   417
	// Do nothing
sl@0
   418
	}
sl@0
   419
sl@0
   420
inline TBool TRegistryData_MatchOnUid_TransitionValidator::ValidatePreConditions()
sl@0
   421
	{
sl@0
   422
	// No pre condition checking because this function is static
sl@0
   423
	return ETrue;
sl@0
   424
	}
sl@0
   425
sl@0
   426
inline TBool TRegistryData_MatchOnUid_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
sl@0
   427
	{
sl@0
   428
	// No post condition checking because this function is static
sl@0
   429
	return ETrue;
sl@0
   430
	}
sl@0
   431
sl@0
   432
// ______________________________________________________________________________
sl@0
   433
//
sl@0
   434
inline TRegistryData_ConstructPolicyIndexL_TransitionValidator::TRegistryData_ConstructPolicyIndexL_TransitionValidator(CUnitTestContext& aUTContext)
sl@0
   435
:TTransitionValidator(aUTContext)
sl@0
   436
	{
sl@0
   437
	// Do nothing
sl@0
   438
	}
sl@0
   439
sl@0
   440
inline TBool TRegistryData_ConstructPolicyIndexL_TransitionValidator::ValidatePreConditions()
sl@0
   441
	{
sl@0
   442
	// Only pre condition is object is fully constructed
sl@0
   443
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   444
		return EFalse;
sl@0
   445
	return ETrue;
sl@0
   446
	}
sl@0
   447
sl@0
   448
inline TBool TRegistryData_ConstructPolicyIndexL_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
sl@0
   449
	{
sl@0
   450
	// No post condition because function is const
sl@0
   451
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   452
		return EFalse;
sl@0
   453
	return ETrue;
sl@0
   454
	}
sl@0
   455
sl@0
   456
// ______________________________________________________________________________
sl@0
   457
//
sl@0
   458
inline TRegistryData_SetPolicyObserver_TransitionValidator::TRegistryData_SetPolicyObserver_TransitionValidator(CUnitTestContext& aUTContext)
sl@0
   459
:TTransitionValidator(aUTContext)
sl@0
   460
	{
sl@0
   461
	// Do nothing
sl@0
   462
	}
sl@0
   463
sl@0
   464
inline TBool TRegistryData_SetPolicyObserver_TransitionValidator::ValidatePreConditions()
sl@0
   465
	{
sl@0
   466
	// Only pre condition is object is fully constructed
sl@0
   467
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   468
		return EFalse;
sl@0
   469
	return ETrue;
sl@0
   470
	}
sl@0
   471
sl@0
   472
inline TBool TRegistryData_SetPolicyObserver_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
sl@0
   473
	{
sl@0
   474
	CRegistryData_UnitTestContext& context = REINTERPRET_CAST(CRegistryData_UnitTestContext&,
sl@0
   475
															  iUTContext);
sl@0
   476
	if(iUTContext.StateAccessor().InvariantTest(context.iRegistryData))
sl@0
   477
		return EFalse;
sl@0
   478
	return ETrue;
sl@0
   479
	}
sl@0
   480
sl@0
   481
// ______________________________________________________________________________
sl@0
   482
//
sl@0
   483
inline TRegistryData_GetSecondImplInfo_TransitionValidator::TRegistryData_GetSecondImplInfo_TransitionValidator(CUnitTestContext& aUTContext)
sl@0
   484
:TTransitionValidator(aUTContext)
sl@0
   485
	{
sl@0
   486
	// Do nothing
sl@0
   487
	}
sl@0
   488
sl@0
   489
inline TBool TRegistryData_GetSecondImplInfo_TransitionValidator::ValidatePreConditions()
sl@0
   490
	{
sl@0
   491
	CRegistryData_UnitTestContext& context = REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext);
sl@0
   492
sl@0
   493
	// Copy the result of the earlier GetImplementationInformation so we 
sl@0
   494
	// can compare later
sl@0
   495
	context.iSecondImplementationRef = context.iImplementationRef;
sl@0
   496
sl@0
   497
	if(iUTContext.StateAccessor().InvariantTest(context.iRegistryData))
sl@0
   498
		return EFalse;
sl@0
   499
	return ETrue;
sl@0
   500
	}
sl@0
   501
sl@0
   502
inline TBool TRegistryData_GetSecondImplInfo_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
sl@0
   503
	{
sl@0
   504
	CRegistryData_UnitTestContext& context = REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext);
sl@0
   505
sl@0
   506
	// if the second call to GetImplementationInformation does not return the same thing
sl@0
   507
	// as the first then this test has failed
sl@0
   508
	if(context.iImplementationRef != context.iSecondImplementationRef)
sl@0
   509
		return EFalse;
sl@0
   510
sl@0
   511
	if(iUTContext.StateAccessor().InvariantTest(context.iRegistryData))
sl@0
   512
		return EFalse;
sl@0
   513
	return ETrue;
sl@0
   514
	}
sl@0
   515
sl@0
   516
// ______________________________________________________________________________
sl@0
   517
//
sl@0
   518
inline TRegistryData_DiscoveriesBeginning_TransitionValidator::TRegistryData_DiscoveriesBeginning_TransitionValidator(CUnitTestContext& aUTContext)
sl@0
   519
:TTransitionValidator(aUTContext)
sl@0
   520
	{
sl@0
   521
	// Do nothing
sl@0
   522
	}
sl@0
   523
sl@0
   524
inline TBool TRegistryData_DiscoveriesBeginning_TransitionValidator::ValidatePreConditions()
sl@0
   525
	{
sl@0
   526
	if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext).iRegistryData))
sl@0
   527
		return EFalse;
sl@0
   528
	return ETrue;
sl@0
   529
	}
sl@0
   530
sl@0
   531
inline TBool TRegistryData_DiscoveriesBeginning_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */)
sl@0
   532
	{
sl@0
   533
	CRegistryData_UnitTestContext& context = REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext);
sl@0
   534
	
sl@0
   535
	if(context.iRegistryData->IndexValid())
sl@0
   536
		return EFalse;
sl@0
   537
sl@0
   538
	if(iUTContext.StateAccessor().InvariantTest(context.iRegistryData))
sl@0
   539
		return EFalse;
sl@0
   540
	return ETrue;
sl@0
   541
	}
sl@0
   542