← Back to team overview

nunit-core team mailing list archive

[Bug 498656] Re: TestCase should show array values in GUI

 

** Changed in: nunit-3.0
       Status: Fix Committed => Fix Released

-- 
TestCase should show array values in GUI
https://bugs.launchpad.net/bugs/498656
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.

Status in NUnit Test Framework: Fix Released
Status in NUnit V2 Test Framework: Fix Released

Bug description:


I want to be able to create test cases with parameters which are variable
length arrays, for example:

[Test]
[TestCase(new int[] {1})]
[TestCase(new int[] {1,2})]
public void Test(params int[] integerArray)
{
Assert.Pass();
}

or

[Test]
[TestCase(1)]
[TestCase(1,2)]
public void Test(params object[] integerArray)
{
Assert.Pass();
}

In the GUI (NUnit 2.5.1) these appear as

Test(System.Int32[])
Test(System.Int32[])

and

Test(System.Object[])
Test(System.Object[])

respectively.

I would like them to appear as

Test(1)
Test(1,2)

Whilst I can supply a test name for the GUI with the TestCase, it is
tedious to add and maintain these for large numbers of test cases.

[From SF Feature Request 2848931]