Suppose you are writing a method in a new class. You are also writing unit test cases to demonstrate that this method works correctly. You know you have written enough test cases to demonstrate the method works as desired when?

You have written separate test cases for each identifiable "group" of input values and/or output values where the behavior is expected to be similar.
  • You have written at least one test case that uses the method.
  • You have written at least one test case for every input value that can be given to the method.
  • You have written at least one test case for every output value that can be produced by the method.
  • You have written at least one test case for every input/output value combination that can be given to/produced by the method.

checking just one input our output is insufficient for methods that do anything sophisticated