Skip to content

DataRow does not work with optional arguments #252

Description

@jnyrup

Description

DataRow does not support for methods with optional arguments.

TestCase got it in nunit/nunit#457
Theory got it in xunit/xunit#997

Steps to reproduce

[TestMethod]
[DataRow(42)]
public void MyTestMethod(int number, string message = "")
{
    ...
}

Expected behavior

Test should execute

Actual behavior

Test fails with:

System.Reflection.TargetParameterCountException: Parameter count mismatch.

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