Application startup issues when unittesting

Vote:
 

I'm trying to set up a xUnit test fixture for running unittests and would really appreciate some pointers. 

My fixture is pretty simple. It:

1. Creates a new HttpContext and assigns it to HttpContext.Current

2. Invokes StarSuite.Core.Settings.LoadSettings();

I receive the below errormessage. Looking at StarCommunity.Core.Modules.Impl with Reflector it seems I have all DLL:s that it references. What's weird though is that I have version 3.1.1.42 of it while the error message below claims it's looking for version 3.0.4.42 or one of it's dependencies.

 

TestCase 'Fixture Getupdated.Community.Web.EPiServerCommunity.Modules.Dialog.Test.Test'
failed: System.ApplicationException : Unable to load types from 'Getupdated.Community.Web.EPiServerCommunity, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. LoaderExceptions: [FileNotFoundException: Could not load file or assembly 'StarCommunity.Core.Modules.Impl, Version=3.0.4.42, Culture=neutral, PublicKeyToken=0bd7a6276e8c109e' or one of its dependencies. The system cannot find the file specified.]

---- System.Reflection.ReflectionTypeLoadException : Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at StarSuite.Core.Settings.GetSingletonInstancesOfBaseType(Type baseType, String staticMethodName, Type returnType)
at StarSuite.Core.Settings.LoadSecurityHandlers()
at StarSuite.Core.Settings.LoadSettings()
C:\Inetpub\wwwroot\Pro\Getupdated.Community.Web.EPiServerCommunity.Modules.Dialog.Test\StarSuiteFixture.cs(24,0): at Getupdated.Community.Web.EPiServerCommunity.Modules.Dialog.Test.StarSuiteFixture..ctor()
----- Inner Stack Trace -----
at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark)
at System.Reflection.Assembly.GetTypes()
at StarSuite.Core.Settings.GetSingletonInstancesOfBaseType(Type baseType, String staticMethodName, Type returnType)

 

#21762
Jul 08, 2008 10:34
Vote:
 
It looks like your assembly Getupdated.Community.Web.EPiServerCommunity is missing some dependencies, or is not available at all. Make sure they are all present in the output of your unit test build.
#21823
Jul 10, 2008 15:47
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.