开发者

Debug/Run unittest-project in visual studio

I have some unit-tests within a Visual Studio project with the attributes:

[TestMethod]
[ExpectedException(typeof(..Exception))]

When I run the tests from 'Test View' they pass because the exception is thrown. When I debug the project (F5 or start new instance) the tests are started and when the first exception is thrown the debugger halts and 开发者_如何学JAVAnotifies that the exception is not catched.

I would have expected that the debugger runs in the unit-test context?


In VS 2008 you can switch off breaking on exceptions (Debug -> Exceptions and untick everything). It must be similar in VS 2010.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜