Unit testing 在单元测试的行属性中传递对象

Unit testing 在单元测试的行属性中传递对象,unit-testing,c#-4.0,mbunit,gallio,Unit Testing,C# 4.0,Mbunit,Gallio,我试图在单元测试的Row属性中传递一个对象和其他参数 [Row("Test1", new CustomField(), 3)] // parameters MUST be string, object and int public void Test_Constructor(string testType, CustomField customField, int num) { ..... } 但这将返回一个错误: An attribu

我试图在单元测试的Row属性中传递一个对象和其他参数

    [Row("Test1", new CustomField(), 3)]  // parameters MUST be string, object and int    
    public void Test_Constructor(string testType, CustomField customField, int num)
    {
       .....
    }
但这将返回一个错误:

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

我该怎么做……

可能是重复的对不起,我以为这个问题没有提交,因为当我通过手机提交这个问题时,我的互联网连接失败了