I'm trying to use NUnit and pass in a string argument to the TestCase attribute but I get "An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type"
This is a simplified version but MyStatic is a call that returns a built up RegEx string, so each method in MyStatic that is called appends to a stringbuilder and has an implicit conversion to string.
I want to keep this method because if I create separate unit tests I'd be going against the DRY principle.
[TestCase("","/123",MyStatic.DoThis().And().GetString("ABC"), "id","123")]
public void MyMehthod(string Root, string Path, string Route, string Param, string Expected)
{
var result = SetupRouteResponse(Root, Path, Route, "MatchIt");
Assert.AreEqual(Expected, (string)result.Context.Parameters[Param]);
}