<?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: Unit testing an Entity Framework DAL part 2: Rolling back the test database</title>
	<atom:link href="http://graemehill.ca/unit-testing-an-entity-framework-data-access-layer-part-2-rolling-back-the-test-database/feed" rel="self" type="application/rss+xml" />
	<link>http://graemehill.ca/unit-testing-an-entity-framework-data-access-layer-part-2-rolling-back-the-test-database</link>
	<description></description>
	<pubDate>Fri, 30 Jul 2010 13:22:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: ShantiDev</title>
		<link>http://graemehill.ca/unit-testing-an-entity-framework-data-access-layer-part-2-rolling-back-the-test-database/comment-page-1#comment-708</link>
		<dc:creator>ShantiDev</dc:creator>
		<pubDate>Tue, 13 Jul 2010 13:02:54 +0000</pubDate>
		<guid isPermaLink="false">http://graemehill.ca/?p=134#comment-708</guid>
		<description>Gr8 if u r using SQL Server.</description>
		<content:encoded><![CDATA[<p>Gr8 if u r using SQL Server.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: High performance database rollback in automated tests with SQL Server &#124; Graeme Hill on .NET development</title>
		<link>http://graemehill.ca/unit-testing-an-entity-framework-data-access-layer-part-2-rolling-back-the-test-database/comment-page-1#comment-620</link>
		<dc:creator>High performance database rollback in automated tests with SQL Server &#124; Graeme Hill on .NET development</dc:creator>
		<pubDate>Sat, 23 Jan 2010 17:29:02 +0000</pubDate>
		<guid isPermaLink="false">http://graemehill.ca/?p=134#comment-620</guid>
		<description>[...] why I think it is reasonable for unit tests to hit a real database. Subsequently, I wrote a follow up article describing some techniques for rolling back your database to its original state after each test. In [...]</description>
		<content:encoded><![CDATA[<p>[...] why I think it is reasonable for unit tests to hit a real database. Subsequently, I wrote a follow up article describing some techniques for rolling back your database to its original state after each test. In [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Etienne MILLERIOUX</title>
		<link>http://graemehill.ca/unit-testing-an-entity-framework-data-access-layer-part-2-rolling-back-the-test-database/comment-page-1#comment-616</link>
		<dc:creator>Etienne MILLERIOUX</dc:creator>
		<pubDate>Tue, 12 Jan 2010 15:17:25 +0000</pubDate>
		<guid isPermaLink="false">http://graemehill.ca/?p=134#comment-616</guid>
		<description>Or ... you can try NDBUnit (on code.google.com)
It handle database Moke and rollback ;)</description>
		<content:encoded><![CDATA[<p>Or &#8230; you can try NDBUnit (on code.google.com)<br />
It handle database Moke and rollback <img src='http://graemehill.ca/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Graeme</title>
		<link>http://graemehill.ca/unit-testing-an-entity-framework-data-access-layer-part-2-rolling-back-the-test-database/comment-page-1#comment-174</link>
		<dc:creator>Graeme</dc:creator>
		<pubDate>Wed, 28 Oct 2009 00:51:42 +0000</pubDate>
		<guid isPermaLink="false">http://graemehill.ca/?p=134#comment-174</guid>
		<description>Bernard: I actually have one project that uses the method of mocking the context (it's LINQ to SQL though, not Entity Framework) and it generally seems to work but it wasn't worth it.  It adds a lot of complexity to the project and I still find bugs in it now and then.  Plus I can never truly trust my tests because there's no guarantee that the mock context behaves exactly like the real one.  "Rickety" is definitely a good word to describe it.</description>
		<content:encoded><![CDATA[<p>Bernard: I actually have one project that uses the method of mocking the context (it&#8217;s LINQ to SQL though, not Entity Framework) and it generally seems to work but it wasn&#8217;t worth it.  It adds a lot of complexity to the project and I still find bugs in it now and then.  Plus I can never truly trust my tests because there&#8217;s no guarantee that the mock context behaves exactly like the real one.  &#8220;Rickety&#8221; is definitely a good word to describe it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bernard</title>
		<link>http://graemehill.ca/unit-testing-an-entity-framework-data-access-layer-part-2-rolling-back-the-test-database/comment-page-1#comment-167</link>
		<dc:creator>Bernard</dc:creator>
		<pubDate>Tue, 27 Oct 2009 22:36:13 +0000</pubDate>
		<guid isPermaLink="false">http://graemehill.ca/?p=134#comment-167</guid>
		<description>Great stuff Graeme, thanks for your post. I was wondering what to do about the situation you describe in part 1 and 2 of this post for a project I'm currently working on - now I have a solution (that I know someone else has used)! Was thinking about making a mock of the ObjectContext but it just seems like like a cumbersome and inelegant solution; like you say, you'd end up testing the rickety mock object rather than the code you intend to use in production.</description>
		<content:encoded><![CDATA[<p>Great stuff Graeme, thanks for your post. I was wondering what to do about the situation you describe in part 1 and 2 of this post for a project I&#8217;m currently working on - now I have a solution (that I know someone else has used)! Was thinking about making a mock of the ObjectContext but it just seems like like a cumbersome and inelegant solution; like you say, you&#8217;d end up testing the rickety mock object rather than the code you intend to use in production.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Graeme</title>
		<link>http://graemehill.ca/unit-testing-an-entity-framework-data-access-layer-part-2-rolling-back-the-test-database/comment-page-1#comment-60</link>
		<dc:creator>Graeme</dc:creator>
		<pubDate>Sat, 24 Oct 2009 21:53:37 +0000</pubDate>
		<guid isPermaLink="false">http://graemehill.ca/?p=134#comment-60</guid>
		<description>Mike, I manually create the snapshot file in SQL Server Management Studio and then I use the [TestCleanUp()] method to restore the db to that snapshot after each test.  That way the tests always end up rolling back to the same snapshot and the snapshot doesn't have to be regenerated before each test.  You just have to remember to regenerate the snapshot if you want to change your test data, otherwise your changes will disappear as soon as you restore the dbt.</description>
		<content:encoded><![CDATA[<p>Mike, I manually create the snapshot file in SQL Server Management Studio and then I use the [TestCleanUp()] method to restore the db to that snapshot after each test.  That way the tests always end up rolling back to the same snapshot and the snapshot doesn&#8217;t have to be regenerated before each test.  You just have to remember to regenerate the snapshot if you want to change your test data, otherwise your changes will disappear as soon as you restore the dbt.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://graemehill.ca/unit-testing-an-entity-framework-data-access-layer-part-2-rolling-back-the-test-database/comment-page-1#comment-59</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Sat, 24 Oct 2009 21:10:32 +0000</pubDate>
		<guid isPermaLink="false">http://graemehill.ca/?p=134#comment-59</guid>
		<description>Thanks for the post.

Based on the post it appears that the best option is the SQL Server snapshots. Do you create the snapshot file and restore from it in the test methods themselves? Is this part of the [TestCleanUp()] method or is this run manually before and after the tests are run?

Thanks!
Mike</description>
		<content:encoded><![CDATA[<p>Thanks for the post.</p>
<p>Based on the post it appears that the best option is the SQL Server snapshots. Do you create the snapshot file and restore from it in the test methods themselves? Is this part of the [TestCleanUp()] method or is this run manually before and after the tests are run?</p>
<p>Thanks!<br />
Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Unit testing an Entity Framework DAL part 1: Just hit the database &#124; Graeme Hill on .NET development</title>
		<link>http://graemehill.ca/unit-testing-an-entity-framework-data-access-layer-part-2-rolling-back-the-test-database/comment-page-1#comment-51</link>
		<dc:creator>Unit testing an Entity Framework DAL part 1: Just hit the database &#124; Graeme Hill on .NET development</dc:creator>
		<pubDate>Sat, 17 Oct 2009 23:32:08 +0000</pubDate>
		<guid isPermaLink="false">http://graemehill.ca/?p=134#comment-51</guid>
		<description>[...]      &#171; WPF nullable combo box source code Unit testing an Enitity Framework DAL part 2: Rolling back the test database [...]</description>
		<content:encoded><![CDATA[<p>[...]      &laquo; WPF nullable combo box source code Unit testing an Enitity Framework DAL part 2: Rolling back the test database [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
