官术网_书友最值得收藏!

Chapter 1. Exploring Test Doubles

"I never make stupid mistakes. Only very, very clever ones."

–John Peel

It is very difficult to find stupid mistakes, but it's even more daunting when you are trying to figure out the clever ones. Debugging an application to know how to fix a problem is very expensive and time-consuming. Automated unit tests provide an extremely effective mechanism for catching regressions, especially when combined with test-driven development; it creates a test safety net for the developers.

This chapter covers the concepts of unit testing, quality of unit tests, external dependencies, and test doubles.

The Working with unit tests section introduces you to test automation and describes the characteristics of a good unit test.

The Understanding test doubles section explores the concept of external dependency and provides examples of test doubles. The following test doubles are explored:

  • Dummy objects
  • Stubs
  • Spies
  • Mock objects
  • Fake objects
主站蜘蛛池模板: 敦煌市| 松滋市| 淮滨县| 剑阁县| 龙江县| 邢台县| 安乡县| 山东省| 吐鲁番市| 灵山县| 金山区| 聊城市| 资阳市| 石泉县| 南乐县| 迭部县| 都昌县| 吴堡县| 滦平县| 亚东县| 乐清市| 海盐县| 龙川县| 永福县| 江北区| 靖边县| 马边| 呼伦贝尔市| 叙永县| 鹤峰县| 中江县| 交口县| 桦甸市| 阿克苏市| 永兴县| 吴川市| 茂名市| 瑞金市| 吉木乃县| 建德市| 房产|