I want to create tests using NUnit which parameters is multidimensional array. I've read a documentation (https://github.com/nunit/docs/wiki/TestCaseSource-Attribute) But my code doesn't work. Can somebody explain why?
static IEnumerable<int[,]> TestMatrixs()
{
yield return new int[4, 2] { { 1, 2 }, { 3, 4 }, { 5, 3 }, { 7, 9 } };
}
[TestCaseSource(nameof(TestMatrixs))]
public void TestCreateSquareMatrixPower2(int[,] matrixSource)
{
Assert.NotNull(matrixSource);
}
There is an error "there are no available tests" (in all test class). If I delete test method with TestCaseSource all another methods work fine. I've tryed to create another class, as mentioned in documentation, but it wasn't work too. How can I create test with parameters of multidimensional array?