C# Nunit3如何从Nunit2重写代码
在nunit2中,我使用了以下代码:C# Nunit3如何从Nunit2重写代码,c#,nunit,nunit-3.0,C#,Nunit,Nunit 3.0,在nunit2中,我使用了以下代码: yield return new TestCaseData(sourceWordsModelEmpty, combinationsModelEmpty).SetName("FindCombinationsTest - Empty").Throws(typeof(Exception)); 如何在Nuni3中使用它?我假设您在抛出时遇到问题。删除它并将异常类型作为附加参数传入。然后在测试中,将引发异常的代码包装在一个Assert.throws中 您需要为这一
yield return new TestCaseData(sourceWordsModelEmpty, combinationsModelEmpty).SetName("FindCombinationsTest - Empty").Throws(typeof(Exception));
如何在Nuni3中使用它?我假设您在
抛出时遇到问题。删除它并将异常类型作为附加参数传入。然后在测试中,将引发异常的代码包装在一个Assert.throws
中 您需要为这一行代码提供一些上下文。