O'Reilly logo
  • David Frey thinks this is interesting:

Arguments are even harder from a testing point of view. Imagine the difficulty of writing all the test cases to ensure that all the various combinations of arguments work properly. If there are no arguments, this is trivial. If there's one argument, it's not too hard. With two arguments the problem gets a bit more challenging. With more than two arguments, testing every combination of appropriate values can be daunting.


Cover of Clean Code


Moving inputs into state variables instead of method arguments does not remove the multitude of testing inputs - it only hides the direct dependency by passing inputs as state instead of method argument.
Methods with clear inputs and outputs are more explicit in what they do and easier to test than methods with implicit inputs.