为什么预期的异常不会捕获代码中抛出的异常,因为VSTest成功了?

时间:2010-09-29 21:59:58

标签: unit-testing

我尝试从以下链接运行该示例 http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.expectedexceptionattribute.aspx 期望测试通过,但测试失败并出现相同的错误。有什么我想念的吗? 谢谢,

1 个答案:

答案 0 :(得分:0)

检查此问题C# testing -- why does ExpectedException tagged method pass when exception not thrown?有关Silverlight单元测试框架和预期异常的相同问题