I'm trying to use a variable as InlineData when using xUnit.
It looks like this:
static string home = "test";
[Theory]
[InlineData(home)]
public void AddTest(string location)
{
Assert.True(LocationIs(location));
}
But I'm getting the error: "An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type"
Is there any way for me to do what I'm trying? Or do I need to just hardcode the inline data.