Tests with legacy ExpectedException attributes always pass

Bug #498662 reported by Charlie Poole
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit V2
Fix Released
High
Charlie Poole

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]

Tags: confirm

Related branches

Changed in nunitv2:
importance: Undecided → High
tags: added: confirm
Revision history for this message
Charlie Poole (charlie.poole) wrote :

Needs to be confirmed first.

Changed in nunitv2:
milestone: none → 2.5.4
Changed in nunitv2:
status: New → Confirmed
assignee: nobody → Charlie Poole (charlie.poole)
Changed in nunitv2:
status: Confirmed → Fix Committed
Changed in nunitv2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.