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

Interfaces

For languages that syntactically support interfaces, the published interfaces are usually the best place to start. In addition to typically being documented, they tend to be the least coupled to other modules. They also have a high degree of stability over time, minimizing the effects of whatever coupling cannot be avoided.

In an object-oriented context, you would use the API published via features like Java’s or C#’s interfaces or in C++ class headers. Procedural or functional languages might use function prototypes and signature declarations. Regardless, using the published API specification—even when testing implementations—helps to constrain your usage to the most stable portion of the specification. Even an unpublished, internal-use ...

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