Testing
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 calldog.expressHappiness()
, my test succeeds when I observe that wagTail()
is called. I would never look inside the dog at the isHappy
field.Related Reading
More Insights
INFO-LINK
To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy. | |