Barka
Barka

Reputation: 8922

what is the equivalant to MbUnit.Framework.RowAttribute in MSTest?

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

Answers (1)

Nigel Harper
Nigel Harper

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

Related Questions