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 ...
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