How can I test a method that takes a parameter of type string[][] ? I tried using InlineData attribute but it only works with string[]
[InlineData(new string[]{ "one", "two", "three"})]
but not with
[InlineData(new string[][] { new string[]{"one"}, new string[] {"two" } })]
What is the correct way to do it ?
Jagged Array as Argument only works by using the 'params' keyword. The jagged array must be the last argument of the test method. See my example:
Without the params-keyword the compiler do not accept the jagged array.