Null reference exception on generic test fixtures

Bug #1040779 reported by Diogo Lucas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit Test Adapter
Fix Released
Medium
Charlie Poole

Bug Description

Generic test fixtures using the syntax below cause the "test discoverer" code to throw an exception.

[TestFixture(typeof(int))]
public class MyTest<T>
{
  [Test]
  public void TestIt() { }
}

Changing the attribute declaration to explicitly use TypeArgs serves as a workaround:

[TestFixture(TypeArgs = new Type[] { typeof(int) })]

Revision history for this message
Charlie Poole (charlie.poole) wrote :

I'm unable to duplicate this with in the VS2012 RTM, using my current code base. It's possible that other changes have fixed it. I'm marking it 'fixed' but please re-open it if the problem remains under the 0.93 release of the adapter, which will be out shortly.

Changed in nunit-vs-adapter:
status: New → Invalid
status: Invalid → Fix Committed
importance: Undecided → Medium
assignee: nobody → Charlie Poole (charlie.poole)
milestone: none → 0.93
Changed in nunit-vs-adapter:
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.