<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>just in ram &#187; BDD</title>
	<atom:link href="http://justinramel.com/tag/bdd/feed/" rel="self" type="application/rss+xml" />
	<link>http://justinramel.com</link>
	<description>A list of stuff I should remember but never do</description>
	<lastBuildDate>Sat, 24 Jul 2010 10:14:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>developwithpassion.bdd &#8211; notes</title>
		<link>http://justinramel.com/2009/04/30/developwithpassionbdd-notes/</link>
		<comments>http://justinramel.com/2009/04/30/developwithpassionbdd-notes/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 17:29:37 +0000</pubDate>
		<dc:creator>Justin Ramel</dc:creator>
				<category><![CDATA[BDD]]></category>

		<guid isPermaLink="false">http://justinram.wordpress.com/2009/04/30/developwithpassionbdd-notes/</guid>
		<description><![CDATA[A few notes I’ve compiled while starting to play with JP Boodhoo&#8217;s BDD framework (http://github.com/developwithpassion). At first sight the syntax looks quite alien but try it for a while you eyes soon adjust. 
JP blog posts 

How I’m Currently Writing My BDD Style Tests – Part 1
How I’m Currently Writing My BDD Style Tests – [...]]]></description>
			<content:encoded><![CDATA[<p>A few notes I’ve compiled while starting to play with <a href="http://blog.jpboodhoo.com/" target="_blank">JP Boodhoo&#8217;s</a> BDD framework (<a href="http://github.com/developwithpassion" target="_blank">http://github.com/developwithpassion</a>). At first sight the syntax looks quite alien but try it for a while you eyes soon adjust. </p>
<h2>JP blog posts </h2>
<ul>
<li><a href="http://blog.jpboodhoo.com/HowIrsquomCurrentlyWritingMyBDDStyleTestsNdashPart1.aspx" target="_blank">How I’m Currently Writing My BDD Style Tests – Part 1</a></li>
<li><a href="http://blog.jpboodhoo.com/HowIrsquomCurrentlyWritingMyBDDStyleTestsNdashPart2.aspx" target="_blank">How I’m Currently Writing My BDD Style Tests – Part 2</a></li>
<li><a href="http://blog.jpboodhoo.com/TestExamplesWithMBUnitAndJpboodhoobdd.aspx" target="_blank">Test examples with MBUnit and jpboodhoo.bdd</a></li>
<li><a href="http://blog.jpboodhoo.com/SlightAdditionToJpboodhoobdd.aspx" target="_blank">Slight addition to jpboodhoo.bdd</a></li>
<li><a href="http://blog.jpboodhoo.com/UsingJpboodhoobddWithTestDrivenNet.aspx" target="_blank">Using jpboodhoo.bdd with TestDriven.Net</a></li>
<li><a href="http://blog.jpboodhoo.com/MoreNewConventionsForHowIOrganizeMyTests.aspx" target="_blank">More new conventions for how I organize my tests!!</a></li>
</ul>
<h2>Base classes</h2>
<ul>
<li>observations_for_a_static_sut – For testing a static class or a quick inline test</li>
<li>observations_for_a_sut_with_a_contract – For testing against the interface of a class </li>
<ul>
<li>sut is automatically created </li>
<li>No more broken test when you add a new dependency to a class! YAY</li>
<li>Automatic creation of sut can be over ridden</li>
</ul>
<li>observations_for_a_sut_without_a_contract – For testing against a concrete class</li>
</ul>
<h2>Delegate call order</h2>
<ul>
<li>context</li>
<ul>
<li>Can define a context block in the concerns base class which will be run before a context block in the inheriting class</li>
<li>Can call method provide_a_basic_sut_constructor_argument</li>
</ul>
<li>after_sut_has_been_initialized</li>
<li>because</li>
<li>it</li>
<li>after_each_observation</li>
</ul>
<h2>Exceptions</h2>
<p>When you want to <strike>test</strike> spec? for an exception use the doing method:</p>
<blockquote><p>because b = () =&gt;      <br />&#160;&#160;&#160; doing(() =&gt; sut.MethodWhichThrows()); </p>
<p>it should_throw_exception = () =&gt;     <br />&#160;&#160;&#160; exception_thrown_by_the_sut.Message.should_contain(&quot;MY EXCEPTION&quot;); </p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://justinramel.com/2009/04/30/developwithpassionbdd-notes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Books + Head First C# + Lab 1 Solution</title>
		<link>http://justinramel.com/2008/01/03/books-head-first-c-lab-1-solution/</link>
		<comments>http://justinramel.com/2008/01/03/books-head-first-c-lab-1-solution/#comments</comments>
		<pubDate>Thu, 03 Jan 2008 20:52:00 +0000</pubDate>
		<dc:creator>Justin Ramel</dc:creator>
				<category><![CDATA[BDD]]></category>
		<category><![CDATA[Books]]></category>

		<guid isPermaLink="false">http://justinram.wordpress.com/2008/01/03/books-head-first-c-lab-1-solution/</guid>
		<description><![CDATA[I&#8217;ve been reading through the new Head First book Head First C#
which appeared on Safari just before Christmas. I&#8217;ve been a fan of the Head Fist books ever since reading their best selling Head First Design Patterns book. This particular book is aimed at beginners / hobbyists so I&#8217;m not exactly the target audience but [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been reading through the new Head First book <a href="http://www.amazon.com/gp/product/0596514824?ie=UTF8&amp;tag=justinramelco-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596514824">Head First C#</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=justinramelco-20&amp;l=as2&amp;o=1&amp;a=0596514824" border="0" alt="" width="1" height="1" /><br />
which appeared on <a href="http://search.safaribooksonline.com/home" target="_blank">Safari</a> just before Christmas. I&#8217;ve been a fan of the Head Fist books ever since reading their best selling <a href="http://www.amazon.com/gp/product/0596007124?ie=UTF8&#038;tag=justinramelco-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0596007124">Head First Design Patterns</a><img src="http://www.assoc-amazon.com/e/ir?t=justinramelco-20&#038;l=as2&#038;o=1&#038;a=0596007124" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> book. This particular book is aimed at beginners / hobbyists so I&#8217;m not exactly the target audience but hey it covers C# 3 so its got to be worth at least a skim.</p>
<p>I was pleased to see they&#8217;ve added a new feature to the head first series namely lab sections. There are 3 lab sections in the book which are basically specifications for mini games, the idea being the reader creates the games using their newly acquired C# skills. I though this was a great idea and having a lot of spare time in front of my laptop over the Christmas (due to a very <a href="http://justin.ramel.googlepages.com/ankle.jpg" target="_blank">sore ankle</a>) I did the first of the labs &#8220;A day at the races&#8221;.</p>
<p>I used the lab as an exercise in <a href="http://behaviour-driven.org/" target="_blank">Behaviour Driven Development (BDD)</a> which I&#8217;d recently read about <a href="http://dannorth.net/introducing-bdd" target="_blank">here</a> and <a href="http://codebetter.com/blogs/david_laribee/archive/2007/12/17/approaching-bdd.aspx" target="_blank">here</a>. I also got to try out a Test Data Builder I&#8217;d read about <a href="http://nat.truemesh.com/archives/000714.html" target="_blank">here</a>. Now I&#8217;m not convinced I hit the nail on the head with the BDD as my solution wasn&#8217;t created in a <span style="text-decoration: line-through;">test</span> behaviour first manor. This was mainly due to the fact the book provides you with the shell of a solution to keep things nice and simple for beginners. Never the less it was a good fun doing the lab it&#8217;s a great way to try out new techniques.</p>
<p>All in all the BDD experience was pretty good not sure about the code duplication in the context setup but you got to love the way the descriptive contexts and method names combine to read like a sentence:</p>
<p><img src="http://justin.ramel.googlepages.com/bdd.gif" alt="" /></p>
<p>Also the Test Data Builder is a really flexible way to create test data using a fluent interface which again is really easy to read:</p>
<p><code>myGuy = new GuyBuilder().WithName("Joe").AndCash(50).Build(); </code></p>
<p>You can download the solution <a href="http://justin.ramel.googlepages.com/lab01.zip" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://justinramel.com/2008/01/03/books-head-first-c-lab-1-solution/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
