I am working on an ASP.NET MVC application. It HttpApplicationlooks like this:
public class MvcApplication : HttpApplication
{
protected void Application_Start()
{
}
}
For the integration test, I want to programmatically launch the application and use it DependencyResolverto interact with it. Access DependencyResolverseems 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 MvcApplicationand provide access to the direct call Application_Start, but this failed with an exception from ASP.NET MVC.