2
MVC单元测试我在我的单元测试项目中的代码块如下错误在控制器
IEnumerable<Product> result = (IEnumerable<Product>)controller.List(2).Model;
它产生错误
Error 1 'System.Web.Mvc.ActionResult' does not contain a definition for 'Model' and no extension method 'Model' accepting a first argument of type 'System.Web.Mvc.ActionResult' could be found ..
我该如何解决这个问题?
无需投它,只是改变了行动,公众的ViewResult列表(INT PARAM) – Stacked