0

Is it possible to provide a tuple value for the parameter of a test case? I am not sure if this is possible or I am not able to get the syntax correct.

 [Test]
 [TestCase((0, 0))]
 public void Should_Test((int x, int y) arg) 
 {
     // testing code
 }
Anand
  • 1,387
  • 2
  • 26
  • 48
  • 1
    Although it talks about `DateTime`, it applies to any non-primitive type (and, yes, tuples *are* non-primitive types, even if they *have* primitive-type values). Also, pay attention to the *accepted* answer, not the highest-voted answer. – madreflection May 31 '23 at 19:30
  • @madreflection Thanks so much! `ValueSource` as recommended in the answer to that question is the answer to this question too! – Anand May 31 '23 at 20:10

0 Answers0