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