Kei*_*ler 10 validation asp.net-mvc unit-testing annotations
我正在实现数据验证验证器,如下所示:
http://www.asp.net/learn/mvc/tutorial-39-cs.aspx
这在运行时很有用,但是如何单元测试来验证我是否说出属性[StringLength(10)],返回错误?
Villecoder的这篇文章是我正在使用的单元测试解决方案.它还允许您对单元测试自定义注释
http://villecoder.com/2010/04/23/unit-testing-custom-data-annotations/
| 归档时间: | 
 | 
| 查看次数: | 4832 次 | 
| 最近记录: |