I am trying to write a testcase that takes a string and expects the string split up. I cannot initialize a List
in a TestCase
, so I tried using TestCaseSource
with a params
argument, however I get
Wrong number of arguments provided
Is there any way for me to accomplish my end goal?
public IEnumerable<TestCaseData> blah
{
get
{
yield return new TestCaseData("hello World", "h", "e", "l", "l", "o", " ", "W", "o", "r", "l", "d");
}
}
[TestCaseSource("blah")]
public void testmethod(String orig, params String[] myList)