<?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"
	>
<channel>
	<title>Comments on: Castle demo app: ActiveRecord basics and unit testing</title>
	<atom:link href="http://gojko.net/2008/05/07/castle-demo-app-activerecord-basics-and-unit-testing/feed/" rel="self" type="application/rss+xml" />
	<link>http://gojko.net/2008/05/07/castle-demo-app-activerecord-basics-and-unit-testing/</link>
	<description>The Quest for Software++</description>
	<pubDate>Fri, 25 Jul 2008 08:01:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: gojko</title>
		<link>http://gojko.net/2008/05/07/castle-demo-app-activerecord-basics-and-unit-testing/#comment-29090</link>
		<dc:creator>gojko</dc:creator>
		<pubDate>Sat, 28 Jun 2008 19:03:36 +0000</pubDate>
		<guid isPermaLink="false">http://gojko.net/?p=124#comment-29090</guid>
		<description>Hi Stew,

This error message suggests that your schema cannot be dropped as part of the unit test fixture set-up. Maybe some data consistency constraints are preventing you from dropping the client table (eg you have more tables in the schema, but you only loaded the Client table into AR during unit testing). Try to drop all tables in the schema manually before running the test.</description>
		<content:encoded><![CDATA[<p>Hi Stew,</p>
<p>This error message suggests that your schema cannot be dropped as part of the unit test fixture set-up. Maybe some data consistency constraints are preventing you from dropping the client table (eg you have more tables in the schema, but you only loaded the Client table into AR during unit testing). Try to drop all tables in the schema manually before running the test.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stew</title>
		<link>http://gojko.net/2008/05/07/castle-demo-app-activerecord-basics-and-unit-testing/#comment-29064</link>
		<dc:creator>Stew</dc:creator>
		<pubDate>Fri, 27 Jun 2008 23:25:09 +0000</pubDate>
		<guid isPermaLink="false">http://gojko.net/?p=124#comment-29064</guid>
		<description>I'm trying to follow this tutorial, but having problems. (I'm calling "User" "Client", but otherwise I'm pretty much the same as the examples given.)

Here's the error I get when I try to run NUnit for the first time:

Scrumpy.Database.Test.Tests.ClientTests.TestAddingUsers:
Castle.ActiveRecord.Framework.ActiveRecordException : Could not drop the schema
  ----&#62; NHibernate.ADOException : Could not close Npgsql.NpgsqlConnection connection
  ----&#62; System.NotSupportedException : This stream does not support seek operations.
TearDown : System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
  ----&#62; System.NullReferenceException : Object reference not set to an instance of an object.</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to follow this tutorial, but having problems. (I&#8217;m calling &#8220;User&#8221; &#8220;Client&#8221;, but otherwise I&#8217;m pretty much the same as the examples given.)</p>
<p>Here&#8217;s the error I get when I try to run NUnit for the first time:</p>
<p>Scrumpy.Database.Test.Tests.ClientTests.TestAddingUsers:<br />
Castle.ActiveRecord.Framework.ActiveRecordException : Could not drop the schema<br />
  &#8212;-&gt; NHibernate.ADOException : Could not close Npgsql.NpgsqlConnection connection<br />
  &#8212;-&gt; System.NotSupportedException : This stream does not support seek operations.<br />
TearDown : System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.<br />
  &#8212;-&gt; System.NullReferenceException : Object reference not set to an instance of an object.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Federico</title>
		<link>http://gojko.net/2008/05/07/castle-demo-app-activerecord-basics-and-unit-testing/#comment-27985</link>
		<dc:creator>Federico</dc:creator>
		<pubDate>Mon, 26 May 2008 02:37:14 +0000</pubDate>
		<guid isPermaLink="false">http://gojko.net/?p=124#comment-27985</guid>
		<description>Hi,

I think the text in your TestInvalidFormatEmail() is wrong. It says "password"when it's checking for email.


Thanks,

Federico</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I think the text in your TestInvalidFormatEmail() is wrong. It says &#8220;password&#8221;when it&#8217;s checking for email.</p>
<p>Thanks,</p>
<p>Federico</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gojko</title>
		<link>http://gojko.net/2008/05/07/castle-demo-app-activerecord-basics-and-unit-testing/#comment-27744</link>
		<dc:creator>gojko</dc:creator>
		<pubDate>Sat, 17 May 2008 14:15:56 +0000</pubDate>
		<guid isPermaLink="false">http://gojko.net/?p=124#comment-27744</guid>
		<description>Hi Ulu, 

ActiveRecord mixes domain logic and storage &#8212; so it is not the best choice for more complex applications. You can use NHibernate directly from Castle and use the Repository pattern, for example, to write the code in a way that enables you to test domain code independently of storage.</description>
		<content:encoded><![CDATA[<p>Hi Ulu, </p>
<p>ActiveRecord mixes domain logic and storage &mdash; so it is not the best choice for more complex applications. You can use NHibernate directly from Castle and use the Repository pattern, for example, to write the code in a way that enables you to test domain code independently of storage.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ulu</title>
		<link>http://gojko.net/2008/05/07/castle-demo-app-activerecord-basics-and-unit-testing/#comment-27740</link>
		<dc:creator>ulu</dc:creator>
		<pubDate>Sat, 17 May 2008 12:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://gojko.net/?p=124#comment-27740</guid>
		<description>Hi,

I'm wondering if it is possible to execute my tests without hitting the database. For example, I want to create an entity and verify that my model class fetches (or ignores) it. Or I want to execute a method and verify that an entity object has been created, without a database roundtrip. Hitting a database may be fine when you do integration testing, but I don't want to touch it in _every_ test. If you can suggest another pattern, I'll be happy to try it.

Another useful application is when you are pretty sure that you have all relevant objects fetched already and you don't want to fetch them again.

I know that ISession is some sot of a cache, but the online documentation on AR cache is "to be added". Could you please pint me in the right direction?

Thanks
ulu</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I&#8217;m wondering if it is possible to execute my tests without hitting the database. For example, I want to create an entity and verify that my model class fetches (or ignores) it. Or I want to execute a method and verify that an entity object has been created, without a database roundtrip. Hitting a database may be fine when you do integration testing, but I don&#8217;t want to touch it in _every_ test. If you can suggest another pattern, I&#8217;ll be happy to try it.</p>
<p>Another useful application is when you are pretty sure that you have all relevant objects fetched already and you don&#8217;t want to fetch them again.</p>
<p>I know that ISession is some sot of a cache, but the online documentation on AR cache is &#8220;to be added&#8221;. Could you please pint me in the right direction?</p>
<p>Thanks<br />
ulu</p>
]]></content:encoded>
	</item>
</channel>
</rss>
