3 ms·
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
by Hermel 6y ago
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.