back

by WolfOliver·5y ago·view on hn ↗
When a test in the classicist style fail (maybe because you refactored something), it tells you something is not working with your actual software but you do not see directly where the error is. You only have to fix the software, your test most probably still works. This is because you did not test implementation details but only the "what" should be done.

When a test in the mockist style fail, you see directly what part of the system is broken. But the rest of the day you are bussy fixing your test suite as the test are tightly coupled to the "how" something is done.

1 comments
So classicist try to write the test that they do not break when you change the implementation (e.g refactoring)

Mockist don't care so much about this, they focus on isolating the unit.

Interesting fact: Originally unit tests are called unit tests because they can be executed independently from any other tests. Not because they test a single unit.