Improve Mock support for Viewcontexts #268
Comments
BTW this is often for app developer unit tests; though we of course also benefit from this for our own unit tests. |
ActionContext will be updated per #1934 |
I think I need a little bit more investigation on this. We added the default constructor to ActionContext to improve unit testability of Controllers. I'm wondering if you have any more scenarios to add in addition to HtmlHelpers, TagHelpers, and ViewComponents. ?? |
Seems like a good idea to care about testability for TagHelpers and ViewComponents. Custom HtmlHelper implementations, I'm less convinced. |
Yeah let's start out with what @rynowak said. |
Discovered during filters work. All of our old context classes in MVC had a no-arg constructor + virtual public property accessors for testability. Need to do a pass
The text was updated successfully, but these errors were encountered: