September 22, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

Unit Testing with Service Stubs or Mock Types

  • May 19, 2008
  • By Paul Kimmel
  • Send Email »
  • More Articles »

Mock typing to this degree is pretty easy once you figure out the nuts and bolts. I wouldn't use this strategy for everything, but I would use it for services, facades, 3rd party and legacy sub-systems, externally provided parts of your solution, and perhaps code that is going to take a while to make available.

Summary

A huge part of software development is momentum. If you get stuck waiting on code that has been outsourced or rickety old 3rd party or legacy sub-systems, it can kill your momentum. Implement a mock type, code against the mock type, and keep on trucking.

Mock types will facilitate test-driven development, delineations, and dependencies on outsourced parts of your project, and undependable legacy and 3rd party systems.

About the Author

Paul Kimmel is the VB Today columnist for www.codeguru.com and has written several books on object-oriented programming and .NET. Check out his upcoming book LINQ Unleashed for C# due in July 2008. Paul Kimmel is an Application Architect for EDS. You may contact him for technology questions at pkimmel@softconcepts.com.

Lansing is having a free Day of .NET training at Lansing Community College on June 21st. Check out the web site for details. The group likes to think of it as a poor man's TechEd (because it's free), but the content will be excellent.

Copyright © 2008 by Paul T. Kimmel. All Rights Reserved.





Page 4 of 4



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Sitemap | Contact Us

Rocket Fuel