Reputation: 8922
Which is the equivalent to MbUnit.Framework.RowAttribute
in MSTest?
I want to feed an MSTest TestMethod
with different data. In MBUit
it is dead simple:
[Row("foo", "bar", "foo bar")]
[Row("fat", "cat", "fat cat")]
[Row("wise", "geek", "wise geek")]
[Test]
public void TestMyConcat(string first, string second, string expected)
{
string actual = MyConcat(first, second);
Assert.AreEqual(expected, actual);
}
How is this done in MSTest?
Upvotes: 1
Views: 144
Reputation: 1250
AFAIK there is no direct equivalent provided in MSTest.
The closest thing is a Data Driven Test which pulls its data from an external file.
Upvotes: 3