在nunit2中我使用了这段代码:
yield return new TestCaseData(sourceWordsModelEmpty, combinationsModelEmpty).SetName("FindCombinationsTest - Empty").Throws(typeof(Exception));
如何在Nuni3中使用它?
答案 0 :(得分:0)
我认为您在使用Throws
时遇到问题。删除它并将异常类型作为附加参数传递。然后在测试中,将引发异常的代码包装在Assert.Throws
中。