I can read the Excel file perfectly, but not pass the parameters to the test.
[TestFixture]
public class MyTests
{
[Test, TestCaseSource(typeof(MyDataClass), "TestCases")]
public int DivideTest(int n, int d)
{
return n / d;
}
}
public class MyDataClass
{
public static IEnumerable TestCases
{
get
{
yield return new TestCaseData(12, 3).Returns(4);
yield return new TestCaseData(12, 2).Returns(6);
yield return new TestCaseData(12, 4).Returns(3);
}
}
}
That way you can pass data through IEnumerable. How did you date from an Excel file?