代码检查:NUnit.AutoFixture。 不兼容的参数类型或不正确的参数值。
此检查会报告 [InlineAutoData(...)] 的实参,其值与相应测试方法的参数类型不兼容。 如果所提供的值在语法上有效,但在 AutoFixture 的 NUnit 集成中仍无法作为该参数类型使用,也会出现此情况。
示例
特性数据与测试签名不匹配,因此该测试用例具有误导性,并且可能在测试主体尚未运行时就失败。
[Test]
[InlineAutoData("100")]
public void TestCount(int count)
{
}
[Test]
[InlineAutoData(100)]
public void TestCount(int count)
{
}
2026年 5月 8日