0

i am trying to pass an object alongside with other parameters in the Row attribute of a unit test.

    [Row("Test1", new CustomField(), 3)]  // parameters MUST be string, object and int    
    public void Test_Constructor(string testType, CustomField customField, int num)
    {
       .....
    }

but this will return an error:

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

how can i do this....

raberana
  • 11,739
  • 18
  • 69
  • 95
  • possible duplicate of [passing an object in the attribute of a unit test](http://stackoverflow.com/questions/11327259/passing-an-object-in-the-attribute-of-a-unit-test) – Mauricio Scheffer Jul 05 '12 at 04:35
  • sorry, i thought that question didnt submit because my internet connection failed when i submitted that question through my mobile phone – raberana Jul 05 '12 at 07:15

0 Answers0