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

Edited Issue: Make APIController more testable [175]

$
0
0
It is currently difficult to unit test actions on ApiController. The primary source of this are non-virtual and non-settable properties. Their getters must be satisfied through convoluted mechanisms.

I recommend these 3 properties be made either virtual or be given a public setter:
1) ApiController.Url
2) ApiController.ModelState
3) ApiController.User

If made virtual, consider making all the properties in ApiController virtual.

Viewing all articles
Browse latest Browse all 7215

Trending Articles



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