<?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 dilemma</title>
	<atom:link href="http://davybrion.com/blog/2008/07/mocking-dilemma/feed/" rel="self" type="application/rss+xml" />
	<link>http://davybrion.com/blog/2008/07/mocking-dilemma/</link>
	<description>Trying to walk that thin line between intelligence and ignorance</description>
	<lastBuildDate>Thu, 11 Mar 2010 20:14:47 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: HardTime</title>
		<link>http://davybrion.com/blog/2008/07/mocking-dilemma/comment-page-1/#comment-892</link>
		<dc:creator>HardTime</dc:creator>
		<pubDate>Sun, 27 Jul 2008 00:44:54 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=187#comment-892</guid>
		<description>Puclic or protected, I still think this is a hack... and one I&#039;ve used myself I must admit. The original xUnit thing was derived from the idea of self-testing-classes (way back in the C days, Erich Gamma and the likes, ... and SmallTalk admittedly, all the other industry-influencing people like mr. Kaye, and mr. Kent and so on ). A class would contain its own test method that would handle all the unit-testing. In order to seperate test compilation with production compilation one could either use some ugly preprocessor directive or use the &#039;white box&#039; testing approach (mainly through inheritance). Neither option appeals to me. I don&#039;t want to declare anything as protected just for testing purposes, when in production code it should be private. These days most of the times there&#039;s an other way, the dependancy injection pattern solves some of these issues, but not all of them. 
Again, I must say that I have used this hack as a get out of a pickle situation more than on one occasion. A dillema indeed...</description>
		<content:encoded><![CDATA[<p>Puclic or protected, I still think this is a hack&#8230; and one I&#8217;ve used myself I must admit. The original xUnit thing was derived from the idea of self-testing-classes (way back in the C days, Erich Gamma and the likes, &#8230; and SmallTalk admittedly, all the other industry-influencing people like mr. Kaye, and mr. Kent and so on ). A class would contain its own test method that would handle all the unit-testing. In order to seperate test compilation with production compilation one could either use some ugly preprocessor directive or use the &#8216;white box&#8217; testing approach (mainly through inheritance). Neither option appeals to me. I don&#8217;t want to declare anything as protected just for testing purposes, when in production code it should be private. These days most of the times there&#8217;s an other way, the dependancy injection pattern solves some of these issues, but not all of them.<br />
Again, I must say that I have used this hack as a get out of a pickle situation more than on one occasion. A dillema indeed&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reflective Perspective - Chris Alcock &#187; The Morning Brew #141</title>
		<link>http://davybrion.com/blog/2008/07/mocking-dilemma/comment-page-1/#comment-822</link>
		<dc:creator>Reflective Perspective - Chris Alcock &#187; The Morning Brew #141</dc:creator>
		<pubDate>Tue, 22 Jul 2008 07:17:35 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=187#comment-822</guid>
		<description>[...] Mocking dilemma - Davy Brion poses a question about mocking a particular abstract class and method set up - some interesting comments. [...]</description>
		<content:encoded><![CDATA[<p>[...] Mocking dilemma &#8211; Davy Brion poses a question about mocking a particular abstract class and method set up &#8211; some interesting comments. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Inquisitive Coder - Davy Brion&#8217;s Blog &#187; Blog Archive &#187; Mocking Dilemma, Solved!</title>
		<link>http://davybrion.com/blog/2008/07/mocking-dilemma/comment-page-1/#comment-815</link>
		<dc:creator>The Inquisitive Coder - Davy Brion&#8217;s Blog &#187; Blog Archive &#187; Mocking Dilemma, Solved!</dc:creator>
		<pubDate>Mon, 21 Jul 2008 18:22:25 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=187#comment-815</guid>
		<description>[...] Mocking dilemma [...]</description>
		<content:encoded><![CDATA[<p>[...] Mocking dilemma [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2008/07/mocking-dilemma/comment-page-1/#comment-814</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Mon, 21 Jul 2008 18:01:55 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=187#comment-814</guid>
		<description>see Tom, this is exactly why i&#039;ve been telling you to start blogging already! :)

i really like this approach and it works great, thx :)</description>
		<content:encoded><![CDATA[<p>see Tom, this is exactly why i&#8217;ve been telling you to start blogging already! <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>i really like this approach and it works great, thx <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://davybrion.com/blog/2008/07/mocking-dilemma/comment-page-1/#comment-813</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Mon, 21 Jul 2008 17:54:25 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=187#comment-813</guid>
		<description>As an alternative to creating an inherited class to set some flags when the method is called, how about extending the abstract class &#039;MyAbstractClass&#039; with another abstract class &#039;MyAbstractTestClass&#039; inside the test project, and then write the actual TestFixture inside &#039;MyAbstractTestClass&#039; as an inner class.

By using another abstract class you don&#039;t have to implement anything while you can still access the &#039;DoSomethingSpecific()&#039; method, because your test is inside an inner class of &#039;MyAbstractTestClass&#039;...

&lt;code&gt;
public abstract class MyAbstractTestClass : MyAbstractClass
{        
    [TestFixture]
    public class InnerTestClass 
    {
        [Test]
        public void CallsProtectedAbstractMethod()
        {
            var mocks = new MockRepository();
            var myObject = mocks.DynamicMock();

            myObject.Expect(m =&gt; m.DoSomethingSpecific());

            mocks.ReplayAll();

            myObject.DoSomethingInteresting();
            myObject.VerifyAllExpectations();
        }            
    }       
}
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>As an alternative to creating an inherited class to set some flags when the method is called, how about extending the abstract class &#8216;MyAbstractClass&#8217; with another abstract class &#8216;MyAbstractTestClass&#8217; inside the test project, and then write the actual TestFixture inside &#8216;MyAbstractTestClass&#8217; as an inner class.</p>
<p>By using another abstract class you don&#8217;t have to implement anything while you can still access the &#8216;DoSomethingSpecific()&#8217; method, because your test is inside an inner class of &#8216;MyAbstractTestClass&#8217;&#8230;</p>
<p><code><br />
public abstract class MyAbstractTestClass : MyAbstractClass<br />
{<br />
    [TestFixture]<br />
    public class InnerTestClass<br />
    {<br />
        [Test]<br />
        public void CallsProtectedAbstractMethod()<br />
        {<br />
            var mocks = new MockRepository();<br />
            var myObject = mocks.DynamicMock();</p>
<p>            myObject.Expect(m =&gt; m.DoSomethingSpecific());</p>
<p>            mocks.ReplayAll();</p>
<p>            myObject.DoSomethingInteresting();<br />
            myObject.VerifyAllExpectations();<br />
        }<br />
    }<br />
}<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dew Drop - July 21, 2008 &#124; Alvin Ashcraft's Morning Dew</title>
		<link>http://davybrion.com/blog/2008/07/mocking-dilemma/comment-page-1/#comment-809</link>
		<dc:creator>Dew Drop - July 21, 2008 &#124; Alvin Ashcraft's Morning Dew</dc:creator>
		<pubDate>Mon, 21 Jul 2008 12:04:11 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=187#comment-809</guid>
		<description>[...] Mocking Dilemma (Davy Brion) [...]</description>
		<content:encoded><![CDATA[<p>[...] Mocking Dilemma (Davy Brion) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: den Ben</title>
		<link>http://davybrion.com/blog/2008/07/mocking-dilemma/comment-page-1/#comment-808</link>
		<dc:creator>den Ben</dc:creator>
		<pubDate>Mon, 21 Jul 2008 11:21:26 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=187#comment-808</guid>
		<description>Yeah... got a bit carried away there (just shows that I have no mocking xp at all...).  Getting that to work would probably mean hacking even further.

Maybe an Expect method that takes a string and an isolation level as input would be a more feasible track for this type of scenario.

&lt;code&gt;
myObject.Expect(&quot;DoSomethingSpecific&quot;, MethodIsolation.Protected);
&lt;/code&gt;

Upside is the compiler doesn&#039;t need to know about it at all and DoSomething can stay abstract and protected.  Downside is that you&#039;d have to work with string literals.</description>
		<content:encoded><![CDATA[<p>Yeah&#8230; got a bit carried away there (just shows that I have no mocking xp at all&#8230;).  Getting that to work would probably mean hacking even further.</p>
<p>Maybe an Expect method that takes a string and an isolation level as input would be a more feasible track for this type of scenario.</p>
<p><code><br />
myObject.Expect("DoSomethingSpecific", MethodIsolation.Protected);<br />
</code></p>
<p>Upside is the compiler doesn&#8217;t need to know about it at all and DoSomething can stay abstract and protected.  Downside is that you&#8217;d have to work with string literals.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2008/07/mocking-dilemma/comment-page-1/#comment-806</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Mon, 21 Jul 2008 11:02:47 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=187#comment-806</guid>
		<description>it&#039;s a hack... but i like this one :)

still not sure if you could get that to work though... it changes the public interface of the type being mocked, so you have to get the compiler to recognize the modified interface as well.  And since the type is generated at runtime, it&#039;s probably gonna be hard to get the new interface to be recognized at compile time :)</description>
		<content:encoded><![CDATA[<p>it&#8217;s a hack&#8230; but i like this one <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>still not sure if you could get that to work though&#8230; it changes the public interface of the type being mocked, so you have to get the compiler to recognize the modified interface as well.  And since the type is generated at runtime, it&#8217;s probably gonna be hard to get the new interface to be recognized at compile time <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: den Ben</title>
		<link>http://davybrion.com/blog/2008/07/mocking-dilemma/comment-page-1/#comment-804</link>
		<dc:creator>den Ben</dc:creator>
		<pubDate>Mon, 21 Jul 2008 10:59:57 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=187#comment-804</guid>
		<description>I remember an ancient programming language in which that was a possibility (the language starts with a D... :p)

Ofcourse, the mocking framework could add a postfix to those methods (e.g. DoSomethingSpecific_()) but that would mean an extra &#039;convention&#039;.  Maybe the the MethodBinding could provide some flags/insights into how the framework pre-/postfixes the protected methods. So you can expose that &#039;convention&#039; into your code making it a bit clearer... for example:

&lt;code&gt;
var mockMethodBinding = mocks.ProtectedToPublicBinding();
mockMethodBinding.ProtectedMethodNames.PostFix = &#039;_protected&#039;;
var myObject = mocks.DynamicMock(mockMethodBinding);
myObject.Expect(m =&gt; m.DoSomethingSpecific_protected());
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>I remember an ancient programming language in which that was a possibility (the language starts with a D&#8230; :p)</p>
<p>Ofcourse, the mocking framework could add a postfix to those methods (e.g. DoSomethingSpecific_()) but that would mean an extra &#8216;convention&#8217;.  Maybe the the MethodBinding could provide some flags/insights into how the framework pre-/postfixes the protected methods. So you can expose that &#8216;convention&#8217; into your code making it a bit clearer&#8230; for example:</p>
<p><code><br />
var mockMethodBinding = mocks.ProtectedToPublicBinding();<br />
mockMethodBinding.ProtectedMethodNames.PostFix = '_protected';<br />
var myObject = mocks.DynamicMock(mockMethodBinding);<br />
myObject.Expect(m =&gt; m.DoSomethingSpecific_protected());<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2008/07/mocking-dilemma/comment-page-1/#comment-803</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Mon, 21 Jul 2008 10:46:31 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=187#comment-803</guid>
		<description>Yeah that would be cool if that worked... I don&#039;t think it can though, derived classes are not allowed to modify the visibility of inherited members, so the generated proxy type by the mocking framework wouldn&#039;t be able to expose those members, unless there are some voodoo tricks which do make it possible :)</description>
		<content:encoded><![CDATA[<p>Yeah that would be cool if that worked&#8230; I don&#8217;t think it can though, derived classes are not allowed to modify the visibility of inherited members, so the generated proxy type by the mocking framework wouldn&#8217;t be able to expose those members, unless there are some voodoo tricks which do make it possible <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: den Ben</title>
		<link>http://davybrion.com/blog/2008/07/mocking-dilemma/comment-page-1/#comment-802</link>
		<dc:creator>den Ben</dc:creator>
		<pubDate>Mon, 21 Jul 2008 10:43:15 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=187#comment-802</guid>
		<description>&lt;q cite=&quot;Davy Brion&quot;&gt;I agree with the first two statements… but writing a derived test class merely for the sake of storing a flag is no better than using a mocking framework IMHO&lt;/q&gt;

I agree.  Neither is &#039;better&#039; but i prefer a dumb flag implementation above altering the isolation level of DoSomethingSpecific().

Maybe something like this would do the trick (doesn&#039;t work, but illustrates the idea):
&lt;code&gt;
var mockMethodBinding = mocks.ProtectedToPublicBinding();
var myObject = mocks.DynamicMock(mockMethodBinding);
myObject.Expect(m =&gt; m.DoSomethingSpecific());
&lt;/code&gt;

This is just a general idea...</description>
		<content:encoded><![CDATA[<p><q cite="Davy Brion">I agree with the first two statements… but writing a derived test class merely for the sake of storing a flag is no better than using a mocking framework IMHO</q></p>
<p>I agree.  Neither is &#8216;better&#8217; but i prefer a dumb flag implementation above altering the isolation level of DoSomethingSpecific().</p>
<p>Maybe something like this would do the trick (doesn&#8217;t work, but illustrates the idea):<br />
<code><br />
var mockMethodBinding = mocks.ProtectedToPublicBinding();<br />
var myObject = mocks.DynamicMock(mockMethodBinding);<br />
myObject.Expect(m =&gt; m.DoSomethingSpecific());<br />
</code></p>
<p>This is just a general idea&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2008/07/mocking-dilemma/comment-page-1/#comment-801</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Mon, 21 Jul 2008 10:09:47 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=187#comment-801</guid>
		<description>I agree with the first two statements... but writing a derived test class merely for the sake of storing a flag is no better than using a mocking framework IMHO. In the case of the Disposable class, you want to test that the abstract method (the one the derived class needs to implement to take care of its clean-up) is correctly fired when &#039;something&#039; happens. In this case, when the object is disposed. To me, that&#039;s a valid test because that is the only purpose of the Disposable class and thus, should be tested no matter how straightforward the implementation is.

This is one of those cases where each possible solution takes less than 5 minutes to implement, yet the discussion of what is the best approach could linger on for a long time ;)</description>
		<content:encoded><![CDATA[<p>I agree with the first two statements&#8230; but writing a derived test class merely for the sake of storing a flag is no better than using a mocking framework IMHO. In the case of the Disposable class, you want to test that the abstract method (the one the derived class needs to implement to take care of its clean-up) is correctly fired when &#8217;something&#8217; happens. In this case, when the object is disposed. To me, that&#8217;s a valid test because that is the only purpose of the Disposable class and thus, should be tested no matter how straightforward the implementation is.</p>
<p>This is one of those cases where each possible solution takes less than 5 minutes to implement, yet the discussion of what is the best approach could linger on for a long time <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: den Ben</title>
		<link>http://davybrion.com/blog/2008/07/mocking-dilemma/comment-page-1/#comment-800</link>
		<dc:creator>den Ben</dc:creator>
		<pubDate>Mon, 21 Jul 2008 10:00:11 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=187#comment-800</guid>
		<description>I think it all depends on what you are trying to accomplish/test.

You want to test &lt;code&gt;DoSomethingSpecific()&lt;/code&gt;? Then isolate it in a seperate class and test that one. (cfr. David)

You want to test a specific implementation of MyAbstractClass? Then use that one in your test (probably will end up in SlowTests ;-)) (cfr. Simone)

You want to test if MyAbstract correctly fires the &lt;code&gt;DoSomethingSpecific()&lt;/code&gt; method (can&#039;t see why you would want to do that in this case but who knows...)? Then write your own flagging implementation and assert on it...</description>
		<content:encoded><![CDATA[<p>I think it all depends on what you are trying to accomplish/test.</p>
<p>You want to test <code>DoSomethingSpecific()</code>? Then isolate it in a seperate class and test that one. (cfr. David)</p>
<p>You want to test a specific implementation of MyAbstractClass? Then use that one in your test (probably will end up in SlowTests <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ) (cfr. Simone)</p>
<p>You want to test if MyAbstract correctly fires the <code>DoSomethingSpecific()</code> method (can&#8217;t see why you would want to do that in this case but who knows&#8230;)? Then write your own flagging implementation and assert on it&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2008/07/mocking-dilemma/comment-page-1/#comment-798</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Mon, 21 Jul 2008 09:09:53 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=187#comment-798</guid>
		<description>Oh and David: don&#039;t worry about gratuitous blog links... good stuff is supposed to be shared :)</description>
		<content:encoded><![CDATA[<p>Oh and David: don&#8217;t worry about gratuitous blog links&#8230; good stuff is supposed to be shared <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2008/07/mocking-dilemma/comment-page-1/#comment-797</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Mon, 21 Jul 2008 09:07:09 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=187#comment-797</guid>
		<description>@David:

that&#039;s a good post :)

@Peter:

i don&#039;t really see how making it a partial method would solve this problem? Multiple derived classes from the abstract class should be possible, and partial methods don&#039;t really help there as far as i know

@Simone:
Good point :)
but what if the base class doesn&#039;t really hold any state to assert on? Let&#039;s use my Disposable class as an example (http://davybrion.com/blog/2008/06/disposing-of-the-idisposable-implementation/). What i really want to cover in a test, is that when someone calls the Dispose method, the protected abstract methods are called properly.  The sole purpose of this class is to provide an easy implementation of the IDisposable pattern... to test that, your test pretty much has to know about the implementation. Now, i could write my own class that inherits from the Disposable class and i can make it set a flag when the abstract method is called and then in the test i could assert on the flag value. But then the test is still coupled to the implemention of the original code, only more indirectly.</description>
		<content:encoded><![CDATA[<p>@David:</p>
<p>that&#8217;s a good post <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>@Peter:</p>
<p>i don&#8217;t really see how making it a partial method would solve this problem? Multiple derived classes from the abstract class should be possible, and partial methods don&#8217;t really help there as far as i know</p>
<p>@Simone:<br />
Good point <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
but what if the base class doesn&#8217;t really hold any state to assert on? Let&#8217;s use my Disposable class as an example (<a href="http://davybrion.com/blog/2008/06/disposing-of-the-idisposable-implementation/" rel="nofollow">http://davybrion.com/blog/2008/06/disposing-of-the-idisposable-implementation/</a>). What i really want to cover in a test, is that when someone calls the Dispose method, the protected abstract methods are called properly.  The sole purpose of this class is to provide an easy implementation of the IDisposable pattern&#8230; to test that, your test pretty much has to know about the implementation. Now, i could write my own class that inherits from the Disposable class and i can make it set a flag when the abstract method is called and then in the test i could assert on the flag value. But then the test is still coupled to the implemention of the original code, only more indirectly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simone Busoli</title>
		<link>http://davybrion.com/blog/2008/07/mocking-dilemma/comment-page-1/#comment-795</link>
		<dc:creator>Simone Busoli</dc:creator>
		<pubDate>Mon, 21 Jul 2008 07:25:04 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=187#comment-795</guid>
		<description>I&#039;m wondering if it&#039;s right to test that protected method. Are you supposed to know what your class does internally? Or should you only care that the final result is what you expect?</description>
		<content:encoded><![CDATA[<p>I&#8217;m wondering if it&#8217;s right to test that protected method. Are you supposed to know what your class does internally? Or should you only care that the final result is what you expect?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://davybrion.com/blog/2008/07/mocking-dilemma/comment-page-1/#comment-794</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Mon, 21 Jul 2008 07:15:05 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=187#comment-794</guid>
		<description>I would drop the abstract keyword and make DoSomethingSpecific a partial method.
Would that not solve your &quot;issue&quot;?</description>
		<content:encoded><![CDATA[<p>I would drop the abstract keyword and make DoSomethingSpecific a partial method.<br />
Would that not solve your &#8220;issue&#8221;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://davybrion.com/blog/2008/07/mocking-dilemma/comment-page-1/#comment-790</link>
		<dc:creator>David</dc:creator>
		<pubDate>Mon, 21 Jul 2008 02:44:25 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=187#comment-790</guid>
		<description>&lt;i&gt;(Warning: last comment contains gratuitous own-blog link. Got into the tinyurl habit from Twitter. :-\)&lt;/i&gt;</description>
		<content:encoded><![CDATA[<p><i>(Warning: last comment contains gratuitous own-blog link. Got into the tinyurl habit from Twitter. :-\)</i></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://davybrion.com/blog/2008/07/mocking-dilemma/comment-page-1/#comment-789</link>
		<dc:creator>David</dc:creator>
		<pubDate>Mon, 21 Jul 2008 02:13:17 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=187#comment-789</guid>
		<description>Yes, funnily enough I deleted the part of my original comment about potential overkill :)

Before I edited it, I was rambling on about how even when it seems over-the-top, generally when I have trouble testing something I find refactoring to avoid the problem pays off in the long run.

More rambling on this topic here: http://tinyurl.com/6avqej :)</description>
		<content:encoded><![CDATA[<p>Yes, funnily enough I deleted the part of my original comment about potential overkill <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Before I edited it, I was rambling on about how even when it seems over-the-top, generally when I have trouble testing something I find refactoring to avoid the problem pays off in the long run.</p>
<p>More rambling on this topic here: <a href="http://tinyurl.com/6avqej" rel="nofollow">http://tinyurl.com/6avqej</a> <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2008/07/mocking-dilemma/comment-page-1/#comment-787</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Sun, 20 Jul 2008 23:49:09 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=187#comment-787</guid>
		<description>I wouldn&#039;t call it a cop out :)
It&#039;s actually an interesting approach and one that probably offers a few more benefits in certain scenario&#039;s, especially when the implementation of the original protected abstract method can get somewhat complex

But if the implementation is more like a one-liner or at least something very simple (yet very important) then this approach feels a bit over-the-top to me :)</description>
		<content:encoded><![CDATA[<p>I wouldn&#8217;t call it a cop out <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
It&#8217;s actually an interesting approach and one that probably offers a few more benefits in certain scenario&#8217;s, especially when the implementation of the original protected abstract method can get somewhat complex</p>
<p>But if the implementation is more like a one-liner or at least something very simple (yet very important) then this approach feels a bit over-the-top to me <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
