tags:

views:

46

answers:

1

Hello,

Say I have a test like:

void TestSomething(int someParam)
{
   // Test code
}

I would like to execute this test with a set of "someParam" values. I could write explicit [Test] fixtures calling TestSomething() with the parameters, which means having N methods for every TestSomething() method. I could write another [Test] method looping on "someParam" values and calling TestSomething(), it means 2 methods for every test, and the test report is not as good as with individual TestSomethingWithXValue() methods.

So, is there any way to programmatically generate fixtures for every test methods and input values?

+3  A: 

Check out Parameterized Tests With NUnit 2.5.

Programming Hero
Perfect, I just upgraded NUnit and it works as expected. Thanks
pmezard