If expected variable is integer, it simply goes like this
[DataRow(2)]
[TestMethod]
public void TestMethod(int expected)
{
// some code...
}
But what should one do when there is 2d array int[,] instead of int parameter? When I try to do this
[DataRow(new int[,] { {0, 0}, {0, 0} })]
[TestMethod]
public void TestMethod(int[,] expected)
{
// some code...
}
error says
An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type