Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Created Issue: Make MapMvcAttributeRoutes unit testable [1445]

$
0
0
MapMvcAttributeRoutes requires the list of controllers in order to enumerate the attribute routes. The current implementation doesn't allow customizing the service used to provide the controller list. As a result, we always call the ASP.NET BuildManager, which means only code running in an ASP.NET app domain can call MapMvcAttributeRoutes without throwing an exception.

We often suggest people unit test RouteConfig.Register, but because of this problem, anyone using attribute routing can't unit test even their traditional routes without significant workarounds.

Ideally, we'd change the implementation that gets the controller list to make that a replaceable service so that unit testing is feasible here.

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>