TestMethod and DataRow DateTime parameter

Viewed 3590

I have basic question about Data Driven Tests.

I tried something like

[TestMethod]
[DataRow(new DateTime(2018,10,25))]     
public void SpecialDateOperation(DateTime date)
{
    // test...
}

But I am getting an error

An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type

Somehow I am not able to get it to work. What is the issue here?

0 Answers
Related