Implementations
Almost by definition, you will not be able to test all of an implementation through its interface. All but the simplest of implementations will require nontrivial code to bring the interface’s behavior to life. In other instances, an interface only represents a single role of an implementation class. Sometimes a class will implement multiple interfaces in this way.
You are less likely to encounter this phenomenon in functional or procedural languages in which the code under test has a single purpose. However, if you take a feature-based, rather than function- or method-based, approach to your testing, you may find the need to invoke multiple functions to test the feature, not all of which are part of a published interface.
Using ...
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.
Read now
Unlock full access