Chapter 5. Class Testing Basics
Want to know what to consider when testing a class? See Class Testing.
Want to know how to identify test cases for testing a class? See Constructing Test Cases.
Want to know a good way to implement a test driver for a class? See Constructing a Test Driver.
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.