阅读背景:

ASP.NET MVC Controller post方法单元测试:ModelState.IsValid始终为true

来源:互联网 

I have written my first unit tests for an ASP.NET MVC web application. All works fine and it is giving me valuable information, but I can't test errors in the view model. The ModelState.IsValid is always true, even when some values are not filled in (empty string or null). I have written my first unit tests for an ASP.N




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: