﻿<?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>Matt Ellis commented on Would I add static mocking to Rhino Mocks?</title><description>An alternative is to use the Duck Typing project mentioned by Phil Haack in this post:
  
  
http://haacked.com/archive/2007/08/19/why-duck-typing-matters-to-c-developers.aspx
  
  
and used in this one:
  
  
http://haacked.com/archive/2007/09/09/ihttpcontext-and-other-interfaces-for-your-duck-typing-benefit.aspx
  
  
More a way of restructuring your code to avoid the tight coupling to static classes than to be able to test these static classes, admittedly, but distribution (or even just support) from a mocking framework would certainly raise its visibility.
  
  
Cheers
  
Matt
  
</description><link>http://ayende.com/3325/would-i-add-static-mocking-to-rhino-mocks#comment5</link><guid>http://ayende.com/3325/would-i-add-static-mocking-to-rhino-mocks#comment5</guid><pubDate>Wed, 21 May 2008 09:21:33 GMT</pubDate></item><item><title>Steve Bohlen commented on Would I add static mocking to Rhino Mocks?</title><description>I don't find your two positions so much inconsisntent as non-dogmatic :)
  
  
It rather seems to me that so long as the feature being offered as a patch to RhinoMocks is *about Mocking* :D there should be little debate about its inclusion (so long as its good code, offers something others need/want, and doesn't introduce 'breaking changes' that would discourage others).
  
  
This feature seems to me a logical addition to the library; its really in the same vein as the 'I hate typemock' debate that always flares because typemock supports testing 'bad designs'.
  
  
To me, that entire line of thought is a complete non-sequitor; Visual Studio supports my dragging datatables from the server explorer into the dataset designer to create an 'instant' data-access-layer' thru a bunch of wizards -- there isn't a developer worth his salt (outside of Redmond perhaps) that thinks this is a good feature to use, but its inclusion in VS doesn't make me decide 'VS is evil, I won't use any of it'.
  
  
Instead, I wisely stay away from that feature since using it is going to cause me (significant) future pain in my work.  Tools almost always contain aspects that one or more users will consider to be 'bad' or otherwise to be avoided but its a logical fallacy to assume that the mere presence of a feature in a tool means that I have to use it all the time...sometimes that feature is there so that the one time out of 100 that I truely DO need it, its there for me.
  
  
Nothing inconsistent about your position at all from my perspective.
</description><link>http://ayende.com/3325/would-i-add-static-mocking-to-rhino-mocks#comment4</link><guid>http://ayende.com/3325/would-i-add-static-mocking-to-rhino-mocks#comment4</guid><pubDate>Tue, 20 May 2008 11:20:44 GMT</pubDate></item><item><title>SeeR commented on Would I add static mocking to Rhino Mocks?</title><description>Which allows you to test statics in an easy way.
  
"layer of indirection" - Is this not what Dependency Injection is for ?
</description><link>http://ayende.com/3325/would-i-add-static-mocking-to-rhino-mocks#comment3</link><guid>http://ayende.com/3325/would-i-add-static-mocking-to-rhino-mocks#comment3</guid><pubDate>Tue, 20 May 2008 10:25:36 GMT</pubDate></item><item><title>Ayende Rahien commented on Would I add static mocking to Rhino Mocks?</title><description>This is still just adding a layer of indirection
</description><link>http://ayende.com/3325/would-i-add-static-mocking-to-rhino-mocks#comment2</link><guid>http://ayende.com/3325/would-i-add-static-mocking-to-rhino-mocks#comment2</guid><pubDate>Tue, 20 May 2008 06:50:54 GMT</pubDate></item><item><title>SeeR commented on Would I add static mocking to Rhino Mocks?</title><description>Or you can use Delegates and don't add any functionality to RhinoMocks. See my post about it
  
http://seermindflow.blogspot.com/2008/05/how-to-test-static-method-call-in-c.html
</description><link>http://ayende.com/3325/would-i-add-static-mocking-to-rhino-mocks#comment1</link><guid>http://ayende.com/3325/would-i-add-static-mocking-to-rhino-mocks#comment1</guid><pubDate>Mon, 19 May 2008 23:43:40 GMT</pubDate></item></channel></rss>