哪吒机器人提醒:

提醒: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)