views:

139

answers:

2
[TestMethod]
[ExpectedException(typeof(FormatException))]
public void PassGodammit()
{
    throw new FormatException();
}

?? driving me mad.

+4  A: 

Make sure to check your project references after you upgrade from 2005 to 2008: for some odd reason the Upgrade Wizard does not upgrade references to Microsoft.VisualStudio.QualityTools.UnitTestFramework and leaves references to version 8.0 of this assembly. Just manually add a reference to v 9.0 of this assembly.

Anton Gogolev
+1  A: 

I just copied your code to my VS2008. It gets a "Passed" as a result. Do you have any other info? It works well for me.

redjackwong