What Happens When…

What happens when there is a single standalone class.

A need arises for a second, slightly difference class. A base class is created. Both classes now inherit from the base. All is in harmony.

In testing it is discovered that some of the internal functionality of the base class is need to test the two implementations. How do you handle this? Expose the internal method as public? Move the internal method off to another class and make it public static? How about a re-implementing it?

image reference

Leave A Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>