<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Mocking Extension Methods</title>
	<atom:link href="http://www.elilopian.com/2007/10/12/mocking-extension-methods/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.elilopian.com/2007/10/12/mocking-extension-methods/</link>
	<description>Creating better software</description>
	<lastBuildDate>Mon, 02 Jan 2012 09:09:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Eli Lopian</title>
		<link>http://www.elilopian.com/2007/10/12/mocking-extension-methods/comment-page-1/#comment-32238</link>
		<dc:creator>Eli Lopian</dc:creator>
		<pubDate>Mon, 09 Feb 2009 20:15:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.elilopian.com/2007/10/12/mocking-extension-methods/#comment-32238</guid>
		<description>I don&#039;t follow your logic Peter,
There is a huge difference between good design and functionality that you need to isolate.

example - suppose we have an extension method on DateTime that returns IsLeapYear.

This is good design as the code is readable sleek and maintainable, we can now use: 
time.IsLeapYear()
instead of Utils.IsLeapYear(time)

Now, there is a HUGE CASE for isolating this code - when we want to simulate a LeapYear. 

Also see http://www.elilopian.com/2008/04/29/understanding-mock-objects-better-design/</description>
		<content:encoded><![CDATA[<p>I don&#8217;t follow your logic Peter,<br />
There is a huge difference between good design and functionality that you need to isolate.</p>
<p>example &#8211; suppose we have an extension method on DateTime that returns IsLeapYear.</p>
<p>This is good design as the code is readable sleek and maintainable, we can now use:<br />
time.IsLeapYear()<br />
instead of Utils.IsLeapYear(time)</p>
<p>Now, there is a HUGE CASE for isolating this code &#8211; when we want to simulate a LeapYear. </p>
<p>Also see <a href="http://www.elilopian.com/2008/04/29/understanding-mock-objects-better-design/" rel="nofollow">http://www.elilopian.com/2008/04/29/understanding-mock-objects-better-design/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Morris</title>
		<link>http://www.elilopian.com/2007/10/12/mocking-extension-methods/comment-page-1/#comment-32234</link>
		<dc:creator>Peter Morris</dc:creator>
		<pubDate>Mon, 09 Feb 2009 17:33:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.elilopian.com/2007/10/12/mocking-extension-methods/#comment-32234</guid>
		<description>It&#039;s clever that you can do this, but I think anyone who feels they need it should reconsider their design.

Test an extension method directly, sure, but if the functionality is so significant as to warrant mocking then it should be a dependency and not an extension.</description>
		<content:encoded><![CDATA[<p>It&#8217;s clever that you can do this, but I think anyone who feels they need it should reconsider their design.</p>
<p>Test an extension method directly, sure, but if the functionality is so significant as to warrant mocking then it should be a dependency and not an extension.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

