<?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>Software development done right!</description>
	<lastBuildDate>Wed, 08 Feb 2012 14:41:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: blog.smart-java.nl &#187; Blog archief &#187; Running JPA (Hibernate3) and JTA on IBM Websphere 6.1 &#38; 7</title>
		<link>http://blog.xebia.com/2009/07/11/jpa-implementation-patterns-testing/#comment-94760</link>
		<dc:creator>blog.smart-java.nl &#187; Blog archief &#187; Running JPA (Hibernate3) and JTA on IBM Websphere 6.1 &#38; 7</dc:creator>
		<pubDate>Wed, 05 May 2010 20:06:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.xebia.com/?p=2528#comment-94760</guid>
		<description>[...] layer is isn&#8217;t unittested, it&#8217;s integration tested (as explained by yet another Vincent here). As a rule of thumb, we always try to keep the configuration as identical to the deployment [...]</description>
		<content:encoded><![CDATA[<p>[...] layer is isn&#8217;t unittested, it&#8217;s integration tested (as explained by yet another Vincent here). As a rule of thumb, we always try to keep the configuration as identical to the deployment [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vincent Partington</title>
		<link>http://blog.xebia.com/2009/07/11/jpa-implementation-patterns-testing/#comment-94425</link>
		<dc:creator>Vincent Partington</dc:creator>
		<pubDate>Mon, 29 Mar 2010 19:57:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.xebia.com/?p=2528#comment-94425</guid>
		<description>&lt;strong&gt;@Stefan Lecho:&lt;/strong&gt; I have good experiences doing unit testing with a JPA provider that is &lt;a href=&quot;http://static.springsource.org/spring/docs/2.5.x/reference/testing.html#testcontext-ctx-management&quot; rel=&quot;nofollow&quot;&gt;configured by Spring&lt;/a&gt; to connect to an in-memory &lt;a href=&quot;http://hsqldb.org/&quot; rel=&quot;nofollow&quot;&gt;HSQLDB&lt;/a&gt; database.</description>
		<content:encoded><![CDATA[<p><strong>@Stefan Lecho:</strong> I have good experiences doing unit testing with a JPA provider that is <a href="http://static.springsource.org/spring/docs/2.5.x/reference/testing.html#testcontext-ctx-management" rel="nofollow">configured by Spring</a> to connect to an in-memory <a href="http://hsqldb.org/" rel="nofollow">HSQLDB</a> database.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Lecho</title>
		<link>http://blog.xebia.com/2009/07/11/jpa-implementation-patterns-testing/#comment-94313</link>
		<dc:creator>Stefan Lecho</dc:creator>
		<pubDate>Fri, 19 Mar 2010 07:53:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.xebia.com/?p=2528#comment-94313</guid>
		<description>Which best practices exist for testing JPA classes without a container, more specifically how can the &quot;@PersistenceContext&quot; work correctly without a container ?</description>
		<content:encoded><![CDATA[<p>Which best practices exist for testing JPA classes without a container, more specifically how can the &#8220;@PersistenceContext&#8221; work correctly without a container ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gene De Lisa</title>
		<link>http://blog.xebia.com/2009/07/11/jpa-implementation-patterns-testing/#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-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-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>
<!-- This Quick Cache file was built for (  blog.xebia.com/2009/07/11/jpa-implementation-patterns-testing/feed/ ) in 0.52181 seconds, on Feb 9th, 2012 at 7:47 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 9th, 2012 at 8:47 pm UTC -->
