views:

12

answers:

1

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 notifies that the exception is not catched.

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

A: 

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

Grzenio
Ok a workaround, still not what I would have expected.
Gerard