Testing OO Systems, Part 1

OO tests stimulate an object and observe that object's behavior. The tests do not look at the object's state to judge whether or not the test succeeds, they just look at the object's behavior. When I call dog.expressHappiness(), my test succeeds when I observe that wagTail() is called. I would never look inside the dog at the isHappy field.


May 15, 2012
URL:http://www.drdobbs.com/architecture-and-design/testing-oo-systems-part-1/240000411

Terms of Service | Privacy Statement | Copyright © 2024 UBM Tech, All rights reserved.