CodeCoverage vs ExpectedException
I've got several unittests of this pattern: [TestMethod ()] [ExpectedException (typeof (ArgumentNullException))] public void DoStuffTest_Exception () { var foo = new Foo (); Foo.DoStuff (null); } It turns out that code coverage markes the throwing line as half-run, so I get 1 block of uncovered code each time. After thinking ...