代码检查:NUnit。 未为测试方法参数提供值。
如果您编写参数化的 NUnit 测试,则必须为每个测试参数提供数据值。 您可以通过不同的方式指定数据值,这些方式在 NUnit 文档的 参数化测试部分中进行了描述。
[Test]
// No values for parameter 'x'
public void MyTest(int x)
{
// do something
}
[Test]
// Test will be executed with 'x = 10'
public void MyTest([Values(10)] int x)
{
// do something
}
最后修改日期: 2025年 9月 27日