I have a test project in visual studio 2010. I have a TestMethod. Inside of this, I want to iterate over a list of things and test each. So, I have 1 test and want to assert N times (once for each item in the list).
However, I don’t want to stop if one fails. I want to continue and then report all failures together.
Example:
[TestMethod]
public void Test()
{
foreach (item in list)
{
// if fail, continue on with the rest
Assert(if fail, add to output list);
}
output_failures_all_at_once;
}
I would do something like this: