I am working with teamcity and and moving some old integration tests over to it. These old integration tests just logged the results as a console application. I would stay with just logging the results but, teamcity has nice support for NUnit and would like to take advantage of it.
Lets say this was one of my old tests
public void Test ()
{
int tries = 10;
int fails = Check(tries);
Console.WriteLine("{0} fails out of {1} attempts", fails, tries); // log results
}
public int Check (int tries)
{
int fails = 0;
for (int i = 0; i < tries; i++)
{
if (i % 2 == 1) fails++;
}
return fails;
}
I am not sure how to do this with NUnit or if it's even possible. I want each call of Check to be it's own test. And no, blocking out 10 tests to call Check (n) n = 0, ... n = 9 is not what I'm looking for.
Thanks in advance.