﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Shawn Neal commented on Where mocking fails</title><description>Hand coded mocks or stubs are also the way to go if you find yourself re-using that particular fake object in multiple tests and/or fixtures.  You could use RhinoMocks in a common setup method, but I often find in these cases there are just too many methods or interactions to warrant mocking in a meaningful manner, especially when Re# will quite quickly produce an implementation of an interface.  Perhaps this is just a code smell?
  
  
I generally find that hand coded fake objects are easier to deal with and understand when you have more than just a few lines of code to setup a mock, like in your example.  After all, not everything is a nail.
</description><link>http://ayende.com/3399/where-mocking-fails#comment1</link><guid>http://ayende.com/3399/where-mocking-fails#comment1</guid><pubDate>Wed, 02 Jul 2008 23:11:55 GMT</pubDate></item></channel></rss>