-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Unit
We don't write many unit tests simply because we haven't figured out a good pattern for writing them. The problem is that unit tests are always second class to the rest of the program. To start with, they exist in separate files. The biggest issue is that they become a place to write glue code without documenting properly why and what is being tested. Unit testing frameworks encourage this to a large extent.
We are going to explore fixing this by declaring behaviour against interfaces in such a way that this becomes part of the program and not some second class glue slop that no one cares about.
Unit testing frameworks also naturally incentivise you to write unit tests against concrete instances rather than interfaces too which is also just an unspeakable anti pattern
Integration
We have the same problem for integration tests but it's even worse. Integration tests should always be about testing the of code that exists in concrete parts of the code base. Not even the composition glue code because surely that can be tested too? who knows.