Nunit 3.0 Beta 4;使用TestCaseSource未发现测试用例

时间:2015-09-16 06:53:03

标签: c# excel nunit nunit-3.0

我有一个项目,我正在为测试用例读取excel文件。读取excel并将案例映射到C#类的代码正在这样做

class AllTests{
 public static IEnumerable DemoCases
        {
            get
            {
             //Read the excel map the cases here
             yield return testcasedataObject;
            }
        }
    }

测试方法看起来像这样

 [Test, TestCaseSource(typeof(AllTests), "DemoCases")]
        public void DemoTest( )
        {
          //Test execution code
        }

现在所有这些都适用于Nunit 2.6.4,但是在发现测试用例时,不会读取excel。我需要使用beta的TestFixtureSource和TestCaseSource。

0 个答案:

没有答案