6 ms·
I assume people fall into doing it without realising. Unit tests are supposed to hermetically test individual components of a system. In object-orient environ
by adrianratnapala 8y ago
I assume people fall into doing it without realising.
Unit tests are supposed to hermetically test individual components of a system. In object-orient environments, those components are often classes. But classes are typically quite small, very often a particular class exists to some implementation detail of your overall system -- this is especially true of the various Vistors, Factories, Adaptors etc. promoted by OOP theory.
When you combine "unit test every class" and "express your code structure through classes" you accidentally end up with "unit test your structure".
- projektir 8y agoThis inevitably happens if your process insists on high test coverage.