<?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: JPA implementation patterns: Testing</title>
	<atom:link href="http://blog.xebia.com/2009/07/11/jpa-implementation-patterns-testing/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.xebia.com/2009/07/11/jpa-implementation-patterns-testing/</link>
	<description></description>
	<lastBuildDate>Thu, 18 Mar 2010 13:27:36 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Gene De Lisa</title>
		<link>http://blog.xebia.com/2009/07/11/jpa-implementation-patterns-testing/comment-page-1/#comment-92318</link>
		<dc:creator>Gene De Lisa</dc:creator>
		<pubDate>Thu, 20 Aug 2009 12:24:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.xebia.com/?p=2528#comment-92318</guid>
		<description>&quot;(Ever tried to refactor 50+ insert statements?).&quot;

Yes. No big deal.
You can write this thing called a &quot;program&quot; to regenerate your insert statements.</description>
		<content:encoded><![CDATA[<p>&#8220;(Ever tried to refactor 50+ insert statements?).&#8221;</p>
<p>Yes. No big deal.<br />
You can write this thing called a &#8220;program&#8221; to regenerate your insert statements.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JPA Implementation Patterns &#171; Fernando Franzini Java Blog</title>
		<link>http://blog.xebia.com/2009/07/11/jpa-implementation-patterns-testing/comment-page-1/#comment-92103</link>
		<dc:creator>JPA Implementation Patterns &#171; Fernando Franzini Java Blog</dc:creator>
		<pubDate>Thu, 16 Jul 2009 12:43:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.xebia.com/?p=2528#comment-92103</guid>
		<description>[...] Testing [...]</description>
		<content:encoded><![CDATA[<p>[...] Testing [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lars Vonk</title>
		<link>http://blog.xebia.com/2009/07/11/jpa-implementation-patterns-testing/comment-page-1/#comment-92065</link>
		<dc:creator>Lars Vonk</dc:creator>
		<pubDate>Sun, 12 Jul 2009 12:26:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.xebia.com/?p=2528#comment-92065</guid>
		<description>Hi Vincent, 

Luckily I have just finished &lt;a href=&quot;http://blog.larsvonkconsultancy.nl/2009/07/tdd-tips/&quot; rel=&quot;nofollow&quot;&gt;a blog with some TDD tips&lt;/a&gt; :-). I think one of the main aspects is that in most applications it does not really matter what storage technology you use. As long as you define your tests in a high level language you can easily change from in-memory to Oracle for instance. The good thing is that whenever you change you have tests that proof your code is still working.

Another tip specifically for inserting test data in the database: Don&#039;t use SQL insert scripts and stay away from tools like DBUnit where you need to define your testdata in XML. Why? Because this really gets in your way when needing to refactor the database. (Ever tried to refactor 50+ insert statements?).
What I recommend is to setup your test data in java objects using Builder and &lt;a href=&quot;http://martinfowler.com/bliki/ObjectMother.html&quot; rel=&quot;nofollow&quot;&gt;ObjectMothers&lt;/a&gt;, then use your dao&#039;s to insert those into the database.</description>
		<content:encoded><![CDATA[<p>Hi Vincent, </p>
<p>Luckily I have just finished <a href="http://blog.larsvonkconsultancy.nl/2009/07/tdd-tips/" rel="nofollow">a blog with some TDD tips</a> <img src='http://blog.xebia.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . I think one of the main aspects is that in most applications it does not really matter what storage technology you use. As long as you define your tests in a high level language you can easily change from in-memory to Oracle for instance. The good thing is that whenever you change you have tests that proof your code is still working.</p>
<p>Another tip specifically for inserting test data in the database: Don&#8217;t use SQL insert scripts and stay away from tools like DBUnit where you need to define your testdata in XML. Why? Because this really gets in your way when needing to refactor the database. (Ever tried to refactor 50+ insert statements?).<br />
What I recommend is to setup your test data in java objects using Builder and <a href="http://martinfowler.com/bliki/ObjectMother.html" rel="nofollow">ObjectMothers</a>, then use your dao&#8217;s to insert those into the database.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
