Hi,
I'd like to do some Unit Testing in my Silverlight 5 application. I created a test project based on the Template from the Silverlight 5 Toolkit.
When I run the tests through the test application it works fine but when I try to run them within TFS 2010 or resharper it crash everytime I try to create a new EntityManager.
Note : I am using a FakeEntityManager if that matters, as described in the TempHire application. I tried to instance directly my entityManager and I get the same error
Is there some specific configuration to do in order to be able to run the tests in resharper and/or TFS ? I found an old post about this subject from Ward Bell (from 2009) on this forum but I have to admit I didn't manage to do what he explained. Is this post still up to date ?
Here is the trace :
System.Exception: Défaillance irrémédiable (Exception de HRESULT : 0x8000FFFF (E_UNEXPECTED))à MS.Internal.XcpImports.CheckHResult(UInt32 hr)
à MS.Internal.XcpImports.Application_GetCurrent(ref IntPtr pApp)
à System.Windows.Application.get_Current()
à IdeaBlade.Core.IdeaBladeConfig.InitializeFromSource()
à IdeaBlade.Core.IdeaBladeConfig.Initialize()
à IdeaBlade.Core.IdeaBladeConfig.get_Instance()
à IdeaBlade.Core.IdeaBladeConfig.AssertNonDefaultVersion(Boolean throwIfDefault)
à IdeaBlade.EntityModel.EntityManager..ctor(EntityManagerContext context)
à IdeaBlade.EntityModel.EntityManager..ctor(Boolean shouldConnect, String dataSourceExtension, EntityServiceOption entityServiceOption, String compositionContextName)
à WSoft.GestionAdministrative.Domain.GestionAdministrativeEntities..ctor(Boolean shouldConnect, String dataSourceExtension, EntityServiceOption entityServiceOption, String compositionContextName) dans GestionAdministrative.IB.Designer.cs: line 33à WSoft.GestionAdministrative.Domain.FakeDossierAdministratifEntityManagerProvider.CreateEntityManager() dans FakeDossierAdministratifEntityManagerProvider.cs: line 23à Cocktail.EntityManagerProviderBase`1.CreateEntityManagerCore() dans EntityManagerProviderBase.cs: line 210à Cocktail.EntityManagerProviderBase`1.get_Manager() dans EntityManagerProviderBase.cs: line 158à WSoft.Admissions.Test.Tests.ResetEntityManager() dans Tests.cs: line 31à WSoft.Admissions.Test.Tests.CreatePatient() dans Tests.cs: line 39 Here is the line where the error occurs :
public class FakeDossierAdministratifEntityManagerProvider : FakeStoreEntityManagerProviderBase<GestionAdministrativeEntities>
{
protected override GestionAdministrativeEntities CreateEntityManager()
{
=>> return new GestionAdministrativeEntities(compositionContextName: GestionAdministrativeContextResolver.DossierAdmministratifFake.Name);
}
}
Regards,