草庐IT

ResultsOfCallMyMethod

全部标签

C# NUnit TestCaseSource 传递参数

我有以下生成一组测试用例的方法!publicIEnumerablePrepareTestCases(param1){foreach(stringentryinentries){yieldreturncallMyMethod(param1);}}如何将字符串类型的参数作为参数传递给我的PrepareTestCases()方法?有没有办法做到以下几点:[Test,Category("Integration"),TestCaseSource("PrepareTestCases",param1)]publicvoidTestRun(ResultsOfCallMyMethodtestData){