Chapter 9. Dependencies

Developers who are new to unit testing and have just grasped its mere basics soon hit a barrier. From their perspective, the systems they encounter bear no resemblance to the examples in an introductory text or online tutorial on unit testing or test-driven development. In my experience, this can be very demoralizing and lead to conclusions like: “Our system can’t be tested” or “Unit testing/test-driven development only works in green field projects.” There are numerous reasons for such beliefs, some being a complex or botched architecture, inconsistent design, or simply code written with everything but testability in mind. However, in the majority of cases, the problem is much simpler and is spelled dependencies. Different ...

Get Developer Testing: Building Quality into Software now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.