unit testing - How can I get test coverage around AreaRegistration.RegisterAllAreas in ASP.NET MVC? -


so i'm shooting 100% coverage on mvc3 site, , we're using areas. can coverage on else except 1 line in application_start:

arearegistration.registerallareas(); 

i've thoroughly tested each area's registration, amounts integration test of sorts, i'd still cover somehow without having resort coverageexclude attribute or lowering coverage percentage.

note unit testing in nunit explodes following exception snippet:

system.invalidoperationexception : method cannot called during application's pre-start initialization stage. @ system.web.compilation.buildmanager.ensuretoplevelfilescompiled() @ system.web.compilation.buildmanager.getreferencedassemblies() 

any ideas?

i feel trying aim 100% test coverage on application not best approach. sure app should tested pushing aside make sure have 100% coverage stops focusing on quality of tests , more coverage. coverage rough guide , not tell if tests testing should "line x" got called.

having high tc i'd if there's 100% you're not testing properly. wouldn't test this.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -