While reading an Asp.Net MVC code sample that used MbUnit as it's testing framework, I saw that it was possible to run a single test against multiple input possibilities by using a Row attribute, like so:
[Test]
[Row("test@test_test.com")]
[Row("sdfdf dsfsdf")]
[Row("[email protected]")]
public void Invalid_Emails_Should_Return_False(string invalidEmail)
{
...
}
Please I'd like to know if there is an NUnit equivalent of MbUnit's Row attribute , or otherwise an elegant way to achieve this in NUnit. Thanks.
TestCaseAttribute
leads to much more readable test code when using multiple parameters than usingValuesAttribute
withSequentialAttribute
. I'd only useValuesAttribute
if I wanted to use some combination other than the one specified bySequentialAttribute
. – Szeged