Skip to Content
Unit Testing Principles, Practices, and Patterns
book

Unit Testing Principles, Practices, and Patterns

by Vladimir Khorikov
January 2020
Intermediate to advanced
304 pages
9h 8m
English
Manning Publications
Content preview from Unit Testing Principles, Practices, and Patterns

Chapter 7. Refactoring toward valuable unit tests

This chapter covers

  • Recognizing the four types of code
  • Understanding the Humble Object pattern
  • Writing valuable tests

In chapter 1, I defined the properties of a good unit test suite:

  • It is integrated into the development cycle.
  • It targets only the most important parts of your code base.
  • It provides maximum value with minimum maintenance costs. To achieve this last attribute, you need to be able to:
    • Recognize a valuable test (and, by extension, a test of low value).
    • Write a valuable test.

Chapter 4 covered the topic of recognizing a valuable test using the four attributes: protection against regressions, resistance to refactoring, fast feedback, and maintainability. And chapter 5 expanded ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Unit Testing Principles, Practices, and Patterns

Unit Testing Principles, Practices, and Patterns

Vladimir Khorikov
Design Patterns: Elements of Reusable Object-Oriented Software

Design Patterns: Elements of Reusable Object-Oriented Software

Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides

Publisher Resources

ISBN: 9781617296277Publisher SupportOtherPublisher WebsiteSupplemental ContentErrata PagePurchase Link