When using the MSTest ExpectedException NCrunch seems to ignore the attribute in derived methods.
See the following example.
The tests run with MSTest, but fail with NCrunch.
regards
Wilhelm
public abstract class ExpectedExceptionTestsBase40: TestFrame
{
[ExpectedException(typeof(InvalidOperationException))]
public virtual void TestMethod_Expexts_InvalidOperationException()
{
throw new InvalidOperationException();
}
}
[Log]
[TestClass]
public class ExpectedExceptionTests40: ExpectedExceptionTestsBase40
{
[TestMethod]
public override void TestMethod_Expexts_InvalidOperationException()
{
base.TestMethod_Expexts_InvalidOperationException();
}
}