Converting a xUnit test case using MemberData to nUnit

Viewed 1583

Let's say I have the following test case that has been written using xUnit:

public static IEnumerable<object[]> testValues = new List<object[]>
{
    new object[] {new double?[] {0.0}, 0.0, 0.0},
};

[Theory]
[MemberData(nameof(testValues))]
public void Test1(double?[] values, double expectedQ1, double expectedQ3)
{
    // Test code
}

How could I express the same unit test in nUnit instead of xUnit?

Note: The main problem here seems to be the use of MemberData, which for so far, I haven't been able to find an nUnit equivalent. What would be the correct way of expressing such unit test cases in nUnit?

1 Answers
Related