← Back to team overview

nunit-core team mailing list archive

[Bug 498662] Re: Tests with legacy ExpectedException attributes always pass

 

** Branch linked: lp:nunitv2

-- 
Tests with legacy ExpectedException attributes always pass
https://bugs.launchpad.net/bugs/498662
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.

Status in NUnit V2 Test Framework: Fix Committed

Bug description:
Actual behaviour:

The following test when compiled against the NUnit 2.4 'nunit.framework'
passes when executed with NUnit 2.5:

[Test, ExpectedException("UnknownException")]
public void ShouldFail()
{
throw new NullReferenceException();
}

Expected behaviour:

Test should fail.

This only happens when tests have been compiled against 'nunit.framework'
2.4 or earlier.

I'm guessing it will have something to do with the extra properties in the
2.5 version of this attribute.

[From SF Bug #2837070]