So, I shoot 100% coverage on the MVC3 site, and we use areas. I can cover everything else, EXCEPT for this one line in Application_Start :
AreaRegistration.RegisterAllAreas();
I have already thoroughly tested the registration of each area, so it really comes down to an integration test, but I still would like to somehow cover it up without resorting to the CoverageExclude attribute or reducing the percentage of coverage.
Note that the module testing this on NUnit explodes with the following exception fragment:
System.InvalidOperationException : This method cannot be called during the application pre-start initialization stage. at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() at System.Web.Compilation.BuildManager.GetReferencedAssemblies()
Any ideas?
source share