I am working on an ASP.NET MVC application. It HttpApplication
looks like this:
public class MvcApplication : HttpApplication
{
protected void Application_Start()
{
}
}
For the integration test, I want to programmatically launch the application and use it DependencyResolver
to interact with it. Access DependencyResolver
seems easy as I can just call DependencyResolver.Current
. However, I did not understand how to start the application initialization logic.
I tried to call new MvcApplication().Init()
, but this does not call the method call Application_Start
. I tried to inherit from MvcApplication
and provide access to the direct call Application_Start
, but this failed with an exception from ASP.NET MVC.