ASP.NET MVC单元测试时如何对含有ModelState.IsValid的Action进行测试
下面的例子来至Asp.NetMVC2的项目模板。首先是一个实体类:实体类[PropertiesMustMatch("Password","ConfirmPassword",ErrorMessage="Thepasswordandconfirmationpassworddonotmatch.")]publicclassRegisterModel{[Required][DisplayName("Use