<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Dotnet Orm on Chris McKelt - Remembering Thoughts</title><link>https://blog.smarttechventures.au/tags/dotnet-orm/</link><description>Recent content in Dotnet Orm on Chris McKelt - Remembering Thoughts</description><generator>Hugo -- 0.147.2</generator><language>en</language><lastBuildDate>Thu, 07 Aug 2008 00:00:00 +0800</lastBuildDate><atom:link href="https://blog.smarttechventures.au/tags/dotnet-orm/index.xml" rel="self" type="application/rss+xml"/><item><title>Active Record and Fake In Memory Repositories in Test Driven Development</title><link>https://blog.smarttechventures.au/articles/posts/active-record-and-fake-in-memory-repositories-in-test-driven-development/</link><pubDate>Thu, 07 Aug 2008 00:00:00 +0800</pubDate><guid>https://blog.smarttechventures.au/articles/posts/active-record-and-fake-in-memory-repositories-in-test-driven-development/</guid><description>&lt;h3 id="introduction">Introduction&lt;/h3>
&lt;p>Here is a simple example of how to use fake repositories in test driven development.&lt;/p>
&lt;p>By using Fake Repositories generated from a binary file we are able to quickly use &amp;lsquo;real data&amp;rsquo; in all our tests.&lt;/p>
&lt;p>It is a Visual Studio 2008 solution and uses the Castle project&amp;rsquo;s &lt;a href="http://www.castleproject.org/" title="http://www.castleproject.org/" target="_blank">Active Record&lt;/a> as an ORM.&lt;/p>
&lt;h3 id="step-1--our-core-model">Step 1 – Our Core Model&lt;/h3>
&lt;p>The model will consist of 3 classes&lt;/p>
&lt;pre>&lt;code>- SuperHero e.g. Superman
- SupeHeroId
- RealName
- SuperHeroName
- Power e.g. Flight
- PowerId
- PowerName
- SuperHeroPower e.g. Superman’s flight
- SuperHeroPowerId
- Comments (e.g. Faster than a speeding bullet)
&lt;/code>&lt;/pre>
&lt;p>Each of our classes implements an Interface called &lt;em>IIdRetriever&lt;/em>&lt;/p></description></item></channel></rss>