<?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: Testing CRUD Operations With NHibernate</title> <atom:link href="http://davybrion.com/blog/2009/12/testing-crud-operations-with-nhibernate/feed/" rel="self" type="application/rss+xml" /><link>http://davybrion.com/blog/2009/12/testing-crud-operations-with-nhibernate/</link> <description>inquisitive: adjective. given to inquiry, research, or asking questions; eager for knowledge; intellectually curious</description> <lastBuildDate>Tue, 22 May 2012 17:40: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: Morten Jacobsen</title><link>http://davybrion.com/blog/2009/12/testing-crud-operations-with-nhibernate/comment-page-1/#comment-52951</link> <dc:creator>Morten Jacobsen</dc:creator> <pubDate>Wed, 11 Aug 2010 09:52:11 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=2015#comment-52951</guid> <description>Aha, I was misinterpreting the error message.. It seems the dll I have is DynamicProxy2 2.1.1.. Two months of vacation seems to have affected my thinking :).. Anyways, thanks for the help :)</description> <content:encoded><![CDATA[<p>Aha, I was misinterpreting the error message.. It seems the dll I have is DynamicProxy2 2.1.1.. Two months of vacation seems to have affected my thinking <img
src='http://d18sni7re4ly7f.cloudfront.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .. Anyways, thanks for the help <img
src='http://d18sni7re4ly7f.cloudfront.net/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/2009/12/testing-crud-operations-with-nhibernate/comment-page-1/#comment-52950</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Wed, 11 Aug 2010 09:48:50 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=2015#comment-52950</guid> <description>@Mortenyour NHibernate assemblies were compiled against Castle 2.1.0.0 (you can tell from the version number listed in the exception message)</description> <content:encoded><![CDATA[<p>@Morten</p><p>your NHibernate assemblies were compiled against Castle 2.1.0.0 (you can tell from the version number listed in the exception message)</p> ]]></content:encoded> </item> <item><title>By: Morten Jacobsen</title><link>http://davybrion.com/blog/2009/12/testing-crud-operations-with-nhibernate/comment-page-1/#comment-52949</link> <dc:creator>Morten Jacobsen</dc:creator> <pubDate>Wed, 11 Aug 2010 09:46:16 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=2015#comment-52949</guid> <description>Davy,Yes i&#039;ve tried with and without Castle.Core.. How do I check which version nhibernate requires? I downloaded the lastest DynamicProxy2 and the lastest Nhibernate releases..</description> <content:encoded><![CDATA[<p>Davy,</p><p>Yes i&#8217;ve tried with and without Castle.Core.. How do I check which version nhibernate requires? I downloaded the lastest DynamicProxy2 and the lastest Nhibernate releases..</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/12/testing-crud-operations-with-nhibernate/comment-page-1/#comment-52948</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Wed, 11 Aug 2010 09:43:27 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=2015#comment-52948</guid> <description>@Mortensorry, missed the last commentdid you also include Castle.Core? are you sure that you have the correct versions? maybe your NHibernate.ByteCode.Castle.ProxyFactory was built against a different version of DynamicProxy2 than the one you included.</description> <content:encoded><![CDATA[<p>@Morten</p><p>sorry, missed the last comment</p><p>did you also include Castle.Core? are you sure that you have the correct versions? maybe your NHibernate.ByteCode.Castle.ProxyFactory was built against a different version of DynamicProxy2 than the one you included.</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/12/testing-crud-operations-with-nhibernate/comment-page-1/#comment-52946</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Wed, 11 Aug 2010 09:40:03 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=2015#comment-52946</guid> <description>@Mortendid you include a reference to Castle.DynamicProxy2 in your test project?</description> <content:encoded><![CDATA[<p>@Morten</p><p>did you include a reference to Castle.DynamicProxy2 in your test project?</p> ]]></content:encoded> </item> <item><title>By: Morten Jacobsen</title><link>http://davybrion.com/blog/2009/12/testing-crud-operations-with-nhibernate/comment-page-1/#comment-52945</link> <dc:creator>Morten Jacobsen</dc:creator> <pubDate>Wed, 11 Aug 2010 09:39:39 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=2015#comment-52945</guid> <description>I forgot to point out that the assemblies are indeed referenced in the project and i have tried readding them to no avail..</description> <content:encoded><![CDATA[<p>I forgot to point out that the assemblies are indeed referenced in the project and i have tried readding them to no avail..</p> ]]></content:encoded> </item> <item><title>By: Morten Jacobsen</title><link>http://davybrion.com/blog/2009/12/testing-crud-operations-with-nhibernate/comment-page-1/#comment-52944</link> <dc:creator>Morten Jacobsen</dc:creator> <pubDate>Wed, 11 Aug 2010 09:38:49 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=2015#comment-52944</guid> <description>Davy,I&#039;ve slightly modified your baseclasses, but whenever i try to run the tests, i get the following exception:TypeInitializationException: The type initializer for &#039;NHibernate.ByteCode.Castle.ProxyFactory&#039; threw an exception. Could not load file or assembly &#039;Castle.DynamicProxy2, Version=2.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc&#039; or one of its dependencies. The located assembly&#039;s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)Any ideas?My changes mainly concerns the use of ISession directly instead of the ActiveSessionManager and UnitOfWork.. Also, I have a TestFixtureSetUp method that configures NHibernate and builds the sessionfactory (it is here i get the exception)..</description> <content:encoded><![CDATA[<p>Davy,</p><p>I&#8217;ve slightly modified your baseclasses, but whenever i try to run the tests, i get the following exception:</p><p>TypeInitializationException: The type initializer for &#8216;NHibernate.ByteCode.Castle.ProxyFactory&#8217; threw an exception. Could not load file or assembly &#8216;Castle.DynamicProxy2, Version=2.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc&#8217; or one of its dependencies. The located assembly&#8217;s manifest definition does not match the assembly reference. (Exception from HRESULT: 0&#215;80131040)</p><p>Any ideas?</p><p>My changes mainly concerns the use of ISession directly instead of the ActiveSessionManager and UnitOfWork.. Also, I have a TestFixtureSetUp method that configures NHibernate and builds the sessionfactory (it is here i get the exception)..</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/12/testing-crud-operations-with-nhibernate/comment-page-1/#comment-52358</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Mon, 09 Aug 2010 07:38:39 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=2015#comment-52358</guid> <description>@Morteni would test the add/remove methods in separate test methods and leave the base methods in this test fixture stricture for the entity itself, and many-to-onesbut one-to-many&#039;s or many-to-many&#039;s deserver their own test methods :)as for what to check on =&gt; i&#039;d go for the count plus an ID check if you also have specific tests for the orders, or if you don&#039;t have those, i&#039;d do a complete check</description> <content:encoded><![CDATA[<p>@Morten</p><p>i would test the add/remove methods in separate test methods and leave the base methods in this test fixture stricture for the entity itself, and many-to-ones</p><p>but one-to-many&#8217;s or many-to-many&#8217;s deserver their own test methods <img
src='http://d18sni7re4ly7f.cloudfront.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><p>as for what to check on => i&#8217;d go for the count plus an ID check if you also have specific tests for the orders, or if you don&#8217;t have those, i&#8217;d do a complete check</p> ]]></content:encoded> </item> <item><title>By: Morten Jacobsen</title><link>http://davybrion.com/blog/2009/12/testing-crud-operations-with-nhibernate/comment-page-1/#comment-52253</link> <dc:creator>Morten Jacobsen</dc:creator> <pubDate>Sun, 08 Aug 2010 18:47:20 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=2015#comment-52253</guid> <description>Great article, I&#039;m trying to incorporate your ideas into my own project.. I have two questions though (this may seem stupid, but I&#039;m still new to TDD and I&#039;m sorta forcing myself to write tests and learn it properly):Say you have a CustomerTests class that inherits your baseclass.. Because customers have orders we need to test add/remove orders methods.. Would you then override the buildEntity etc. to also create orders so you can manipulate those or would you have the order creation logic separate (i.e. call BuildEntity() to get a customer, then create and add order to it)?Also, when you reload your customer, how much detail would you go into to check that the order was there? Would you simply check that order count has increased by one or would you check the details of the order also?Regards,
Morten</description> <content:encoded><![CDATA[<p>Great article, I&#8217;m trying to incorporate your ideas into my own project.. I have two questions though (this may seem stupid, but I&#8217;m still new to TDD and I&#8217;m sorta forcing myself to write tests and learn it properly):</p><p>Say you have a CustomerTests class that inherits your baseclass.. Because customers have orders we need to test add/remove orders methods.. Would you then override the buildEntity etc. to also create orders so you can manipulate those or would you have the order creation logic separate (i.e. call BuildEntity() to get a customer, then create and add order to it)?</p><p>Also, when you reload your customer, how much detail would you go into to check that the order was there? Would you simply check that order count has increased by one or would you check the details of the order also?</p><p>Regards,<br
/> Morten</p> ]]></content:encoded> </item> <item><title>By: Ere Thrice the Sun Done Salutation to the Dawn &#171; Search And Destroy</title><link>http://davybrion.com/blog/2009/12/testing-crud-operations-with-nhibernate/comment-page-1/#comment-25039</link> <dc:creator>Ere Thrice the Sun Done Salutation to the Dawn &#171; Search And Destroy</dc:creator> <pubDate>Fri, 15 Jan 2010 11:03:14 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=2015#comment-25039</guid> <description>[...] by kilfour on January 15, 2010  A while ago davy brion posted a nice base class for nhbirnate crud tests, which i eagerly [...]</description> <content:encoded><![CDATA[<p>[...] by kilfour on January 15, 2010  A while ago davy brion posted a nice base class for nhbirnate crud tests, which i eagerly [...]</p> ]]></content:encoded> </item> <item><title>By: Reflective Perspective - Chris Alcock &#187; The Morning Brew #493</title><link>http://davybrion.com/blog/2009/12/testing-crud-operations-with-nhibernate/comment-page-1/#comment-23125</link> <dc:creator>Reflective Perspective - Chris Alcock &#187; The Morning Brew #493</dc:creator> <pubDate>Tue, 08 Dec 2009 08:41:19 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=2015#comment-23125</guid> <description>[...] Testing CRUD Operations With NHibernate - Davy Brion shares a simple base class which provides the groundwork for testing Create Read Update and Delete functionality of NHibernate types [...]</description> <content:encoded><![CDATA[<p>[...] Testing CRUD Operations With NHibernate &#8211; Davy Brion shares a simple base class which provides the groundwork for testing Create Read Update and Delete functionality of NHibernate types [...]</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/12/testing-crud-operations-with-nhibernate/comment-page-1/#comment-23122</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Tue, 08 Dec 2009 06:09:38 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=2015#comment-23122</guid> <description>@Grantthe class shown in this post is only useful to test the correctness of your mappings by making sure that CRUD operations work for all entities. and as mentioned in the previous post, we also write tests for each specific custom query that we write.our higher level code (the one that indees communicates with repositories for all NH-related tasks) is always tested with mocked repositories.</description> <content:encoded><![CDATA[<p>@Grant</p><p>the class shown in this post is only useful to test the correctness of your mappings by making sure that CRUD operations work for all entities. and as mentioned in the previous post, we also write tests for each specific custom query that we write.</p><p>our higher level code (the one that indees communicates with repositories for all NH-related tasks) is always tested with mocked repositories.</p> ]]></content:encoded> </item> <item><title>By: Grant Palin</title><link>http://davybrion.com/blog/2009/12/testing-crud-operations-with-nhibernate/comment-page-1/#comment-23118</link> <dc:creator>Grant Palin</dc:creator> <pubDate>Mon, 07 Dec 2009 23:52:30 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=2015#comment-23118</guid> <description>Just came from your previous post. This is a nice follow-up, another worthy of bookmarking!Supposing that you follow the multi-layer approach to your project, this code would be used in testing persistence with NHibernate, right? So higher-level code which would normally interact with NH-backed repositories would actually interact with fake version of such, just so you can keep the different test types separate...Am I right??</description> <content:encoded><![CDATA[<p>Just came from your previous post. This is a nice follow-up, another worthy of bookmarking!</p><p>Supposing that you follow the multi-layer approach to your project, this code would be used in testing persistence with NHibernate, right? So higher-level code which would normally interact with NH-backed repositories would actually interact with fake version of such, just so you can keep the different test types separate&#8230;Am I right??</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 2/17 queries in 0.014 seconds using disk: basic
Object Caching 533/534 objects using disk: basic
Content Delivery Network via Amazon Web Services: CloudFront: d18sni7re4ly7f.cloudfront.net

Served from: davybrion.com @ 2012-05-23 02:00:04 -->
