Chapter 5. Class Testing Basics

In this chapter we describe how to test a single class. The techniques we describe in this chapter will be applied in later chapters when we discuss testing object interactions and testing classes in an inheritance hierarchy. For this discussion, we assume the code for a class has been written and needs to be tested. Our primary focus is on classes whose instances do not collaborate extensively with any other instance. We will use the Velocity and PuckSupply classes ...

Get A Practical Guide to Testing Object-Oriented Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.