O'Reilly logo

Quality Code: Software Testing Principles, Practices, and Patterns by Stephen Vance

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adjust Visibility

Many of the things we have learned about encapsulation of software designs do not account for testability. We are encouraged to make things private, to provide access through methods, and to wrap behaviors in extra levels of indirection. While most of these heuristics, designs, and patterns suggest best practices and provide useful abstractions, very few account for the means and mechanisms to test them thoroughly.

Take simple procedural decomposition within a class, for example. Breaking an interface method into logical, purposeful submethods involves the creation of private methods according to the guidelines of encapsulation. However, if these submethods are as logical and purposeful as they should be, then they are also ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required