23 ms·
This must be a very old article, in the last 5 - 8 years the best ideas in unit testing has changed. Highly mockist code bases have ended up with their own pro
by UK-Al05 6y ago
This must be a very old article, in the last 5 - 8 years the best ideas in unit testing has changed.
Highly mockist code bases have ended up with their own problems when it comes to change and refactoring.
Not read/writing files, dbs etc fine. Mocking out every object causes a lot problems. Refactoring a single method signature? Now the tests for the object, and each one its consumers(where it is mocked) break.
Specify a public api(Testing is a good opportunity to design it), and test through that. Making everything public, and testing every method? You're going screw up your ability to change.