I have a DataTestMethod in my unit test using MSTest, and I have a string property in my constructor, let's say I have this code for example:
[DataTestMethod]
[DataRow("test")]
[DataRow(stringproperty)] // How is this?
public void TestMethod(string test) {
Assert.AreEqual("test", test);
}
Is it possible to pass a property as parameter in DataRow?
Thanks.
Yes if you use the DynamicDataAttribute