I have a school assignment where I need to create a data-driven style of NUnit testing. Using the below code, I am able to get the data from the database, but everytime an \'Ass
Beside using the RowTest extension as suggested by Sam Holder you can also use the TestCaseAttribute
for this:
[TestFixture]
public class TestCaseSample
{
[TestCase(1)]
[TestCase(2)]
[TestCase(3)]
[TestCase(4)]
[TestCase(5)]
[TestCase(6)]
public void GetProductById(int productId)
{
Assert.That(pm.GetProductById(productId),Is.Not.Null);
}
}