In MSTest you can do something like:
[TestMethod]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV",
"testdata.csv", "testdata#csv", DataAccessMethod.Sequential)]
public void TestSomething()
{
double column1 = Convert.ToDouble(TestContext.DataRow["column1"]);
...
Assert.AreEqual(...);
}
What is the equivalent code in NUnit 2.5?
I would look at the parameterized tests documentation in NUnit 2.5 and see if you can do something like what you’re doing there. I do not recall NUnit having a built-in CSV reading attribute to drive parameterized tests. There may be a community plug-in somewhere though.
I should also point out that if you are just looking for non-MS Unit Testing framework libraries to help you out, xUnit.net does have this functionality. Check out this blog post from Ben Hall