Tests in generic class without proper TestFixture attribute should be reported as invalid

Bug #487878 reported by Kenneth Xu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit Framework
Fix Released
High
Adam Connelly
NUnit V2
Fix Released
Medium
Charlie Poole

Bug Description

There are two cases that NUnit should report invalid tests but it doesn't:

1) without TestFixtureAttribute
     // forgot [TestFixture(typeof(string))]
     public class GenericTestFixture<T>
     {
         [Test] public void TestOnGenericFixture() {}
     }

2) with inherited TestFixtureAttribute but no type paramter.

     [TestFixture]
     public class ThirdPartyFixture
     {
     }

     // forgot [TestFixture(typeof(string))]
     public class GenericTestFixture<T> : ThirdPartyFixture
     {
         [Test] public void TestOnGenericFixture() {}
     }

See http://groups.google.com/group/nunit-discuss/msg/de708a9c9b0be103

Tags: v2port

Related branches

Changed in nunitv2:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Charlie Poole (charlie.poole)
milestone: none → 2.5.3
Changed in nunitv2:
status: In Progress → Fix Committed
Changed in nunit-3.0:
status: New → Triaged
importance: Undecided → High
tags: added: v2port
Changed in nunitv2:
status: Fix Committed → Fix Released
Changed in nunit-3.0:
assignee: nobody → Adam Connelly (adam-rpconnelly)
Changed in nunit-3.0:
milestone: none → 2.9.4
Changed in nunit-3.0:
milestone: 2.9.4 → none
Revision history for this message
Charlie Poole (charlie.poole) wrote :

Merged manually, updating to reflect code changes in the trunk.

Changed in nunit-3.0:
milestone: none → 2.9.5
status: Triaged → Fix Committed
Changed in nunit-3.0:
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.