There is no matching method parameter
This rule is triggered when you have more test data in your [InlineData]
attribute then parameters on your test method.
Having excess test data will cause the theory to fail at runtime.
To fix a violation of this rule, you may:
using Xunit;
public class xUnit1011
{
[Theory]
[InlineData("Hello world", 42)]
public void TestMethod(string greeting) { }
}
using Xunit;
public class xUnit1011
{
[Theory]
[InlineData("Hello world")]
public void TestMethod(string greeting) { }
}
using Xunit;
public class xUnit1011
{
[Theory]
[InlineData("Hello world", 42)]
public void TestMethod(string greeting, int age) { }
}