I want to write a unit test for detecting a thrown exception. Using ExpectedExceptionAttribute, I run the test from inside MSVS and when the TestMethod hits the exception, the debugger breaks to the exception but the TestMethod correctly skips over and reports Passed.
Is there a flag to tell VS not to break during unit testing?
Do not run the tests in a debug session. You have the option to ‘Run Selection’ or ‘Debug selection’, choose the first and you should be fine.