3 ms·
Unit tests are often the only spec there is. Code with no tests usually can't be rewritten/refactored without first making tests. They are significantly cheaper
by alkonaut 10y ago
Unit tests are often the only spec there is. Code with no tests usually can't be rewritten/refactored without first making tests. They are significantly cheaper to write when the code is first created, than when the code needs to be refactored a decade later.
DI/IoC aren't necessary (or aren't made necessary by unit tests).
What tests do make is enforce small interfaces, and other good practices such as "Tell, don't ask" etc.