By Topic

Point/Counterpoint

Sign In

Cookies must be enabled to login.After enabling cookies , please use refresh or reload or ctrl+f5 on the browser for the login options.

Formats Non-Member Member
$31 $13
Learn how you can qualify for the best price for this item!
Become an IEEE Member or Subscribe to
IEEE Xplore for exclusive pricing!
close button

puzzle piece

IEEE membership options for an individual and IEEE Xplore subscriptions for an organization offer the most affordable access to essential journal articles, conference papers, standards, eBooks, and eLearning courses.

Learn more about:

IEEE membership

IEEE Xplore subscriptions

3 Author(s)

Test-driven development with mock objects is a technique to support writing truly object-oriented code. What matters in object-oriented programming is what objects do, how each object responds to and affects its environment. Everything else is internal. In our experience, TDD with mock objects, or interaction testing, helps us write flexible, well-structured code composed of objects that are easy to combine because they know as little as possible of the rest of the system's structure and state. It guides us toward focused objects with explicit dependencies, encouraging a "tell, don't ask" programming style that helps encapsulation by passing behavior to state rather than the reverse. The technique focuses the design effort on how objects communicate with each other rather than data storage or static classification hierarchies. Routinely test-driving code with mock objects leads to premature object composition, hard-to-read and fragile code, and lost time

Published in:

Software, IEEE  (Volume:24 ,  Issue: 3 )