Open Source Development Tutorials | About Us
Search  

Go Back   Open Source Tutorials Forum > Tutorials And Articles > Server Side Coding Tutorials
User Name
Password
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-18-2004, 09:32 AM
md_doc md_doc is offline
ubergeek
 
Join Date: Oct 2003
Posts: 266 md_doc has disabled reputation
Post Unit testing with mock objects

Mock objects are a useful way to write unit tests for objects that act as mediators. Instead of calling the real domain objects, the tested object calls a mock domain object that merely asserts that the correct methods were called, with the expected parameters, in the correct order. However, when the tested object must create the domain object, we are faced with a problem. How does the tested object know to create a mock domain object instead of the true domain object? In this article, software consultants Alexander Day Chaffee and William Pietri present a refactoring technique to create mock objects based on the factory method design pattern. Read Unit testing with mock objects here.
__________________
md
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



All times are GMT -5. The time now is 09:11 AM.


Powered by: vBulletin Version 3.0.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright 2004 - 2006 GrindingGears.com. All Rights Reserved.