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.
Comments: Make sure that issue 397 and 852 are covered as well.
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.
Comments: Make sure that issue 397 and 852 are covered as well.