Sponsored By Aspose - File Format APIs for .NET

Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more!

Roy Osherove on Testability Design

Roy Osherove has started a great series called Achieving And Recognizing Testable Software Designs that covers a lot of the main design issues and strategies for Test Driven Development.

In particular, he describes marking a method as virtual so you can create a subclass specific for unit testing that overrides the virtual method to remove a dependency on configuration within a unit test.  This is a great strategy in certain situations (legacy code and code that is executed within a loop come to mind) that I don’t think to use often enough. 

I’m going to cover some of the same ground soon in “Jeremy’s Laws of TDD”, but I’d put money on Roy to finish first;)

About Jeremy Miller

Jeremy is the Chief Software Architect at Dovetail Software, the coolest ISV in Austin. Jeremy began his IT career writing "Shadow IT" applications to automate his engineering documentation, then wandered into software development because it looked like more fun. Jeremy is the author of the open source StructureMap tool for Dependency Injection with .Net, StoryTeller for supercharged acceptance testing in .Net, and one of the principal developers behind FubuMVC. Jeremy's thoughts on all things software can be found at The Shade Tree Developer at http://codebetter.com/jeremymiller.
This entry was posted in Test Driven Development. Bookmark the permalink. Follow any comments here with the RSS feed for this post.