ExpectedExceptionAttribute is not working in MSTest
19:10 22 Jul 2009

This is weird, but all of a sudden the ExpectedExceptionAttribute quit working for me the other day. Not sure what's gone wrong. I'm running VS 2010 and VS 2005 side-by-side. It's not working in VS 2010. This test should pass, however it is failing:

[TestMethod]
[ExpectedException(typeof(ArgumentNullException))]
public void Test_Exception()
{
    throw new ArgumentNullException("test");
}

Any ideas? This really sux.

c# visual-studio-2010 unit-testing mstest expected-exception