提醒:Unit Testing With ExpectedException 2012年01月09日

来自: Cook Computing
订阅:jiest
演示:以MSN订阅提醒为例 订阅到哪吒,有更新提醒我
哪吒机器人提醒:
提醒:Cook Computing
【标题】Unit Testing With ExpectedException
【摘要】@mentalguy must have been having a frustrating day:i've come across this problem with .net code. often a single exception type will cover several different error conditions and so when writing the corresponding unit tests it's tempting to assert on the exception's message property. of course this is bad because it assumes the text of the message won't be changed. nunitnunit encourages the checking of exception messages when using the expectedexception attribute, for example[expectedexceptio... (01-09 17:14)
收藏 |  评论 |  推荐给好友  | 
本文共有 0 次分享
来自 Cook Computing 的其他文章
评论
共有 - 条评论


我要反馈