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.
精彩评论