tag:blogger.com,1999:blog-12390229.post3211218943319858534..comments2012-05-18T19:55:02.000-07:00Comments on John Hann: Unit Testing With Mock Objects - Slides and Sample CodeJohn Hannhttp://www.blogger.com/profile/10469674279015637491noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-12390229.post-29565738478455028622007-11-01T10:50:00.000-07:002007-11-01T10:50:00.000-07:00Hey John,I am glad to find your page.It has a lot ...Hey John,<BR/>I am glad to find your page.<BR/>It has a lot of good information on Mock Objects.<BR/>I created a page with some good examples on Mock Objects. Check it out at: http://www.mocksamples.org/<BR/>Cheers,Paulo Carolihttps://www.blogger.com/profile/04671101950306451245noreply@blogger.comtag:blogger.com,1999:blog-12390229.post-64503443586437542882007-05-02T12:14:00.000-07:002007-05-02T12:14:00.000-07:00First off, thanks! If you happen to live in the Po...First off, thanks! If you happen to live in the Portland area, I'll be giving the same talk at <A HREF="http://pdx.techevents.info/codecamp/3/default.aspx" REL="nofollow">Code Camp</A> this year. With regard to the design benefits of TDD with mocks, I think that the prospect of refactoring an architecture to enable mocks is a negative for some people. I fall into the YAGNI camp when it comes to design, and I think there is a cost to making uber-pluggable code with interfaces for everything or dependency injection frameworks. If you weren't building this into your application to begin with, you probably don't need it.<BR/><BR/>When recommending the usage of mock objects to test a particular class, I've had the most success by explaining that the test will no longer have to go to the database, web service, credit card gateway, etc. that the class is depends on. This is usually the pain point that drives a developer to consider mock-based testing at all. If the external dependencies aren't cumbersome, it's usually easier to simply use the external entity. The code may not be as flexible, but that may not matter for that particular application.<BR/><BR/>What specific design benefits do you see coming from a TDD with mocks approach to development?John Hannhttps://www.blogger.com/profile/10469674279015637491noreply@blogger.comtag:blogger.com,1999:blog-12390229.post-17190248636633753272007-05-02T09:30:00.000-07:002007-05-02T09:30:00.000-07:00It looks like a good presentation from the slides ...It looks like a good presentation from the slides -- nice images. One thing you might want to think more about, though, is the effect that TDD with mocks has on your design. That's our main interest, rather than avoiding external infrastructure.Steve Freemanhttps://www.blogger.com/profile/14771999065792016571noreply@blogger.comtag:blogger.com,1999:blog-12390229.post-6997494087351848252007-04-26T10:31:00.000-07:002007-04-26T10:31:00.000-07:00Hey Man, I wish I could have been there. I hope ev...Hey Man, <BR/>I wish I could have been there. I hope everything went well. I'll check out your info. Sounds like really cool stuff. <BR/><BR/>JasonUnknownhttps://www.blogger.com/profile/17711485614678690470noreply@blogger.com