Thursday, 15 September 2011

c# - TestCase with list or params -


I am trying to write a test case that takes the string and hopes to split the string. I can not start the list in TestCase , so I try using a testcaseSource with a parameter argument But I got it

Wrong number of given arguments

Is there any way to fulfill my end goal?

  Public IEnumerable & lt; TestCaseData & gt; Blast {{Returns New Test Sceadata ("Hello World", "H", "E", "L", "L", "O", "", "W", "O", "R" L " "D");}} [TestCaseSource ("blah")] Public Zero Testmethod (String Origination, Parameter String [] myList)  

Now you are passing only two arguments, the second one array that should be passed in your parameters string [] myList .

No comments:

Post a Comment