March 2015
Intermediate to advanced
236 pages
5h 26m
English
In this chapter you learned the important technique of introducing stubs and mocks to emulate behavior of dependent objects. Your tests don’t have to interact with live services, files, databases, and other troublesome dependencies! You also learned how to use a tool to simplify your effort in creating and injecting mocks.
You’ve focused on making sure the production code is clean and well-designed in this and the prior two chapters. Doing so will extend the life of your system. However, the bigger design picture isn’t complete without also continually refactoring your tests. You’ll focus on some test cleanup in the next chapter.
| [36] |
Read now
Unlock full access