<?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: Which Mock to Mock with? JMock? RMock? EasyMock?</title>
	<atom:link href="http://agilepainrelief.com/notesfromatooluser/2007/07/which-mock-to-m.html/feed" rel="self" type="application/rss+xml" />
	<link>http://agilepainrelief.com/notesfromatooluser/2007/07/which-mock-to-m.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=which-mock-to-m</link>
	<description>Best practices for your goals</description>
	<lastBuildDate>Wed, 09 May 2012 22:13:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Ingo</title>
		<link>http://agilepainrelief.com/notesfromatooluser/2007/07/which-mock-to-m.html/comment-page-1#comment-255</link>
		<dc:creator>Ingo</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://agilepainrelief.com/2007/07/which-mock-to-m/#comment-255</guid>
		<description>I stood in front of the same decision recently and couldn&#039;t find much in form of good comparisons on the net.
I choose EasyMock at the end and am very happy. Especially the addition of the class extensions is great as it allows you to not only mock interfaces but classes as well.
</description>
		<content:encoded><![CDATA[<p>I stood in front of the same decision recently and couldn&#8217;t find much in form of good comparisons on the net.<br />
I choose EasyMock at the end and am very happy. Especially the addition of the class extensions is great as it allows you to not only mock interfaces but classes as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WarpedJavaGuy</title>
		<link>http://agilepainrelief.com/notesfromatooluser/2007/07/which-mock-to-m.html/comment-page-1#comment-256</link>
		<dc:creator>WarpedJavaGuy</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://agilepainrelief.com/2007/07/which-mock-to-m/#comment-256</guid>
		<description>I had the same problem about a year back and found this beaty:
http://www.xprogramming.com/xpmag/virtualMockObjects.htm

It allowed me to test my code &#039;as is&#039; without defining any mock interfaces (only mock data).  It was the one time I ever used aspects and it worked for me :)
Check it out!

</description>
		<content:encoded><![CDATA[<p>I had the same problem about a year back and found this beaty:<br />
<a href="http://www.xprogramming.com/xpmag/virtualMockObjects.htm" rel="nofollow">http://www.xprogramming.com/xpmag/virtualMockObjects.htm</a></p>
<p>It allowed me to test my code &#8216;as is&#8217; without defining any mock interfaces (only mock data).  It was the one time I ever used aspects and it worked for me :)<br />
Check it out!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Soren</title>
		<link>http://agilepainrelief.com/notesfromatooluser/2007/07/which-mock-to-m.html/comment-page-1#comment-257</link>
		<dc:creator>Soren</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://agilepainrelief.com/2007/07/which-mock-to-m/#comment-257</guid>
		<description>I am also using EasyMock (the 1.5 enabled version) with great pleasure. Usually I write my tests small enough, so its hard to get confused by the setup, run and verify states (&quot;modes&quot; as you call them) - stateful programming is not a new concept and should be familiar to most whether they like it or not ;-)

It sounds like I should give JMock a try again though, I didn&#039;t try it since the 1.4 version and I had the same annoyances like you with the limited set of operations available. (and the string references to methods ofcause, but that was common those days).

Cheers,
Soren
</description>
		<content:encoded><![CDATA[<p>I am also using EasyMock (the 1.5 enabled version) with great pleasure. Usually I write my tests small enough, so its hard to get confused by the setup, run and verify states (&#8220;modes&#8221; as you call them) &#8211; stateful programming is not a new concept and should be familiar to most whether they like it or not ;-)</p>
<p>It sounds like I should give JMock a try again though, I didn&#8217;t try it since the 1.4 version and I had the same annoyances like you with the limited set of operations available. (and the string references to methods ofcause, but that was common those days).</p>
<p>Cheers,<br />
Soren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nat</title>
		<link>http://agilepainrelief.com/notesfromatooluser/2007/07/which-mock-to-m.html/comment-page-1#comment-258</link>
		<dc:creator>Nat</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://agilepainrelief.com/2007/07/which-mock-to-m/#comment-258</guid>
		<description>To allow a method to be called any number of times (or zero) you can do:

mock.stubs().method(&quot;foo&quot;)...

or mock.expects(atLeast(0)).method(&quot;foo&quot;)...


The jMock CGLib extension lets you mock abstract classes.

But yes, jMock 2 is better.
</description>
		<content:encoded><![CDATA[<p>To allow a method to be called any number of times (or zero) you can do:</p>
<p>mock.stubs().method(&#8220;foo&#8221;)&#8230;</p>
<p>or mock.expects(atLeast(0)).method(&#8220;foo&#8221;)&#8230;</p>
<p>The jMock CGLib extension lets you mock abstract classes.</p>
<p>But yes, jMock 2 is better.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian Robinson</title>
		<link>http://agilepainrelief.com/notesfromatooluser/2007/07/which-mock-to-m.html/comment-page-1#comment-259</link>
		<dc:creator>Ian Robinson</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://agilepainrelief.com/2007/07/which-mock-to-m/#comment-259</guid>
		<description>I haven&#039;t used RMock or EasyMock in anger, but have grown to really like JMock; despite all its faults. It had been adopted already by a project I joined mid-way through, but at that point not really used extensively. Now I hardly write a line of code that isn&#039;t exercised by it.

Admittedly, the string based approach is a real limitation when refactoring.

Just a couple of points to help with your annoyances...

I&#039;m not sure why you would want to set up an expectation for something you don&#039;t care about, but you can specify an exact number of invocations with exactly(expectedCount).

You can mock Classes with JMock using CGLIB.
See http://www.jmock.org/jmock1-cglib.html

Cheers,
Ian
</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t used RMock or EasyMock in anger, but have grown to really like JMock; despite all its faults. It had been adopted already by a project I joined mid-way through, but at that point not really used extensively. Now I hardly write a line of code that isn&#8217;t exercised by it.</p>
<p>Admittedly, the string based approach is a real limitation when refactoring.</p>
<p>Just a couple of points to help with your annoyances&#8230;</p>
<p>I&#8217;m not sure why you would want to set up an expectation for something you don&#8217;t care about, but you can specify an exact number of invocations with exactly(expectedCount).</p>
<p>You can mock Classes with JMock using CGLIB.<br />
See <a href="http://www.jmock.org/jmock1-cglib.html" rel="nofollow">http://www.jmock.org/jmock1-cglib.html</a></p>
<p>Cheers,<br />
Ian</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gwyn Evans</title>
		<link>http://agilepainrelief.com/notesfromatooluser/2007/07/which-mock-to-m.html/comment-page-1#comment-260</link>
		<dc:creator>Gwyn Evans</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://agilepainrelief.com/2007/07/which-mock-to-m/#comment-260</guid>
		<description>I&#039;ve tried both JMock and EasyMock but ended up going back to EasyMock (1.2, as I&#039;m also restricted to JDK 1.4 at the moment).

I found that in most tests there was a setup phase, then a point to set the mocks to replay, an invocation of the class under test and then a verification of the mocks.  Even where I needed one mock for use in another, the replay needing to be done &#039;early&#039; wasn&#039;t an issue, and on the upsite, I had the advantage of the full IDE support when coding the calls to the mocks.

Note they both let you mock classes, if you need to, and both let you set varying criteria for matching calls, arguments, etc.
</description>
		<content:encoded><![CDATA[<p>I&#8217;ve tried both JMock and EasyMock but ended up going back to EasyMock (1.2, as I&#8217;m also restricted to JDK 1.4 at the moment).</p>
<p>I found that in most tests there was a setup phase, then a point to set the mocks to replay, an invocation of the class under test and then a verification of the mocks.  Even where I needed one mock for use in another, the replay needing to be done &#8216;early&#8217; wasn&#8217;t an issue, and on the upsite, I had the advantage of the full IDE support when coding the calls to the mocks.</p>
<p>Note they both let you mock classes, if you need to, and both let you set varying criteria for matching calls, arguments, etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Someone</title>
		<link>http://agilepainrelief.com/notesfromatooluser/2007/07/which-mock-to-m.html/comment-page-1#comment-261</link>
		<dc:creator>Someone</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://agilepainrelief.com/2007/07/which-mock-to-m/#comment-261</guid>
		<description>LaughingPanda Mocked! Nice &amp; simple.

http://www.laughingpanda.org/mediawiki/index.php/Mocked

</description>
		<content:encoded><![CDATA[<p>LaughingPanda Mocked! Nice &#038; simple.</p>
<p><a href="http://www.laughingpanda.org/mediawiki/index.php/Mocked" rel="nofollow">http://www.laughingpanda.org/mediawiki/index.php/Mocked</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thiago D</title>
		<link>http://agilepainrelief.com/notesfromatooluser/2007/07/which-mock-to-m.html/comment-page-1#comment-262</link>
		<dc:creator>Thiago D</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://agilepainrelief.com/2007/07/which-mock-to-m/#comment-262</guid>
		<description>Good post. Take a look at this when possible: &lt;a href=&quot;http://www.aqris.com/display/A/EasyMock+1.2+Wrapper&quot; rel=&quot;nofollow&quot;&gt;http://www.aqris.com/display/A/EasyMock+1.2+Wrapper&lt;/a&gt;

Cheers,

Thiago
</description>
		<content:encoded><![CDATA[<p>Good post. Take a look at this when possible: <a href="http://www.aqris.com/display/A/EasyMock+1.2+Wrapper" rel="nofollow">http://www.aqris.com/display/A/EasyMock+1.2+Wrapper</a></p>
<p>Cheers,</p>
<p>Thiago</p>
]]></content:encoded>
	</item>
</channel>
</rss>

