public static IEnumerable<object[]> testInput => new[]
{
new object[] { new[] { 1 } },
new object[] { new[] { 1, 2 } },
};
[DataTestMethod]
[DynamicData(nameof(testInput))]
public void TestDynamicData(int[] testData)
{
CollectionAssert.AreEqual(testData, new[] { 1, 2 });
}
The problem seams to exist if the last check is valid.
The following code produces the expected result ("Failed").
public static IEnumerable<object[]> testInput => new[]
{
new object[] { new[] { 1, 2 } },
new object[] { new[] { 1 } },
};
[DataTestMethod]
[DynamicData(nameof(testInput))]
public void TestDynamicData(int[] testData)
{
CollectionAssert.AreEqual(testData, new[] { 1, 2 });
}
NCrunch Version 3.22.0.1