Skip to content

Support for params in DataRow #283

Description

@jnyrup

Description

Currently, if you want to test a different number of arguments you have to wrap them.

[TestMethod]
[DataRow(new[] { 1 })]
[DataRow(new[] { 42, 43 })]
[DataRow(new[] { 100, 200, 300 })]
public void MyTestMethod(IEnumerable<int> integers)
{
    ...
}

In the test explorer this the following undesirable output.
image

It would be nice if DataRow supported methods with params argument like this:

[TestMethod]
[DataRow(1)]
[DataRow(42, 43)]
[DataRow(100, 200, 300)]
public void MyTestMethod(params int[] integers)
{
    ...
}

This is probably related to #252

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedUp for grabs; can be claimed by commenting.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions