<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: subclass-and-override vs partial mocking vs refactoring</title>
	<atom:link href="http://monkeyisland.pl/2009/01/13/subclass-and-override-vs-partial-mocking-vs-refactoring/feed/" rel="self" type="application/rss+xml" />
	<link>http://monkeyisland.pl/2009/01/13/subclass-and-override-vs-partial-mocking-vs-refactoring/</link>
	<description>about software</description>
	<lastBuildDate>Fri, 11 May 2012 11:03:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: szczepiq</title>
		<link>http://monkeyisland.pl/2009/01/13/subclass-and-override-vs-partial-mocking-vs-refactoring/#comment-3953</link>
		<dc:creator><![CDATA[szczepiq]]></dc:creator>
		<pubDate>Sat, 10 Mar 2012 22:23:16 +0000</pubDate>
		<guid isPermaLink="false">http://monkeyisland.pl/?p=231#comment-3953</guid>
		<description><![CDATA[I think the less you need to use partial mocks the better and cleaner your design is :)]]></description>
		<content:encoded><![CDATA[<p>I think the less you need to use partial mocks the better and cleaner your design is :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://monkeyisland.pl/2009/01/13/subclass-and-override-vs-partial-mocking-vs-refactoring/#comment-3941</link>
		<dc:creator><![CDATA[Michael]]></dc:creator>
		<pubDate>Thu, 16 Feb 2012 20:25:00 +0000</pubDate>
		<guid isPermaLink="false">http://monkeyisland.pl/?p=231#comment-3941</guid>
		<description><![CDATA[Hi Szczepan.  First of all, thank you so much for giving the world Mockito.  The world is a much better place because of it =)

Would partial mocking, overriding, or refactoring be appropriate for a much simpler situation?  In your example, you needed runTestBody()&#039;s implementation to actually execute some special code for your test.  What if runTestBody() returned a value and all you cared about was that runTestBody() returns some different value for your test?

I would imagine that for a simple situation like this, partial mocking and overriding would create a very dirty feeling and that refactoring would be the correct choice.]]></description>
		<content:encoded><![CDATA[<p>Hi Szczepan.  First of all, thank you so much for giving the world Mockito.  The world is a much better place because of it =)</p>
<p>Would partial mocking, overriding, or refactoring be appropriate for a much simpler situation?  In your example, you needed runTestBody()&#8217;s implementation to actually execute some special code for your test.  What if runTestBody() returned a value and all you cared about was that runTestBody() returns some different value for your test?</p>
<p>I would imagine that for a simple situation like this, partial mocking and overriding would create a very dirty feeling and that refactoring would be the correct choice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: szczepiq</title>
		<link>http://monkeyisland.pl/2009/01/13/subclass-and-override-vs-partial-mocking-vs-refactoring/#comment-3940</link>
		<dc:creator><![CDATA[szczepiq]]></dc:creator>
		<pubDate>Tue, 14 Feb 2012 09:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://monkeyisland.pl/?p=231#comment-3940</guid>
		<description><![CDATA[The mailing list address listed on the http://mockito.org pages.]]></description>
		<content:encoded><![CDATA[<p>The mailing list address listed on the <a href="http://mockito.org" rel="nofollow">http://mockito.org</a> pages.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://monkeyisland.pl/2009/01/13/subclass-and-override-vs-partial-mocking-vs-refactoring/#comment-3918</link>
		<dc:creator><![CDATA[Anonymous]]></dc:creator>
		<pubDate>Wed, 14 Dec 2011 10:43:25 +0000</pubDate>
		<guid isPermaLink="false">http://monkeyisland.pl/?p=231#comment-3918</guid>
		<description><![CDATA[which mailing list you are talking about]]></description>
		<content:encoded><![CDATA[<p>which mailing list you are talking about</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://monkeyisland.pl/2009/01/13/subclass-and-override-vs-partial-mocking-vs-refactoring/#comment-3917</link>
		<dc:creator><![CDATA[Anonymous]]></dc:creator>
		<pubDate>Wed, 14 Dec 2011 10:42:44 +0000</pubDate>
		<guid isPermaLink="false">http://monkeyisland.pl/?p=231#comment-3917</guid>
		<description><![CDATA[i am new to mockito. which mailing list you are talking about]]></description>
		<content:encoded><![CDATA[<p>i am new to mockito. which mailing list you are talking about</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://monkeyisland.pl/2009/01/13/subclass-and-override-vs-partial-mocking-vs-refactoring/#comment-3916</link>
		<dc:creator><![CDATA[Anonymous]]></dc:creator>
		<pubDate>Wed, 14 Dec 2011 09:44:07 +0000</pubDate>
		<guid isPermaLink="false">http://monkeyisland.pl/?p=231#comment-3916</guid>
		<description><![CDATA[when( dynamicRecommendationsManager.getNextAction(bankCustomer,
otherServiceToCust, borrowingLimits, address, custNeed, questionReply)).thenReturn(nba)

in the above code otherServiceToCust and questionReply are list and all others are objects returned from other services which have been stubbed.

I think the problem is with list. is there any way to send NonNull list in stubbing as we do in jMockery framework]]></description>
		<content:encoded><![CDATA[<p>when( dynamicRecommendationsManager.getNextAction(bankCustomer,<br />
otherServiceToCust, borrowingLimits, address, custNeed, questionReply)).thenReturn(nba)</p>
<p>in the above code otherServiceToCust and questionReply are list and all others are objects returned from other services which have been stubbed.</p>
<p>I think the problem is with list. is there any way to send NonNull list in stubbing as we do in jMockery framework</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: szczepiq</title>
		<link>http://monkeyisland.pl/2009/01/13/subclass-and-override-vs-partial-mocking-vs-refactoring/#comment-3915</link>
		<dc:creator><![CDATA[szczepiq]]></dc:creator>
		<pubDate>Wed, 14 Dec 2011 08:20:06 +0000</pubDate>
		<guid isPermaLink="false">http://monkeyisland.pl/?p=231#comment-3915</guid>
		<description><![CDATA[Ping the mailing list with the sample code and the community should give some help. Cheers!]]></description>
		<content:encoded><![CDATA[<p>Ping the mailing list with the sample code and the community should give some help. Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://monkeyisland.pl/2009/01/13/subclass-and-override-vs-partial-mocking-vs-refactoring/#comment-3914</link>
		<dc:creator><![CDATA[Anonymous]]></dc:creator>
		<pubDate>Wed, 14 Dec 2011 07:10:37 +0000</pubDate>
		<guid isPermaLink="false">http://monkeyisland.pl/?p=231#comment-3914</guid>
		<description><![CDATA[I have stubbed mocked class in my test class but I am not getting the expected return. 
will you please tell me Why?]]></description>
		<content:encoded><![CDATA[<p>I have stubbed mocked class in my test class but I am not getting the expected return.<br />
will you please tell me Why?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: szczepiq</title>
		<link>http://monkeyisland.pl/2009/01/13/subclass-and-override-vs-partial-mocking-vs-refactoring/#comment-3656</link>
		<dc:creator><![CDATA[szczepiq]]></dc:creator>
		<pubDate>Thu, 28 Oct 2010 14:24:32 +0000</pubDate>
		<guid isPermaLink="false">http://monkeyisland.pl/?p=231#comment-3656</guid>
		<description><![CDATA[actually, it should be possible to spy on abstract classes. Don&#039;t remember now but it will be something like that : mock(Foo.class, withSettings()...]]></description>
		<content:encoded><![CDATA[<p>actually, it should be possible to spy on abstract classes. Don&#8217;t remember now but it will be something like that : mock(Foo.class, withSettings()&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander Kjeldaas</title>
		<link>http://monkeyisland.pl/2009/01/13/subclass-and-override-vs-partial-mocking-vs-refactoring/#comment-3655</link>
		<dc:creator><![CDATA[Alexander Kjeldaas]]></dc:creator>
		<pubDate>Thu, 28 Oct 2010 04:58:29 +0000</pubDate>
		<guid isPermaLink="false">http://monkeyisland.pl/?p=231#comment-3655</guid>
		<description><![CDATA[This spy(...) syntax doesn&#039;t work if the class you&#039;re testing is abstract and takes a constructor argument.

In that case you can&#039;t create an object for the spy syntax, so I think there&#039;s something wrong/lacking with the Mockito API for this.  There needs to be a way to inject dependencies into an abstract class.]]></description>
		<content:encoded><![CDATA[<p>This spy(&#8230;) syntax doesn&#8217;t work if the class you&#8217;re testing is abstract and takes a constructor argument.</p>
<p>In that case you can&#8217;t create an object for the spy syntax, so I think there&#8217;s something wrong/lacking with the Mockito API for this.  There needs to be a way to inject dependencies into an abstract class.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

