Also you should watch out with inheritance. A base class can implement a
method which works fine, and a subclass might *not* overload that
method, it should still probably still be tested. That, or the base
method should be tested well enough to account for variations in
subclasses.
Good point, but I think it's not as simple as that. Many base classes are
abstract and often miss critical functionality, and cannot be instanted
directly, hence they cannot be tested directly either. Examples of this
include AnewtDatabaseConnection (misses the essential DB connectivity code)
and AnewtFormControl (misses rendering code). Only the (concrete) subclass
instances can be tested.