AutoFixture:
[Theory]
[InlineData("Allowed", "Allowed")]
public void Testing(string test1Data, string test2Data)
{
Assert.Equal(test1Data, test2Data);
}
xUnit.net .
, , , , , InlineData
:
[Theory]
[InlineData("Allowed", "Allowed")]
[InlineData("foo", "foo")]
[InlineData("bar", "bar")]
public void Testing(string test1Data, string test2Data)
{
Assert.Equal(test1Data, test2Data);
}
"" :
[Fact]
public void Testing()
{
var test1Data = "Allowed";
var test2Data = "Allowed";
Assert.Equal(test1Data, test2Data);
}