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 projectfile:809AD660-30E8-4660-A09D-E2477DE27B22%2Ff%3AGestionAdministrative.IB.Designer.cs%3F33%3F1 - à WSoft.GestionAdministrative.Domain.FakeDossierAdministratifEntityManagerProvider.CreateEntityManager() dans projectfile:7F8E0A81-C1A0-41E8-980F-EF304F81E5A1%2Fd%3AEntityManagerProviders%2Ff%3AFakeDossierAdministratifEntityManagerProvider.cs%3F23%3F1 - à Cocktail.EntityManagerProviderBase`1.CreateEntityManagerCore() dans projectfile:65FCE695-2E91-4245-86D6-3FB3486AEFAD%2Ff%3AEntityManagerProviderBase.cs%3F210%3F1 - à Cocktail.EntityManagerProviderBase`1.get_Manager() dans projectfile:65FCE695-2E91-4245-86D6-3FB3486AEFAD%2Ff%3AEntityManagerProviderBase.cs%3F158%3F1 - à WSoft.Admissions.Test.Tests.ResetEntityManager() dans projectfile:748EA721-F76F-41D9-A002-8817ED042F18%2Ff%3ATests.cs%3F31%3F1 - à WSoft.Admissions.Test.Tests.CreatePatient() dans projectfile:748EA721-F76F-41D9-A002-8817ED042F18%2Ff%3ATests.cs%3F39%3F1 - public class FakeDossierAdministratifEntityManagerProvider : FakeStoreEntityManagerProviderBase<GestionAdministrativeEntities>
{
protected override GestionAdministrativeEntities CreateEntityManager()
{
=>> return new GestionAdministrativeEntities(compositionContextName: GestionAdministrativeContextResolver.DossierAdmministratifFake.Name);
}
}
Regards,
|