News for hackers. Stuff that matters.
Re:Death by 1000 layers: the perils of over-abstraction in J... by Hermel on Monday December 14, 2020 @09:27AM (#25417877)
The problem is that unit testing as it is often done tears the object oriented design apart. The right way to do unit testing is to not test the internal state of an object in the test code, but to instead test it within the tested object using assertions. That way, running the unit test implicitly verifies the internal state of the object without having to expose it.

There are no comments on this comment yet.