In this thread, Brian (the only answerer) says \"Your code should be written in such a fashion that it is testing-agnostic\"
The single comment says \"Your code shou
a lot of tests have package-private access to the app classes
I would advise against this, the idea of breaking encapsulation in production code feels like the tail wagging the dog to me. It suggests that the classes are too large and / or lack cohesion. TDD, dependency injection / inversion of control, mocking and writing single responsibility classes should remove the need for relaxing visibility.
The single comment says "Your code should definitely not branch on a global "am I being tested flag".".
Production code is production code and has no need to know about your tests. There should be no logic concerning tests in there, it's poor separation. Again, dependency injection / inversion of control would allow you to swap in test specific logic at runtime, that won't be included in the production artifact.