asp.net mvc - Testing view's arguments to controller actions? -
i have code in 1 of views:
@html.actionlink("remove", "removewidget", "widgetset", new { widgetsettowidgetmapid = item.maprepositoryid, containingwidgetsetrepositoryid = item.containingwidgetsetrepositoryid}, null) with code in controller:
// get: /widgetset/removewidget/1 public actionresult removewidget(int widgetsettowidgetmapid, string containingwidgetsetrepositoryid) we have unit tests around controller actions (mocking out dal dependencies) , have end-to-end integration tests controller action way through our web services database , back.
but have been bitten numerous times when refactors controller action's parameter (eg. ) not update view.
what options have add automated testing catch that. ideally simple unit test added.
thanks!
Comments
Post a Comment