<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>bdd &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/bdd/</link>
	<description>Feed of posts on WordPress.com tagged "bdd"</description>
	<pubDate>Mon, 30 Nov 2009 21:17:40 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[All Good Things Must Come To An End]]></title>
<link>http://shutterboo.com/2009/11/29/all-good-things-must-come-to-an-end/</link>
<pubDate>Sun, 29 Nov 2009 19:54:51 +0000</pubDate>
<dc:creator>shutterboo</dc:creator>
<guid>http://shutterboo.com/2009/11/29/all-good-things-must-come-to-an-end/</guid>
<description><![CDATA[A very true statement.  But I don&#8217;t have to be happy about it.  Nope.  I&#8217;m dragging this]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>A very true statement.  But I don&#8217;t have to be happy about it.  Nope.  I&#8217;m dragging this Sunday out as long as I possibly can and I ain&#8217;t doing jack crap.  Except going to the store to get the dogs more food.  But that&#8217;s it.  After that, it&#8217;s back to the couch and surfing the TV for holiday specials.</p>
<p>Today marks the end of my stay-cation.  My glorious six-day-paid-time-off vacation spent at home.  No more of this.  Boo.</p>
<p style="text-align:center;"><a title="Chevy Napping by shutterboo502, on Flickr" href="http://www.flickr.com/photos/shutterboo502/4144807474/"><img src="http://farm3.static.flickr.com/2758/4144807474_8a36e1b2fc.jpg" alt="Chevy Napping" width="500" height="333" /></a></p>
<p>No more afternoon naps curled up with the BDD. </p>
<p>No more lunch breaks in front of the TV. </p>
<p>No more playing on the internet because I want to. </p>
<p>No more pecan pie or pumpkin cake.</p>
<p>No more taking random pictures of the doggin while she sleeps.</p>
<p style="text-align:center;"><a title="Chevy Napping by shutterboo502, on Flickr" href="http://www.flickr.com/photos/shutterboo502/4144050173/"><img src="http://farm3.static.flickr.com/2677/4144050173_17505ec1c7.jpg" alt="Chevy Napping" width="500" height="333" /></a></p>
<p>I&#8217;m actually going to miss that last one a lot.  I could do this at night but there just isn&#8217;t enough light to satisfy me.  I&#8217;ve come to realize my doggins do nothing but sleep during the day.  I like it best when I get to catch some zzz with them. </p>
<p>Back to the grind tomorrow.  And it will be the grind because it is a super-duper busy day and I&#8217;m not looking forward to it.  That&#8217;s the bad thing about taking off work &#8211; you end up giving yourself more work in the end.  But at least PodMate&#8217;s smiling face will be there.  Well&#8230; let&#8217;s hope she&#8217;s still smiling.  She might be cursing my name by now.  :)</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[BDD with MSpec and Rhino Auto Mocks (part 3)]]></title>
<link>http://telldontask.wordpress.com/2009/11/29/bdd-with-mspec-and-rhino-auto-mocks-part-3/</link>
<pubDate>Sun, 29 Nov 2009 19:09:38 +0000</pubDate>
<dc:creator>telldontask</dc:creator>
<guid>http://telldontask.wordpress.com/2009/11/29/bdd-with-mspec-and-rhino-auto-mocks-part-3/</guid>
<description><![CDATA[In part 1 and part 2 we covered setting up MSpec, writing our specifications and then implementing o]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>In <a href="http://telldontask.wordpress.com/2009/11/10/bdd-with-mspec-and-rhino-auto-mocks/" target="_blank">part 1</a> and <a href="http://telldontask.wordpress.com/2009/11/19/bdd-with-mspec-and-rhino-auto-mocks-part-2/" target="_blank">part 2</a> we covered setting up MSpec, writing our specifications and then implementing one of those specifications.</p>
<p>So far we’ve covered very simple tests for code which has no external dependencies and does very little. Now we’ll turn our attention to those tests which (on the face of it) are more complicated and cover code which relies on data access, email services etc.</p>
<p>Lets tackle the the “when asked for products matching search term” specification.</p>
<h3>Establishing Context</h3>
<p>As before, we’ll start by establishing the context for this test, and to cut down on duplication, I’ve moved the basic context setup to its own class.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:6f1a0148-23af-43b1-ad59-ecc1f1b771b3" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#ddd;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;">
<li><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> <span style="color:#2b91af;">concern_for_product_controller</span></li>
<li style="background:#f3f3f3;">{</li>
<li>&#160;&#160;&#160;&#160;<span style="color:#0000ff;">protected</span> <span style="color:#0000ff;">static</span> <span style="color:#2b91af;">ProductController</span> _controller;</li>
<li style="background:#f3f3f3;">&#160;</li>
<li>&#160;&#160;&#160;&#160;<span style="color:#2b91af;">Establish</span> context =</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;() =&#62; { _controller = <span style="color:#0000ff;">new</span> <span style="color:#2b91af;">ProductController</span>(); };</li>
<li>}</li>
</ol></div>
</p></div>
</p></div>
<p>Now we can make all of the Product Controller tests inherit this class.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:b3531085-20ce-4b1a-af91-85ca3a5ba647" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#ddd;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;">
<li>[<span style="color:#2b91af;">Subject</span>(<span style="color:#a31515;">&#34;Product Search&#34;</span>)]</li>
<li style="background:#f3f3f3;"><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> <span style="color:#2b91af;">when_asked_for_products_matching_search_term</span> : <span style="color:#2b91af;">concern_for_product_controller</span></li>
<li>{</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;<span style="color:#2b91af;">It</span> should_retrieve_a_list_of_products_with_titles_containing_the_search_term;</li>
<li>&#160;&#160;&#160;&#160;<span style="color:#2b91af;">It</span> should_return_the_list_of_products_to_the_user;</li>
<li style="background:#f3f3f3;">}</li>
</ol></div>
</p></div>
</p></div>
<p>To implement the specification “should retrieve a list of products…” we want to simply check that the controller asks for a list of products from wherever we’re hoping to get our data from.</p>
<p>In the spirit of writing tests first we haven’t got any kind of data access layer yet so now we decide we need a <strong>Product Repository</strong>.</p>
<h3>Rhino AutoMocker</h3>
<p>To help test our repository we can introduce <strong>Rhino AutoMocker</strong> to the equation. Rhino AutoMocker is included as part of an <strong>AutoMocking</strong> library distributed with <strong>StructureMap</strong>.</p>
<p>To use it in your project, simply <a href="http://sourceforge.net/projects/structuremap/files/structuremap/StructureMap%202.5.3/StructureMap_2.5.3.zip/download" target="_blank">download StructureMap</a> and reference <strong>StructureMap.AutoMocking</strong> and <strong>Rhino.Mocks </strong>in your project.</p>
<p>We need to wire up the automocker so we can use it in our tests. To that end we’ll change our base class.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:5b28e86c-8544-4350-b8bc-8d520497d9da" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#ddd;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;">
<li><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> <span style="color:#2b91af;">concern_for_product_controller</span></li>
<li style="background:#f3f3f3;">{</li>
<li>&#160;&#160;&#160;&#160;<span style="color:#0000ff;">protected</span> <span style="color:#0000ff;">static</span> <span style="color:#2b91af;">ProductController</span> _controller;</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;<span style="color:#0000ff;">protected</span> <span style="color:#0000ff;">static</span> <span style="color:#2b91af;">IProductRepository</span> _productRepository;</li>
<li>&#160;&#160;&#160;&#160;<span style="color:#0000ff;">static</span> <span style="color:#2b91af;">RhinoAutoMocker</span>&#60;<span style="color:#2b91af;">ProductController</span>&#62; mocker;</li>
<li style="background:#f3f3f3;">&#160;</li>
<li>&#160;&#160;&#160;&#160;<span style="color:#2b91af;">Establish</span> context =</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;() =&#62;</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;{</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;mocker = <span style="color:#0000ff;">new</span> <span style="color:#2b91af;">RhinoAutoMocker</span>&#60;<span style="color:#2b91af;">ProductController</span>&#62;();</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;_controller = mocker.ClassUnderTest;</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;_productRepository = mocker.Get&#60;<span style="color:#2b91af;">IProductRepository</span>&#62;();</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;};</li>
<li style="background:#f3f3f3;">}</li>
</ol></div>
</p></div>
</p></div>
<p>So what’s going on here?</p>
<ol>
<li>We’ve introduced an instance of the AutoMocker for our Product Controller. </li>
<li>To make life easier we’ve introduced a field which references the AutoMocker’s “class under test” (in this case our Product Controller). </li>
<li>We’ve asked AutoMocker for an instance of IProductRepository and also referenced this as a handy field (which we can use in our tests). </li>
</ol>
<p>Now we can turn our attention back to the test.</p>
<h3>Setting Expectations</h3>
</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:11c02993-b9ad-430d-8ed0-824f1e105787" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#ddd;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;">
<li><span style="color:#0000ff;">static</span> <span style="color:#2b91af;">ActionResult</span> _result;</li>
<li style="background:#f3f3f3;">&#160;</li>
<li>&#160;<span style="color:#2b91af;">Because</span> of =</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;&#160;() =&#62; { _result = _controller.Search(<span style="color:#a31515;">&#34;test&#34;</span>); };</li>
<li>&#160;</li>
<li style="background:#f3f3f3;">&#160;<span style="color:#2b91af;">It</span> should_retrieve_a_list_of_products_with_titles_containing_the_search_term =</li>
<li>&#160;&#160;&#160;&#160;&#160;() =&#62; _productRepository.AssertWasCalled(x =&#62; x.FindProducts(<span style="color:#a31515;">&#34;test&#34;</span>));</li>
</ol></div>
</p></div>
</p></div>
</p>
<ol>
<li>We call a new overloaded version of our controller’s <strong>Search </strong>method (which accepts a string search term). </li>
<li>Then we perform a simple check to assert that the <strong>FindProducts</strong> method was called on <strong>IProductRepository</strong>. </li>
</ol>
<p>Finally, we want to check what gets sent back to the view. For now we’ll simply check the name of the view being returned (and that the result is a view).</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:ba3df834-63f7-41bd-8023-b47d04824b44" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#ddd;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;">
<li><span style="color:#2b91af;">It</span> should_return_the_list_of_products_to_the_user =</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;() =&#62; _result.is_a_view_and().ViewName.ShouldEqual(<span style="color:#a31515;">&#34;SearchResults&#34;</span>);</li>
</ol></div>
</p></div>
</p></div>
<p>As I’ve gone along here I’ve implemented just enough to have the test compile.</p>
<h5>IProductRepository</h5>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:076a8d62-186d-413a-8e32-7dc15618b77e" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#ddd;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;">
<li><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">interface</span> <span style="color:#2b91af;">IProductRepository</span></li>
<li style="background:#f3f3f3;">{</li>
<li>&#160;&#160;&#160;&#160;<span style="color:#2b91af;">IList</span>&#60;<span style="color:#2b91af;">Product</span>&#62; FindProducts(<span style="color:#0000ff;">string</span> searchTerm);</li>
<li style="background:#f3f3f3;">}</li>
</ol></div>
</p></div>
</p></div>
<h5>ProductController</h5>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:a2d2fb68-73b2-4e7b-a86c-e59cd86e4057" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#ddd;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;">
<li><span style="color:#0000ff;">public</span> <span style="color:#2b91af;">ActionResult</span> Search(<span style="color:#0000ff;">string</span> searchTerm)</li>
<li style="background:#f3f3f3;">{</li>
<li>&#160;&#160;&#160;&#160;<span style="color:#0000ff;">throw</span> <span style="color:#0000ff;">new</span> NotImplementedException();</li>
<li style="background:#f3f3f3;">}</li>
</ol></div>
</p></div>
</p></div>
<p>At this point we want to make the test pass so let’s do that.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:9525f71e-488a-44fb-8fc1-0b7eecbbd49f" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#ddd;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;">
<li><span style="color:#0000ff;">readonly</span> <span style="color:#2b91af;">IProductRepository</span> _productRepository;</li>
<li style="background:#f3f3f3;">&#160;</li>
<li><span style="color:#0000ff;">public</span> ProductController(<span style="color:#2b91af;">IProductRepository</span> productRepository)</li>
<li style="background:#f3f3f3;">{</li>
<li>&#160;&#160;&#160;&#160;_productRepository = productRepository;</li>
<li style="background:#f3f3f3;">}</li>
<li>&#160;</li>
<li style="background:#f3f3f3;"><span style="color:#0000ff;">public</span> <span style="color:#2b91af;">ActionResult</span> Search(<span style="color:#0000ff;">string</span> searchTerm)</li>
<li>{</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;<span style="color:#0000ff;">return</span> View(<span style="color:#a31515;">&#34;SearchResults&#34;</span>, _productRepository.FindProducts(searchTerm));</li>
<li>}</li>
</ol></div>
</p></div>
</p></div>
<p>Now our MSpec tests will pass.</p>
<p>When we run the tests, AutoMocker will generate a mocked version of our IProductRepository which our test uses to assert which methods were called. By letting AutoMocker generate our mocks we cut down on a lot of boilerplate code but don’t really loose anything in terms of flexibility and control (we can manually add mocks if we don’t want AutoMocker handling them for us).</p>
<h3>Stubs</h3>
<p>Now lets say we want to check that the list of products retrieved from the repository is actually sent back with the view.</p>
<p>For this, we can set up the automocked IProductRepository to return a specific list of products which we can then check are sent back to the user.</p>
<p>Lets start by telling automocker to stub the <strong>Search</strong> method and return a new list of products.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:11ef5865-c2e0-411f-b430-874c8ea9e33d" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#ddd;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;">
<li><span style="color:#2b91af;">Establish</span> context =</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;() =&#62;</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;{</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;_products = <span style="color:#0000ff;">new</span> <span style="color:#2b91af;">List</span>&#60;<span style="color:#2b91af;">Product</span>&#62;();</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;_productRepository.Stub(x =&#62; x.FindProducts(<span style="color:#a31515;">&#34;test&#34;</span>)).Return(_products);</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;};</li>
</ol></div>
</p></div>
</p></div>
<ol>
<li>We’ve added an <strong>Establish Context</strong> to our test (this will be used in conjunction with the one in our base class) </li>
<li>We’ve said that when the <strong>FindProducts</strong> method is called with the parameter “<strong>test”</strong> then a new generic list of Product will be returned </li>
</ol>
<p>Now we’ll change the implementation of the spec to check that this same list of products is returned with the view. Whilst we’re at it we’ll move the test for the view’s name into it’s own specification.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:a33ac588-c516-4ea2-8c4a-7584ceae71a8" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#ddd;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;">
<li><span style="color:#2b91af;">It</span> should_return_the_list_of_products_to_the_user =</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;() =&#62; _result.is_a_view_and().ViewData.Model.ShouldEqual(_products);</li>
<li>&#160;</li>
<li style="background:#f3f3f3;"><span style="color:#2b91af;">It</span> should_return_the_search_results_page_to_the_user =</li>
<li>&#160;&#160;&#160;&#160;() =&#62; _result.is_a_view_and().ViewName.ShouldEqual(<span style="color:#a31515;">&#34;SearchResults&#34;</span>);</li>
</ol></div>
</p></div>
</p></div>
<h3>Putting it all together</h3>
<p>So finally, our completed test implementation now looks like this…</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:af6309b1-4c23-4127-8b43-5ec7dbc43b2b" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#ddd;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;">
<li>[<span style="color:#2b91af;">Subject</span>(<span style="color:#a31515;">&#34;Product Search&#34;</span>)]</li>
<li style="background:#f3f3f3;"><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> <span style="color:#2b91af;">when_asked_for_products_matching_search_term</span> : <span style="color:#2b91af;">concern_for_product_controller</span></li>
<li>{</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;<span style="color:#0000ff;">static</span> <span style="color:#2b91af;">List</span>&#60;<span style="color:#2b91af;">Product</span>&#62; _products;</li>
<li>&#160;&#160;&#160;&#160;<span style="color:#0000ff;">static</span> <span style="color:#2b91af;">ActionResult</span> _result;</li>
<li style="background:#f3f3f3;">&#160;</li>
<li>&#160;&#160;&#160;&#160;<span style="color:#2b91af;">Establish</span> context =</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;() =&#62;</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;{</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;_products = <span style="color:#0000ff;">new</span> <span style="color:#2b91af;">List</span>&#60;<span style="color:#2b91af;">Product</span>&#62;();</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;_productRepository.Stub(x =&#62; x.FindProducts(<span style="color:#a31515;">&#34;test&#34;</span>)).Return(_products);</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;};</li>
<li>&#160;</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;<span style="color:#2b91af;">Because</span> of =</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;() =&#62; { _result = _controller.Search(<span style="color:#a31515;">&#34;test&#34;</span>); };</li>
<li style="background:#f3f3f3;">&#160;</li>
<li>&#160;&#160;&#160;&#160;<span style="color:#2b91af;">It</span> should_retrieve_a_list_of_products_with_titles_containing_the_search_term =</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;() =&#62; _productRepository.AssertWasCalled(x =&#62; x.FindProducts(<span style="color:#a31515;">&#34;test&#34;</span>));</li>
<li>&#160;</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;<span style="color:#2b91af;">It</span> should_return_the_list_of_products_to_the_user =</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;() =&#62; _result.is_a_view_and().ViewData.Model.ShouldEqual(_products);</li>
<li style="background:#f3f3f3;">&#160;</li>
<li>&#160;&#160;&#160;&#160;<span style="color:#2b91af;">It</span> should_return_the_search_results_page_to_the_user =</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;() =&#62; _result.is_a_view_and().ViewName.ShouldEqual(<span style="color:#a31515;">&#34;SearchResults&#34;</span>);</li>
<li>}</li>
</ol></div>
</p></div>
</p></div>
<p>Hopefully these posts have demonstrated how well MSpec and Rhino AutoMocker can work together. The key is that the tests are easy to maintain and clearly state the criteria by which to judge whether the code under test is valid. </p>
<p>These criteria are stated as human understandable specifications which can be agreed with your users before writing any code. RhinoAutoMocker makes mocking and stubbing very straightforward and helps you to defer making decisions until the <a href="http://www.codinghorror.com/blog/archives/000705.html" target="_blank">last responsible moment</a>.</p>
<p>You will find the source code for this sample project on <a href="http://github.com/jonhilt/MSpec-Example" target="_blank">GitHub</a>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[In Case You Need Some Cheering Up]]></title>
<link>http://shutterboo.com/2009/11/23/in-case-you-need-some-cheering-up/</link>
<pubDate>Tue, 24 Nov 2009 00:33:32 +0000</pubDate>
<dc:creator>shutterboo</dc:creator>
<guid>http://shutterboo.com/2009/11/23/in-case-you-need-some-cheering-up/</guid>
<description><![CDATA[Nana-nana-nana-nana-nana-nana-nana-nana&#8230; BAT DOG!]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:center;">Nana-nana-nana-nana-nana-nana-nana-nana&#8230; BAT DOG!</p>
<p style="text-align:center;"><a title="nanananananananana by shutterboo502, on Flickr" href="http://www.flickr.com/photos/shutterboo502/4129705508/"><img src="http://farm3.static.flickr.com/2609/4129705508_b920d49525.jpg" alt="nanananananananana" width="500" height="333" /></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Chevy: The Zombie Dog]]></title>
<link>http://shutterboo.com/2009/11/22/chevy-the-zombie-dog/</link>
<pubDate>Sun, 22 Nov 2009 16:17:22 +0000</pubDate>
<dc:creator>shutterboo</dc:creator>
<guid>http://shutterboo.com/2009/11/22/chevy-the-zombie-dog/</guid>
<description><![CDATA[We had a little adventure yesterday.  Chevy &amp; Chase, my beloved doggins, got out of the backyard]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>We had a little adventure yesterday.  Chevy &#38; Chase, my beloved doggins, got out of the backyard.  We have a gate on our deck that sticks and you see, we don&#8217;t exactly latch it.  The dogs have managed to get it open when someone comes to visit but never have just pushed it open for the helluva it.  Guess what?</p>
<p>Everyone got home safe and sound.  Chase ventured much further, taking in the sights on her little walk.  Chevy only made it to the corner &#8211; the kids in the yard were a major distraction and she just couldn&#8217;t resist.  She also could resist Rev when he approached her (we say that she calls Rev her boyfriend).  I&#8217;m just glad my BDD didn&#8217;t decide to chase a car because she&#8217;d probably be a BDDD: Big Dead Deaf Dog. </p>
<p>The escape artists were pooped after the whole shenanigan was over.  After lapping up 3 gallons of water, they settled down.  Chevy, the doggin that most likely opened the gate [because she has bigger muscles than Chase], curled up for a  nap.  And when this happens, I think <em>photoshoot!!</em> and stick the camera in her face.</p>
<p>Now imagine Chevy can talk.  I do this quite frequently.  We have conversations about life as we know it.  And she has a really deep voice because she&#8217;s a big dog.  This is what she was saying while I was taking her picture.</p>
<p><em>Man, it&#8217;s nice outside.  I should totally go to the door and see if food lady will open it.  Those midgets were fun.  They might still be there.</em></p>
<p style="text-align:center;"><a title="Chevy by shutterboo502, on Flickr" href="http://www.flickr.com/photos/shutterboo502/4125170510/"><img src="http://farm3.static.flickr.com/2610/4125170510_90dab152e4.jpg" alt="Chevy" width="500" height="333" /></a></p>
<p><em>Ah man, my head got too heavy again.  I hate it when that happens.</em></p>
<p style="text-align:center;"><a title="Chevy by shutterboo502, on Flickr" href="http://www.flickr.com/photos/shutterboo502/4124401233/"><img src="http://farm3.static.flickr.com/2648/4124401233_4b3b49c74b.jpg" alt="Chevy" width="500" height="333" /></a></p>
<p><em>I better stay right here.  So comfy.  And food lady&#8217;s got that shiny thing in my face again.  If I lay real still maybe she&#8217;ll go away.</em></p>
<p style="text-align:center;"><a title="Chevy by shutterboo502, on Flickr" href="http://www.flickr.com/photos/shutterboo502/4124401377/"><img src="http://farm3.static.flickr.com/2579/4124401377_c1bd622c4c.jpg" alt="Chevy" width="500" height="333" /></a></p>
<p><em>Or&#8230;I&#8217;ll&#8230; maul&#8230; fa&#8230;</em></p>
<p style="text-align:center;"><a title="Chevy by shutterboo502, on Flickr" href="http://www.flickr.com/photos/shutterboo502/4125170918/"><img src="http://farm3.static.flickr.com/2508/4125170918_7abb7a0485.jpg" alt="Chevy" width="500" height="333" /></a></p>
<p>*stretches out*</p>
<p><em>Why is she still here?  Food Lady, ain&#8217;t you got bacon to fry?</em></p>
<p style="text-align:center;"><a title="My Zombie Dog by shutterboo502, on Flickr" href="http://www.flickr.com/photos/shutterboo502/4124401665/"><img src="http://farm3.static.flickr.com/2656/4124401665_4d21387fab.jpg" alt="My Zombie Dog" width="500" height="333" /></a></p>
<p>OK, so I know I&#8217;ve said before that Chevy sleeps like the living dead.  She&#8217;s completely deaf (yes, deaf as she cannot hear) so when she&#8217;s asleep, usually the only thing that wakes her is a vibration.  Or a cute Chasey Bear pouncing on top of her.  But I say &#8220;living dead&#8221; because she never closes her eyes when she sleeps.  It&#8217;s so gross.  She has something like a third eyelid or some kind of membrane that slips over her eye and it&#8217;s just so <em>blech</em> but I couldn&#8217;t help it.  I had to do it. </p>
<p>Internet, I present to you: <strong>Zombie Dog</strong>.</p>
<p style="text-align:center;"><a title="My Zombie Dog by shutterboo502, on Flickr" href="http://www.flickr.com/photos/shutterboo502/4124401781/"><img src="http://farm3.static.flickr.com/2722/4124401781_5262612f82.jpg" alt="My Zombie Dog" width="500" height="333" /></a></p>
<p style="text-align:center;"><a title="My Zombie Dog by shutterboo502, on Flickr" href="http://www.flickr.com/photos/shutterboo502/4124401897/"><img src="http://farm3.static.flickr.com/2729/4124401897_e76a1e0d9a.jpg" alt="My Zombie Dog" width="500" height="333" /></a></p>
<p style="text-align:center;"><a title="My Zombie Dog by shutterboo502, on Flickr" href="http://www.flickr.com/photos/shutterboo502/4124402013/"><img src="http://farm3.static.flickr.com/2782/4124402013_0928a5e2aa.jpg" alt="My Zombie Dog" width="500" height="333" /></a></p>
<p style="text-align:center;"><a title="My Zombie Dog by shutterboo502, on Flickr" href="http://www.flickr.com/photos/shutterboo502/4124402123/"><img src="http://farm3.static.flickr.com/2770/4124402123_17bcf99456.jpg" alt="My Zombie Dog" width="500" height="333" /></a></p>
<p style="text-align:center;"><a title="My Zombie Dog by shutterboo502, on Flickr" href="http://www.flickr.com/photos/shutterboo502/4124402247/"><img src="http://farm3.static.flickr.com/2609/4124402247_7ce4e15eed.jpg" alt="My Zombie Dog" width="500" height="333" /></a></p>
<p style="text-align:center;"><strong>ZOMBIE DOG!!!</strong></p>
<p style="text-align:center;"><a title="ZOMBIE DOG!! by shutterboo502, on Flickr" href="http://www.flickr.com/photos/shutterboo502/4124402605/"><img src="http://farm3.static.flickr.com/2549/4124402605_7e1e76530a.jpg" alt="ZOMBIE DOG!!" width="500" height="333" /></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[BDD with MSpec and Rhino Auto Mocks (part 2)]]></title>
<link>http://telldontask.wordpress.com/2009/11/19/bdd-with-mspec-and-rhino-auto-mocks-part-2/</link>
<pubDate>Thu, 19 Nov 2009 22:07:07 +0000</pubDate>
<dc:creator>telldontask</dc:creator>
<guid>http://telldontask.wordpress.com/2009/11/19/bdd-with-mspec-and-rhino-auto-mocks-part-2/</guid>
<description><![CDATA[In part 1, we looked at setting up MSpec and writing our first specifications. Now we get on to the ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>In <a href="http://telldontask.wordpress.com/2009/11/10/bdd-with-mspec-and-rhino-auto-mocks/" target="_blank">part 1</a>, we looked at setting up MSpec and writing our first specifications.</p>
<p>Now we get on to the all important implementation stage.</p>
<p>We ended up with these basic specifications by the end of part 1.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:1ca757a8-93ed-4f22-9aab-fcf36de68814" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#ddd;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;">
<li><span style="color:#0000ff;">using</span> Machine.Specifications;</li>
<li style="background:#f3f3f3;">&#160;</li>
<li><span style="color:#0000ff;">namespace</span> MSpecExample.Tests.Controllers</li>
<li style="background:#f3f3f3;">{</li>
<li>&#160;&#160;&#160;&#160;[Subject(<span style="color:#a31515;">&#34;Product Search&#34;</span>)]</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;<span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> <span style="color:#2b91af;">when_product_search_page_requested</span></li>
<li>&#160;&#160;&#160;&#160;{</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;It should_return_product_search_page;</li>
<li>&#160;&#160;&#160;&#160;}</li>
<li style="background:#f3f3f3;">&#160;</li>
<li>&#160;&#160;&#160;&#160;[Subject(<span style="color:#a31515;">&#34;Product Search&#34;</span>)]</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;<span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> <span style="color:#2b91af;">when_asked_for_products_matching_search_term</span></li>
<li>&#160;&#160;&#160;&#160;{</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;It should_retrieve_a_list_of_products_with_titles_containing_the_search_term;</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;It should_return_the_list_of_products_to_the_user;</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;}</li>
<li>&#160;</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;[Subject(<span style="color:#a31515;">&#34;Product Search&#34;</span>)]</li>
<li>&#160;&#160;&#160;&#160;<span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> <span style="color:#2b91af;">when_empty_search_term_entered</span></li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;{</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;It should_return_an_error_message;</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;}</li>
<li>}</li>
</ol></div>
</p></div>
</p></div>
<p>Lets start by implementing the first one (when product search page requested).</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:40976112-f779-4d8e-b6be-373e7f02af6d" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#ddd;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;">
<li>[Subject(<span style="color:#a31515;">&#34;Product Search&#34;</span>)]</li>
<li style="background:#f3f3f3;"><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> <span style="color:#2b91af;">when_product_search_page_requested</span></li>
<li>{</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;<span style="color:#0000ff;">static</span> ProductController _controller;</li>
<li>&#160;</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;Establish context =</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;() =&#62; {</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;_controller = <span style="color:#0000ff;">new</span> ProductController();</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;};</li>
<li style="background:#f3f3f3;">&#160;</li>
<li>&#160;&#160;&#160;&#160;It should_return_product_search_page;</li>
<li style="background:#f3f3f3;">}</li>
</ol></div>
</p></div>
</p></div>
<p>On first glance, the wacky syntax here might put people off. However, once you start writing these tests you tend to see past it to the specs and the tests themselves. </p>
<p>We start by establishing the context for our test, what we need for this test to actually run. In this case it’s the product controller that we’re testing, and so it makes sense to instantiate the product controller and assign it to a field for use within our tests.</p>
<p>Next we need to actually do something, perform the action which we are testing. In this case we’re talking about the user visiting the “product search page” so I will set up the test to call an action on the product controller called <strong>Search</strong>.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:2a2be4e6-e972-4754-a1f5-605d18c80bb0" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#ddd;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;">
<li>[Subject(<span style="color:#a31515;">&#34;Product Search&#34;</span>)]</li>
<li style="background:#f3f3f3;"><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> <span style="color:#2b91af;">when_product_search_page_requested</span></li>
<li>{</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;<span style="color:#0000ff;">static</span> ProductController _controller;</li>
<li>&#160;&#160;&#160;&#160;<span style="color:#0000ff;">static</span> ActionResult _result;</li>
<li style="background:#f3f3f3;">&#160;</li>
<li>&#160;&#160;&#160;&#160;Establish context =</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;() =&#62; { _controller = <span style="color:#0000ff;">new</span> ProductController(); };</li>
<li>&#160;</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;Because of =</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;() =&#62; { _result = _controller.Search(); };</li>
<li style="background:#f3f3f3;">&#160;</li>
<li>&#160;&#160;&#160;&#160;It should_return_product_search_page;</li>
<li style="background:#f3f3f3;">}</li>
</ol></div>
</p></div>
</p></div>
<p>Note how we have created a <strong>Because</strong> statement. In BDD terms this is the behaviour we are testing. As with the controller I store the result of calling this action in a field so we can use it elsewhere in the test.</p>
<p>At this point I should point out that in the spirit of TDD, I am only doing enough at this point to make this compile. So our <strong>Product Controller</strong> currently looks like this.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e85091b4-8a78-413e-be69-2c6244098c57" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#ddd;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;">
<li><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> <span style="color:#2b91af;">ProductController</span> : Controller</li>
<li style="background:#f3f3f3;">{</li>
<li>&#160;&#160;&#160;&#160;<span style="color:#0000ff;">public</span> ActionResult Search()</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;{</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#0000ff;">throw</span> <span style="color:#0000ff;">new</span> NotImplementedException();</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;}</li>
<li>}</li>
</ol></div>
</p></div>
</p></div>
<p>Jumping back to our test, lets test that the behaviour under test (search) does what we expect.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:84e8b6cb-0426-40ff-9ad6-2365b5c42445" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#ddd;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;">
<li>[Subject(<span style="color:#a31515;">&#34;Product Search&#34;</span>)]</li>
<li style="background:#f3f3f3;"><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> <span style="color:#2b91af;">when_product_search_page_requested</span></li>
<li>{</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;<span style="color:#0000ff;">static</span> ProductController _controller;</li>
<li>&#160;&#160;&#160;&#160;<span style="color:#0000ff;">static</span> ActionResult _result;</li>
<li style="background:#f3f3f3;">&#160;</li>
<li>&#160;&#160;&#160;&#160;Establish context =</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;() =&#62; { _controller = <span style="color:#0000ff;">new</span> ProductController(); };</li>
<li>&#160;</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;Because of =</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;() =&#62; { _result = _controller.Search(); };</li>
<li style="background:#f3f3f3;">&#160;</li>
<li>&#160;&#160;&#160;&#160;It should_return_product_search_page =</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;() =&#62; { _result.is_a_view_and().ViewName.ShouldEqual(<span style="color:#a31515;">&#34;Search&#34;</span>); };</li>
<li>}</li>
</ol></div>
</p></div>
</p></div>
<p>Using an extension method (thank you <a href="http://tinyurl.com/nl5jte" target="_blank">James Broome</a> and <a href="http://tinyurl.com/y9uccrh" target="_blank">JP Boodhoo</a>) we can simultaneously check that our result is a view and also get a typed reference to the result (as a ViewResult).</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:5219127d-924b-44d2-b08f-5e4116387f47" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#ddd;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;">
<li><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">class</span> <span style="color:#2b91af;">TestExtensions</span></li>
<li style="background:#f3f3f3;">{</li>
<li>&#160;&#160;&#160;&#160;<span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> ViewResult is_a_view_and(<span style="color:#0000ff;">this</span> ActionResult result)</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;{</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#0000ff;">return</span> result <span style="color:#0000ff;">as</span> ViewResult;</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;}</li>
<li>}</li>
</ol></div>
</p></div>
</p></div>
<p>Now we make the test pass.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:0810fea1-77d7-4c22-b466-06f3c9b9f169" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#ddd;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;">
<li><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> <span style="color:#2b91af;">ProductController</span> : Controller</li>
<li style="background:#f3f3f3;">{</li>
<li>&#160;&#160;&#160;&#160;<span style="color:#0000ff;">public</span> ActionResult Search()</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;{</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#0000ff;">return</span> View(<span style="color:#a31515;">&#34;Search&#34;</span>);</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;}</li>
<li>}</li>
</ol></div>
</p></div>
</p></div>
<p>Finally we run MSpec and marvel at the results <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><a href="http://telldontask.files.wordpress.com/2009/11/image3.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://telldontask.files.wordpress.com/2009/11/image_thumb3.png?w=598&#038;h=240" width="598" height="240" /></a></p>
<p>We still have several not implemented specs, but the one we have implemented now appears as a simple line of text. If there were any problems with the test (if it failed) we would see a red error message by the failing specification.</p>
<p>In <a href="http://telldontask.wordpress.com/2009/11/29/bdd-with-mspec-and-rhino-auto-mocks-part-3/" target="_blank">part 3</a> we’ll look at more complex controller actions and introduce Rhino Auto Mocker.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[A solution for Body Dysmorphic Disorder!]]></title>
<link>http://daniellesheahan.wordpress.com/2009/11/15/a-solution-for-body-dysmorphic-disorder/</link>
<pubDate>Sun, 15 Nov 2009 00:38:21 +0000</pubDate>
<dc:creator>westusk</dc:creator>
<guid>http://daniellesheahan.wordpress.com/2009/11/15/a-solution-for-body-dysmorphic-disorder/</guid>
<description><![CDATA[I read in the newspaper today that this girl who suffered from BDD  has managed to overcome this pro]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I read in the newspaper today that this girl who suffered from BDD  has managed to overcome this problem by looking at pictures of herself looking good,  smiling and so on. I think it is a great idea for anyone with an image problem. Looking in a mirror seems to accentuate all our physical blemishes and so by admiring yourself on  a photograph,  you are actually doing the stuff that we do when we look at a celebrity in the tabloid or magazine.</p>
<p>Worth trying.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[BDD with MSpec and Rhino Auto Mocks (part 1)]]></title>
<link>http://telldontask.wordpress.com/2009/11/10/bdd-with-mspec-and-rhino-auto-mocks/</link>
<pubDate>Tue, 10 Nov 2009 23:40:42 +0000</pubDate>
<dc:creator>telldontask</dc:creator>
<guid>http://telldontask.wordpress.com/2009/11/10/bdd-with-mspec-and-rhino-auto-mocks/</guid>
<description><![CDATA[I’ve long been a fan of test driven development in theory but in practice have experienced many of t]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I’ve long been a fan of test driven development in theory but in practice have experienced many of the issues which turn people off TDD and unit testing in general.</p>
<p>Brittle tests which do too much, tell you very little about the meaning behind the code and are more a hindrance than a help when it comes to making changes at a later date.</p>
<p>Well as you may have guessed, given the title of this post, I have found an answer to these problems in the form of BDD using MSpec and Rhino Automocking. I have been using this approach for a good while now and continue to be pleasantly surprised by just how much fun it is writing my tests, but also how stupidly easy they are to change, and how well they document my project’s requirements.</p>
<p><strong>Update: You can now download the </strong><a href="http://teamcity.codebetter.com/guestAuth/repository/download/bt44/.lastSuccessful/Machine.Specifications-release.zip" target="_blank"><strong>compiled latest release</strong></a><strong> of MSpec directly.</strong></p>
<h3>External Tool</h3>
<p>It’s a good idea to set up an external tool in Visual Studio to run your MSpec tests and produce html output.</p>
<p>Create a new external tool which launches <strong>mspec.exe</strong> with the following arguments.</p>
<p><strong><code>$(TargetName)$(TargetExt) --html &#34;$(ProjectDir)\Report.html&#34;</code></strong></p>
<p>Make sure the initial directory is <strong>$(BinDir)</strong> and tick <strong>Use output window</strong>.</p>
<p><a href="http://telldontask.files.wordpress.com/2009/11/image4.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://telldontask.files.wordpress.com/2009/11/image_thumb4.png?w=469&#038;h=457" width="469" height="457" /></a>&#160;</p>
<h3>Using your favourite Test Runner</h3>
<p>Included in the MSpec download are scripts to configure various test runners to recognise and run MSpec tests.</p>
<p><a href="http://telldontask.files.wordpress.com/2009/11/image5.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://telldontask.files.wordpress.com/2009/11/image_thumb5.png?w=491&#038;h=314" width="491" height="314" /></a> </p>
<p>Simply run the bat file which relates to your build runner and way you go!</p>
<h3>Writing Specifications</h3>
<p>Ensure you add a reference (in your Tests Project) to <strong>Machine.Specifications.dll.</strong></p>
<p>Now the fun begins.</p>
<p>I’ve created an ASP.NET MVC site and empty class library Tests project.</p>
<p>Let’s say we want to create a simple page which allows users to search for a product.</p>
<p>We’ll start by creating a new folder in our tests folder called <strong>Controllers</strong> and add a new class file called <strong>ProductControllerTets.cs</strong></p>
<p>Having discussed this feature in detail with the client, I’ve a pretty good idea of what they want, so I start with the following.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:7a1638e4-1630-4538-9a41-599d5d0dc95b" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#ddd;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;">
<li><span style="color:#0000ff;">using</span> Machine.Specifications;</li>
<li style="background:#f3f3f3;">&#160;</li>
<li><span style="color:#0000ff;">namespace</span> MSpecExample.Tests.Controllers</li>
<li style="background:#f3f3f3;">{</li>
<li>&#160;&#160;&#160;&#160;[<span style="color:#2b91af;">Subject</span>(<span style="color:#a31515;">&#34;Product Search&#34;</span>)]</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;<span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> <span style="color:#2b91af;">when_product_search_page_requested</span></li>
<li>&#160;&#160;&#160;&#160;{</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#2b91af;">It</span> should_return_product_search_page;</li>
<li>&#160;&#160;&#160;&#160;}</li>
<li style="background:#f3f3f3;">&#160;</li>
<li>&#160;&#160;&#160;&#160;[<span style="color:#2b91af;">Subject</span>(<span style="color:#a31515;">&#34;Product Search&#34;</span>)]</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;<span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> <span style="color:#2b91af;">when_asked_for_products_matching_search_term</span></li>
<li>&#160;&#160;&#160;&#160;{</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#2b91af;">It</span> should_retrieve_a_list_of_products_with_titles_containing_the_search_term;</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#2b91af;">It</span> should_return_the_list_of_products_to_the_user;</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;}</li>
<li>&#160;</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;[<span style="color:#2b91af;">Subject</span>(<span style="color:#a31515;">&#34;Product Search&#34;</span>)]</li>
<li>&#160;&#160;&#160;&#160;<span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> <span style="color:#2b91af;">when_empty_search_term_entered</span></li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;{</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#2b91af;">It</span> should_return_an_error_message;</li>
<li style="background:#f3f3f3;">&#160;&#160;&#160;&#160;}</li>
<li>}</li>
</ol></div>
</p></div>
</p></div>
<p>What I particularly like about this, is that you can really think about exactly what you’re doing and express it in code which will eventually become executable tests without actually implementing any code (yet!).</p>
<p>If we now build our test project and run the tests using the console runner via the external tool we set up earlier), we’ll get a <strong>report.html</strong> file in the tests project which looks like this…</p>
<p><a href="http://telldontask.files.wordpress.com/2009/11/image2.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://telldontask.files.wordpress.com/2009/11/image_thumb2.png?w=715&#038;h=460" width="715" height="460" /></a></p>
<p>In <a href="http://telldontask.wordpress.com/2009/11/19/bdd-with-mspec-and-rhino-auto-mocks-part-2/" target="_blank">part 2</a>, we&#8217;ll start implementing these tests.</p>
<p>In <a href="http://telldontask.wordpress.com/2009/11/29/bdd-with-mspec-and-rhino-auto-mocks-part-3/" target="_blank">part 3</a>, we’ll introduce Rhino AutoMocker.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[David Laribee's Leading Lean/Agile Teams]]></title>
<link>http://skillsmatterblog.wordpress.com/2009/11/10/david-laribees-towards-a-new-architect-workshop/</link>
<pubDate>Tue, 10 Nov 2009 15:45:15 +0000</pubDate>
<dc:creator>Skills Matter</dc:creator>
<guid>http://skillsmatterblog.wordpress.com/2009/11/10/david-laribees-towards-a-new-architect-workshop/</guid>
<description><![CDATA[Following on from his successful speaker spots at Skills Matter&#8217;s Progressive .NET tutorials e]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><img class="aligncenter size-full wp-image-23" title="design-driven-design-architecture-lrg" src="http://skillsmatterblog.wordpress.com/files/2009/11/design-driven-design-architecture-lrg.gif" alt="design-driven-design-architecture-lrg" width="450" height="64" /></p>
<p>Following on from his successful speaker spots at Skills Matter&#8217;s Progressive .NET tutorials earlier this year, the talented Mr <a href="http://codebetter.com/blogs/david_laribee/">David Laribee</a> will be hosting a 2-day course at the new Skills Matter eXchange in December.</p>
<p>Over the course of two days we&#8217;ll engage in a diverse array of discussions, exercises, and summary talks aimed toward aspiring and existing technical leads, senior developers, coaches and architects. Participants will leave with actionable techniques and tools for leading their teams toward greater throughput and technical excellence.</p>
<p>In Mr Laribee&#8217;s own words &#8220;We need leaders that can get down and dirty with technology while mentoring and leading people while staying true to product vision. We need an embedded role in software teams like Toyota’s Chief Engineer: someone who brings skill and experience to bare in all areas of product development, product design, user experience, coaching, software craftsmanship, et. al. &#8220;</p>
<p>Places are filling up fast &#8212; so make sure you don&#8217;t miss out on yours: book before November 15 and pay only <strong>£550</strong>+VAT per delegate (RRP: £990).</p>
<p>For more information and to book visit the Skills Matter <a href="http://skillsmatter.com/course/design-architecture/towards-a-new-architect/js-432">site</a> and get your place.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[BDD: A Lean Toolkit  ]]></title>
<link>http://skillsmatterblog.wordpress.com/2009/11/09/bdd-a-lean-toolkit/</link>
<pubDate>Mon, 09 Nov 2009 14:04:40 +0000</pubDate>
<dc:creator>Skills Matter</dc:creator>
<guid>http://skillsmatterblog.wordpress.com/2009/11/09/bdd-a-lean-toolkit/</guid>
<description><![CDATA[In the brain of Elizabeth Keogh: tonight&#8217;s free &#8220;in the brain&#8221; session at Skills M]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><img class="aligncenter size-full wp-image-14" title="agile-testing-lrg" src="http://skillsmatterblog.wordpress.com/files/2009/11/agile-testing-lrg1.gif" alt="agile-testing-lrg" width="450" height="67" /></p>
<p>In the brain of Elizabeth   Keogh: tonight&#8217;s free &#8220;in the brain&#8221; session at Skills Matter is with Elizabeth Keogh and is called &#8220;BDD: A Lean Toolkit&#8221;.</p>
<p>In this talk, Liz Keogh looks at BDD as a Lean toolkit, how to use BDD in conjunction with other Lean tools like Kanban and Value Stream Mapping, BDD anti-patterns, and some pragmatic tips for making BDD flow.</p>
<p>Liz currently works as an independent Agile Coach and trainer based in London. She is a well-known blogger and international speaker, a core member of the BDD community and a contributor to a number of open-source projects including JBehave.256256256</p>
<p>For more info and to register for the event, visit <a title="bdd-a-lean-toolkit" href="http://skillsmatter.com/podcast/agile-testing/bdd-a-lean-toolkit" target="_blank">Skills Matter</a> and sign up &#8212; but hurry, spaces are limited and the event starts at 1830 this evening!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[jbehave 2.3]]></title>
<link>http://codification.wordpress.com/2009/11/09/jbehave-2-3/</link>
<pubDate>Mon, 09 Nov 2009 08:15:38 +0000</pubDate>
<dc:creator>cloudberry</dc:creator>
<guid>http://codification.wordpress.com/2009/11/09/jbehave-2-3/</guid>
<description><![CDATA[My favourite java testing framework, jbehave, released a new version a couple of weeks ago. New impr]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>My favourite java testing framework, <a title="jbehave" href="http://jbehave.org/">jbehave</a>, released a <a title="new version" href="http://jbehave.org/2009/10/10/jbehave-2-3-released/">new version</a> a couple of weeks ago. New improvements that I like include:</p>
<ul>
<li>@Named annotation for parameters allowing you to step parameters any way you like</li>
<li>@Alias annotation allowing you to match multiple scenario lines to a single Step implementation</li>
<li>GivenScenario keyword allows you to include another scenario as prerequisite.</li>
</ul>
<p>I am excited to see that development of the jbehave framework is not merely sustained. The framework is constantly being improved and new features being introduced.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Il n'y a pas plusieurs versions originales]]></title>
<link>http://morisset.wordpress.com/2009/11/04/il-ny-a-pas-plusieurs-versions-originales/</link>
<pubDate>Wed, 04 Nov 2009 07:13:45 +0000</pubDate>
<dc:creator>Dr. Morisset</dc:creator>
<guid>http://morisset.wordpress.com/2009/11/04/il-ny-a-pas-plusieurs-versions-originales/</guid>
<description><![CDATA[Ce week-end nous avons été invités à déjeuner chez des amis de ma femme. Ils étaient plus jeunes que]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:justify;">Ce week-end nous avons été invités à déjeuner chez des amis de ma femme. Ils étaient plus jeunes que nous et avaient des points de vue idéalistes sur à peu près tout : le gouvernement c&#8217;était de la merde, les flics c&#8217;était des schmidt, les pollueurs des enculés. J&#8217;ai eu l&#8217;impression que j&#8217;assistais à un concert de Sinsemilla. Autant dire qu&#8217;une fois que je leur ai demandé de me regarder afin de leur montrer que je n&#8217;étais pas un trafiquant d&#8217;armes, ma réserve de blagues était épuisée. Je ne sais pas gérer ce public là moi.</p>
<p style="text-align:justify;">Je me suis fait chier copieusement mais, et c&#8217;est important parce qu&#8217;elles immortalisent le moment, j&#8217;ai réussi à tromper mon monde sur les photos.</p>
<p><a href="http://morisset.wordpress.com/files/2009/11/morisse.jpg"><img class="aligncenter size-medium wp-image-2613" title="morissé" src="http://morisset.wordpress.com/files/2009/11/morisse.jpg?w=300" alt="morissé" width="300" height="200" /></a></p>
<p><!--more--></p>
<p style="text-align:justify;">Le calvaire s&#8217;est prolongé jusque dans le métro puisque Kevin et Jane prenaient la même ligne que nous.</p>
<p style="text-align:justify;"><a href="http://morisset.wordpress.com/files/2009/11/bzoubzou.jpg"><img class="aligncenter size-medium wp-image-2617" title="bzoubzou" src="http://morisset.wordpress.com/files/2009/11/bzoubzou.jpg?w=300" alt="bzoubzou" width="300" height="225" /></a></p>
<p style="text-align:justify;">&#8220;Kevin et Jane&#8221; quoi&#8230; A mon époque, les seules personnes qu&#8217;on pouvait voir avec des prénoms pareils c&#8217;était les personnages de Dynastie.</p>
<p style="text-align:justify;"><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/xrg1zod8IjI&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' /><param name='allowfullscreen' value='true' /><param name='wmode' value='transparent' /><embed src='http://www.youtube.com/v/xrg1zod8IjI&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='transparent'></embed></object></span></p>
<p style="text-align:justify;">La différence d&#8217;âge et de sagesse nous séparant était trop flagrante. Je profitais d&#8217;un moment de silence pour laisser mes yeux se promener sur la banquette d&#8217;à côté où était échoué un programme TV. Au dos de ce programme, une publicité.</p>
<p><a href="http://morisset.wordpress.com/files/2009/11/p1050521.jpg"><img class="aligncenter size-full wp-image-2614" title="P1050521" src="http://morisset.wordpress.com/files/2009/11/p1050521.jpg" alt="P1050521" width="655" height="491" /></a></p>
<p style="text-align:justify;">Kevin, récemment diplômé de son <strong>école de commerce</strong>, cru sentir un intérêt dans mes yeux. Il me dit :</p>
<blockquote>
<p style="text-align:justify;">Vous savez Mr Morisset, moi aussi j&#8217;aime bien ce genre de trucs!</p>
</blockquote>
<p style="text-align:justify;">Moi j&#8217;aime surtout qu&#8217;on m&#8217;appelle &#8220;Docteur&#8221;.</p>
<blockquote>
<p style="text-align:justify;">J&#8217;ai fait <strong>marketing</strong> à l&#8217;école. Ça me fascine ce genre d&#8217;opérations. Je peux pas m&#8217;empêcher d&#8217;imaginer quel est le <strong>taux de retour</strong>. En termes de <strong>BDD</strong> ça doit être énorme.</p>
</blockquote>
<p style="text-align:justify;">Je ne savais pas ce que le mot <em><strong>BDD</strong></em> voulait dire. Je le regardais sans rien dire, avec un sourire plus poli qu&#8217;approbateur. Les maigres espoirs que j&#8217;avais en Kevin s&#8217;envolaient avec ses paroles. Mais qu&#8217;est-ce qu&#8217;on était en train de foutre avec des tocards pareil?</p>
<p style="text-align:justify;">Bien loin de moi l&#8217;idée de juger les passions des autres, chacun aime ce qu&#8217;il veut. Mais personnellement le premier truc auquel je pense en voyant cette pub c&#8217;est de m&#8217;imaginer la tête des gens qui achètent le foie gras uniquement dans le but de récupérer la montre (bracelet cuir) et le service à fromage (en bois).</p>
<p style="text-align:center;">EXEMPLE</p>
<p><a href="http://morisset.wordpress.com/files/2009/11/200299623-001.jpg"><img class="aligncenter size-medium wp-image-2615" title="200299623-001" src="http://morisset.wordpress.com/files/2009/11/200299623-001.jpg?w=300" alt="200299623-001" width="300" height="202" /></a></p>
<p style="text-align:justify;">Il finit de m&#8217;achever, passant du coq à l&#8217;âne, en disant qu&#8217;il avait vu &#8220;This is it&#8221; mais qu&#8217;il regrettait que ça ne soit pas en version française. Il rajouta que c&#8217;était dommage que les films soient en V.O. au cinéma. Je serrais les dents pour garder le contrôle de mes nerfs. Je ne connaissais pas cet abruti. J&#8217;allais bientôt ne plus jamais le revoir de ma vie. Il n&#8217;était pas nécessaire de gueuler en plein dans le métro.</p>
<p style="text-align:justify;">Mais je l&#8217;avais mauvaise. Car la <strong>version française</strong>, ça fait mal. Je repense particulièrement à la <strong>version française </strong>du Big Legowski.</p>
<p><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/XczJqembVto&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' /><param name='allowfullscreen' value='true' /><param name='wmode' value='transparent' /><embed src='http://www.youtube.com/v/XczJqembVto&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='transparent'></embed></object></span></p>
<p>Ou à celle du Shining.</p>
<p><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/kaa0dbrYGZM&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' /><param name='allowfullscreen' value='true' /><param name='wmode' value='transparent' /><embed src='http://www.youtube.com/v/kaa0dbrYGZM&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='transparent'></embed></object></span></p>
<p>Globalement La Vie est Belle n&#8217;avait aucun intérêt en Français non plus.</p>
<p><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/pjBm6cmoVvc&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' /><param name='allowfullscreen' value='true' /><param name='wmode' value='transparent' /><embed src='http://www.youtube.com/v/pjBm6cmoVvc&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='transparent'></embed></object></span></p>
<p>Même les publicités doublées sont nulles.</p>
<p><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/56W7CUAUptg&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' /><param name='allowfullscreen' value='true' /><param name='wmode' value='transparent' /><embed src='http://www.youtube.com/v/56W7CUAUptg&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='transparent'></embed></object></span></p>
<p style="text-align:justify;">C&#8217;est vrai, le métier de doubleur n&#8217;est pas facile. Il faut qu&#8217;il s&#8217;approprie le personnage, la scène. Ce n&#8217;est pas toujours évident. Certains films s&#8217;en sont pas mal sortis. Je pense au premier Batman ou à la trilogie des Retour vers le Futur. Mais dans l&#8217;ensemble la <strong>version française</strong> est une abomination.</p>
<p style="text-align:justify;">Au moment de se dire au revoir, je dis quand même à Kevin que c&#8217;était bien la peine de faire chier avec un prénom pareil.</p>
<p style="text-align:justify;">Une fois rentré dans l&#8217;intimité de notre chez nous, autant dire que j&#8217;ai demandé des explications à ma femme dans l&#8217;unique langue que cette petite garce comprenne : la langue de la castagne.</p>
<p><a href="http://morisset.wordpress.com/files/2009/11/equipement-de-boxe-en-ligne-id86.jpg"><img class="aligncenter size-medium wp-image-2616" title="equipement-de-boxe-en-ligne-id86" src="http://morisset.wordpress.com/files/2009/11/equipement-de-boxe-en-ligne-id86.jpg?w=200" alt="equipement-de-boxe-en-ligne-id86" width="200" height="300" /></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[What do test first development and dental floss have in common?]]></title>
<link>http://highaltitudehacking.wordpress.com/2009/11/03/test-first-development-flossing/</link>
<pubDate>Tue, 03 Nov 2009 18:54:05 +0000</pubDate>
<dc:creator>Mike Gehard</dc:creator>
<guid>http://highaltitudehacking.wordpress.com/2009/11/03/test-first-development-flossing/</guid>
<description><![CDATA[Yes I am going to write another blog posting singing the praises of test first development (be it TD]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Yes I am going to write another blog posting singing the praises of test first development (be it TDD, BDD or whatever DD is cool now).  What will be new is that I&#8217;m going to compare it to something that I avoided doing for almost 36 years on this planet, flossing my teeth regularly.</p>
<p><!--more--></p>
<p>Six months ago I was told by my dental hygienist that my gums were not doing so well in terms of health.  This made for a somewhat uncomfortable (ok it was downright painful) dental cleaning.  She said that flossing was really the key to keeping my gums healthy, keeping my teeth in my mouth and making visits to the dentist more &#8220;enjoyable&#8221;.  I took it upon myself to help myself by flossing more regularly.  Yes I missed a couple of days but for the most part I flossed every day.  It really only takes 5 minutes at most to do a good job in there&#8230;which you can easily make up by reading 5 less minutes of the Internet (or at least this is how I found the time).  Today&#8217;s cleaning was a breeze compared to last time.  Yes it was still a little uncomfortable but nothing compared to the last time.</p>
<p>So what does this have to do with test first development?  We&#8217;ll just this morning (before the dentist&#8217;s visit) I was in the process of refactoring a bunch of Rails code to add a new object hierarchy for some new requirements.  To make a long story short, my refactoring broke a bunch of code (as one would expect).  Thanks to our suite of existing spec code, I now had a laundry list of tasks that were needed to properly integrate the new code.  After addressing all of them and tweaking some views (we don&#8217;t have view specs but hey nobody is prefect), I fired up the app and it all just worked.  Until I started working on Rails sites, all of that spec code would not have existed.</p>
<p>I couldn&#8217;t imagine what might have happened had we not taken the TFD (test first development) route with this project.  Yes it takes a little more time up front to write the tests (just like flossing) but the next time you have to do some major work in your application (which is regular just like visiting the dentist&#8217;s office)  the experience won&#8217;t be as painful as it could be.</p>
<p>Today&#8217;s experiences with TFD as well as the dentist office have made me a firm believer that both regular TFD and regular flossing makes my life a little easier.  I vow to no longer look at writing tests as wasted time but an investment in pain saved down the road.  I hope that anyone that reads this either starts doing test first development, or maybe even flosses a little more regularly and uses this analogy when preaching the wonders of TFD.</p>
<p>&#8211; Mike Gehard</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Cucumber: Making UATs the healthy choice]]></title>
<link>http://twoguysarguing.wordpress.com/2009/11/01/cucumber-making-uats-the-healthy-choice/</link>
<pubDate>Sun, 01 Nov 2009 18:23:43 +0000</pubDate>
<dc:creator>benjaminplee</dc:creator>
<guid>http://twoguysarguing.wordpress.com/2009/11/01/cucumber-making-uats-the-healthy-choice/</guid>
<description><![CDATA[My current project team has been eating its vegetables.  Has yours? Selenium is a great tool for tes]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:center;"><span style="color:#008000;"><strong><em>My current project team has been eating its vegetables.  Has yours?</em></strong></span></p>
<p><strong><a href="http://seleniumhq.org/" target="_blank">Selenium</a></strong> is a great tool for testing webapps from a true browser driven user&#8217;s perspective.  By driving most mainstream browsers via a core Javascript library, a Selenium script can easily test how your app behaves (or misbehaves) just like a real user would see.</p>
<p>&#8220;<strong><a href="http://wiki.github.com/brynary/webrat" target="_blank">Webrat</a></strong> lets you quickly write robust and thorough acceptance tests for a web application.&#8221;  Written in Ruby, Webrat allows acceptance tests to exercise an arbitrary web application through its Selenium integration, or Rails apps without starting a server.</p>
<p><a href="http://cukes.info/"><strong>Cucumber</strong></a> allows code to be written in a simple domain specific language (DSL) that anyone can read.  Layer Cucumber on top of Webrat and Selenium, and you have User Acceptance Tests (UATs) that the client can read (and ideally write), that the entire development team understands, and which can be run as BDD or regression tests.</p>
<div class="wp-caption aligncenter" style="width: 310px"><a href="http://cukes.info/"><img title="Cucumber example taken from cuckes.info" src="http://cukes.info/images/feature.png" alt="Cucumber example taken from cuckes.info" width="300" height="143" /></a><p class="wp-caption-text">Cucumber example taken from cuckes.info</p></div>
<p>Without going into the details of how each of these libraries work, below are some of my notes, tips, and impressions of using Cucumber to write UATs for a greenfield Java EE application over the past ~10 weeks.</p>
<ul>
<li>Ideally, each test would run in its own transaction so that they wouldn&#8217;t interfere with each other and could be run in parallel.  Using Cucumber (Ruby) to test a totally separate web application running on <a href="http://tomcat.apache.org/" target="_blank">Tomcat</a> (Java) presents a problem.  The team debated several possible solutions using JRuby and having the Cucumber build spawn an embedded Tomcat instance but decided that the cost outweighed the benefit to the current project.</li>
<li>Since we were forced to use pure JDBC by our client, we decided to use ActiveRecord migrations to build our tables, and generate SQL which we could re-leverage from our Cucumber tests.  Custom creation Webrat steps were written to push setup test data for each model.</li>
<li>DB2 support with the Ruby ActiveRecord drivers is lacking proper install instructions on Linux (damn thing requries a full DB2 install to run). By leveraging <a href="http://jruby.org/" target="_blank"><strong>JRuby</strong></a>, we were able to use the DB2 JDBC drivers instead which worked much better (without installing DB2).  Getting Cucumber, Webrat, and Selenium running in JRuby took a bit of finesse and <a href="http://rubyforge.org/pipermail/rubygems-developers/2008-April/003779.html" target="_blank">shebang wrangling</a> but eventually worked.</li>
<li>Outputting Cucumber results to a JUnit style XML output made our integration on our <a href="https://hudson.dev.java.net/" target="_blank">Hudson</a> CI server simple and easy to read. (<em>The <a href="http://wiki.hudson-ci.org/display/HUDSON/ChuckNorris+Plugin" target="_blank">Chuck Norris plugin</a> helps too</em>)</li>
<li>We tag each test with a story number (e.g. @10045) so that we can quickly run all tests for a given feature easily: cucumber &#8211;tags @10045.</li>
<li>Our QA lead works to define and write-up our Cucumber tests during pre-iteration planning and before each story enters our work queue (the team uses a modified <a href="http://en.wikipedia.org/wiki/Kanban" target="_blank">Kanban</a> board approach to pull work through each iteration, Cucumber is our first queue).  When she has a test written, she will tag it with @in-process to let us know that it is ready to be worked on, but not yet implemented.</li>
<li>We have custom Rake tasks to run all of our &#8220;finished&#8221; tests as well as just our &#8220;in-process&#8221; ones.  The in-process task will fail if any tests pass (they should be marked as finished).  Unfortunately this rake task doesn&#8217;t work with the Hudson/JUnit build.</li>
<li>Ongoing issues we still struggle with are:
<ul>
<li>making sure that small variations in DSL verbiage don&#8217;t muddy up our tests (it is easy for the team to accidentally end up with two different commands which do the same or similar actions without a clear distinction)</li>
<li>cross browser and separate environment testing happens on different dedicated servers on dependent builds so that they don&#8217;t end up stepping on each other</li>
<li>as it is with any testing library, care needs to be taken to keep only common tests grouped together and setup/background work common to all tests that NEED it.  Pushing too much work into common actions results in slow tests</li>
<li>Tests are supremely faster and more valuable than manual tests, but are not as fast as JUnit tests and will never replace manual exploratory testing.</li>
</ul>
</li>
</ul>
<p>Overall the team has been very pleased with our ability to drive our development from the tests and verify that new changes don&#8217;t break existing functionality from the users&#8217; perspectives.</p>
<p><em>* Another Asynchrony team is working on leveraging <a href="http://wiki.github.com/aslakhellesoy/cuke4duke" target="_blank"><strong>Cuke4Duke</strong></a> to do similar testing of a Java thick client.  Should be interesting.</em></p>
<p style="text-align:center;"><em><span style="color:#008000;">Edit: Thanks to Amos King for some proof reading help.  You can find his blog over at <a href="http://www.dirtyinformation.com/" target="_blank">Dirty Information</a>.</span><br />
</em></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[en: Introduction to Test Driven Development]]></title>
<link>http://danielwildt.wordpress.com/2009/10/31/en-introduction-to-test-driven-development/</link>
<pubDate>Sat, 31 Oct 2009 18:34:24 +0000</pubDate>
<dc:creator>dwildt</dc:creator>
<guid>http://danielwildt.wordpress.com/2009/10/31/en-introduction-to-test-driven-development/</guid>
<description><![CDATA[So, I have done one presentation about Test Driven Development yesterday, touching TDD concepts and ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>So, I have done one <a href="http://www.slideshare.net/dwildt/introduction-to-test-driven-development">presentation about Test Driven Development</a> yesterday, touching <a href="http://www.agiledata.org/essays/tdd.html">TDD concepts</a> and also lots of concepts about <a href="http://dannorth.net/introducing-bdd">Behavior Driven Development (BDD)</a>. </p>
<p><!-- SlideShare error: doc is missing or has illegal characters /[^-_a-zA-Z0-9]/ --></p>
<p>There are simple concepts about the test first process. You have to write a test that fails, write code to make the test pass and then refactor your code. Keep the bar green to keep the code clean, remember this. </p>
<p>Repeat this cycle until you don’t have anything else to test for a specific feature. </p>
<p>Looking at a <a href="http://xp123.com/xplor/xp0308/index.shtml">User Story</a> and its acceptance tests, you also have to make sure you are adding business value on every test. </p>
<p>Simple right? </p>
<p>Well, you have to practice. </p>
<p>A lot. </p>
<p>Really. </p>
<p>I&#8217;m not kidding.</p>
<p>Believe me.</p>
<p>By the way, don&#8217;t leave <a href="http://martinfowler.com/bliki/TechnicalDebt.html">technical debt</a> behind. </p>
<p><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/pqeJFYwnkjE&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' /><param name='allowfullscreen' value='true' /><param name='wmode' value='transparent' /><embed src='http://www.youtube.com/v/pqeJFYwnkjE&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='transparent'></embed></object></span></p>
<p>Just for information, currently I manage teams developing in Java (Web), Java (Mobile) and Delphi (Desktop/WebBroker). </p>
<p>Looking at Java Web, I&#8217;m starting to teach teams how to use <a href="http://junit.sourceforge.net/">JUnit</a> for automated unit tests, and code coverage with <a href="http://emma.sourceforge.net/">Emma</a> and <a href="http://www.eclemma.org/">EclEmma</a> (Eclipse Plug-in).</p>
<p>For Java Mobile, the solution will be based on <a href="http://j2meunit.sourceforge.net/">J2ME Unit</a> and <a href="http://www.cobertura4j2me.org/">Cobertura for Java ME</a>. </p>
<p>And Delphi, we are going with <a href="http://dunit.sourceforge.net/">DUnit</a> and <a href="http://www.cyamon.com/discover1.htm">Delphi Discover</a>, a Coverage Tool for Delphi programmers. </p>
<p>And also looking at test automation, both Delphi and Java Web apps will use <a href="http://seleniumhq.org/">Selenium</a> to help on automation of web processes. </p>
<p>Well, you can wait more articles on each of those tools and relation to Agile Development and <a href="http://xprogramming.com/xpmag/whatisxp">eXtreme Programming practices</a>.</p>
<p>So, remember: you are build tests for <strong>prevention</strong> of defects. With this you are also building tests to do regression testing. </p>
<p>Keep quality high, always.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Experiencia Agil09]]></title>
<link>http://sebasjm.wordpress.com/2009/10/29/experiencia-agil09/</link>
<pubDate>Fri, 30 Oct 2009 00:03:35 +0000</pubDate>
<dc:creator>Sebastian Javier Marchano</dc:creator>
<guid>http://sebasjm.wordpress.com/2009/10/29/experiencia-agil09/</guid>
<description><![CDATA[En la semana del 6 al 9 octubre tuve la oportunidad de presenciar las charlas de la jornada latinoam]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>En la semana del 6 al 9 octubre tuve la oportunidad de presenciar las charlas de la jornada latinoamericana de Agiles 2009 y el curso de TDD dictado por <a href="http://agilefaqs.com/">Naresh Jain</a>. Fue una excelente experiencia, no solo por el valor técnico si no también por la calidad humana y disposición de cada uno de los disertantes y organizadores para satisfacer cada una de las inquietudes.</p>
<p>El curso de TDD fue muy bueno, Naresh demostró la importancia de tener un mecanismo de evaluación constante y automatizado para tener siempre una retroalimentación del estado del producto, aplicó el concepto de TDD con analogías sencillas sin alejarse de los casos reales de desarrollo de software y fue muy pragmático todo el tiempo.<br />
Al finalizar el curso, salí con una idea mucho más clara sobre el significado de Unit Testing, sus beneficios, mitos y limitaciones. Los temas que se tocaron fueron en un principio XP, Pair Programing, Metodologías Agiles, Test Driven Development, Test Driven Design, Code Smells y Automated Refactoring, para después sumar herramientas para aplicar tanto TDD como BDD. Entre cada tema se plantearon cuales son los errores comunes, los patrones de diseño y las implementaciones en diferentes lenguajes: Java, .Net principalmente, pero sin dejar de lado Python, C/C++, Ruby entre otros. Cabe destacar que por la cantidad de los temas tratados, todos los participantes concluimos que el título designado &#8220;Test Driven Development (TDD) and Refactoring&#8221; no era el adecuado, puesto que el mismo no daba a conocer la totalidad de la temática del curso.<!--more Seguir leyendo--><br />
Los seminarios que presencié los días restantes fueron muy variados.<br />
Los mas destacados fueron:<br />
* A cargo de Alejandra Alfonso y Emilio Gutter escuché sobre experiencias en implementaciones de metodologías agiles en un grupo multicultural y remoto.<br />
* Un Coding Dojo y un Testing Dojo, el CO a cargo de Ivan Sanchez y Victor Hugo Germano y el TO a cargo de Jorge Alberto Diz, ambos excelentes.</p>
<p>Todo esto potenciado por la participación de Brian Marick, Diana Larsen, Roy Singham, David Hussman, Joshua Kerievsky, Dave Nicolette y sus respectivos key note, cursos y/o charlas.</p>
<p>En conclusión, una experiencia muy completa desde lo profesional y lo personal de la que no dejé de aprender en cada minuto.</p>
<p>Espero poder sumarme al equipo y vamos por Agiles 2010 empujando los limites tecnológicos de América Latina demostrando que acá también podemos tener eventos de vanguardia y de excelente calidad.</p>
<p>Un &#8216;mil gracias!&#8217; para todos lo que hicieron posible Agiles2009 en especial a <strong>Alejandra Alfonso</strong>, a <strong><a href="http://softwareagil.blogspot.com/">Juan Gabardini</a></strong>, a <strong><a href="http://malditacomedia.blogspot.com/">Victor Hugo Germano</a></strong> por la buena onda. Y uno mucho mas especial a <strong>Romina Cordoba</strong>, que sin ella no podría haber participado de todo esto <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://sebasjm.wordpress.com/files/2009/10/sungundrule.jpg"><img src="http://sebasjm.wordpress.com/files/2009/10/sungundrule.jpg" alt="cena" title="cena" width="510" height="382" class="alignnone size-full wp-image-217" /></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[A brief introduction to Behaviour-Driven Development]]></title>
<link>http://codingbone.wordpress.com/2009/10/26/a-brief-introduction-to-behaviour-driven-development/</link>
<pubDate>Mon, 26 Oct 2009 11:32:55 +0000</pubDate>
<dc:creator>brass-kazoo</dc:creator>
<guid>http://codingbone.wordpress.com/2009/10/26/a-brief-introduction-to-behaviour-driven-development/</guid>
<description><![CDATA[Behavior-Driven Development (BDD) is a methodology developed by agile developer Dan North in 2006. I]]></description>
<content:encoded><![CDATA[Behavior-Driven Development (BDD) is a methodology developed by agile developer Dan North in 2006. I]]></content:encoded>
</item>
<item>
<title><![CDATA[Especificando validações com Scala, Specs e Lift – Parte II]]></title>
<link>http://codemountain.wordpress.com/2009/10/20/especificando-validacoes-com-scala-specs-e-lift-parte-ii/</link>
<pubDate>Tue, 20 Oct 2009 10:55:10 +0000</pubDate>
<dc:creator>paulosuzart</dc:creator>
<guid>http://codemountain.wordpress.com/2009/10/20/especificando-validacoes-com-scala-specs-e-lift-parte-ii/</guid>
<description><![CDATA[No último Post tivemos uma visão inicial do uso de Specs, BDD e um exemplo de utilização do framewor]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:justify;">No <a href="http://codemountain.wordpress.com/2009/10/14/especificando-validacoes-com-scala-specs-e-lift-i/" target="_blank">último Post</a> tivemos uma visão inicial do uso de Specs, BDD e um exemplo de utilização do framework. Mas como você deve ter percebido, as especificações eram blocos de códigos ainda soltos no Post. Specifications são objects ou classes Scala, vejamos como declarar a especificação do post anterior, configurar uma sessão Lift, criar um contexto de execução das especificações, e por fim estender o framework Specs com Matchers personalizados.</p>
<pre class="brush: scala;">
object TodoSpec extends Specification with Contexts {

    &#34;Create/Update a ToDo item&#34; should {
       //... spec from last post.
    }

   //Inicia um sessão Lift
    val session = new LiftSession(&#34;&#34;, StringHelpers.randomString(20),
                                                new MockHttpSession, null)
   //Executa a dentro da sessão Lift
   def inSession(a: =&#62; Any) = {
        S.initIfUninitted(session) { a }
    }

   //Novo usuário para execução da especificação
    def loginUser = inSession {
        val user = User.create
        user.email(&#34;tester@gmail.com&#34;).password(&#34;xxxxxx&#34;)
        user.save
        User.logUserIn(user)
    }

    //Contexto de execuão da Especificação
    new SpecContext {
        //Estabelece Conexão com o banco antes da execução.
        beforeSpec {
            if (!DB.jndiJdbcConnAvailable_?)
            DB.defineConnectionManager(DefaultConnectionIdentifier,
                                                     DBVendor)
            loginUser //Acontece o login do usuário
        }
        aroundExpectations(inSession(_))

        //Remove o usuário de teste
        afterSpec {
            val user = User.find(By(User.email, &#34;tester@gmail.com&#34;))
            User.delete_!(user.open_!)
        }
    }
}
class TodoSpecTest extends JUnit4(TodoSpec)
</pre>
<p style="text-align:justify;">Uma especificação é um objeto que extends a classe <strong>org.specs.Specification</strong>. Specification oferece um conjunto de <a href="http://codemountain.wordpress.com/2009/08/01/scala-implicits-options-and-pattern-match-to-start-with-rabbitmq/" target="_blank">conversores implícitos</a> para Strings, por isso os métodos <strong>should</strong>, <strong>in</strong> e <strong>&#62;&#62;</strong> aparentam serem invocados a partir das strings que descrevem a especificação.</p>
<p style="text-align:justify;">Como todo teste que deve acontecer dentro de um contexto (jndi, spring, hibernate, ejb3, etc), precisamos de um código extra para usarmos recursos do Lift e definir um contexto para a execução da especificação. Por isso, aqui usamos a <a href="http://code.google.com/p/specs/wiki/DeclareSpecifications#Specification_context_(_from_1.6.1_)" target="_blank">trait Contexts</a> e criamos uma nova instância de SpecContext com os métodos <em>beforeSpec</em> fazendo a conexão com a base de dados e <em>aroundExpectations</em> garantindo que a especificação ocorra dentro da sessão Lift criada.</p>
<p style="text-align:justify;">Com Specs, você pode visulizar o resultado das execuções na sua IDE como se fossem testes JUnit. Por isso a TodoSpec é um objecto e há uma classe TodoSpecTest que extends org.specs.runner.JUnit4. O objeto da especificação é passado como construtor do runner de JUnit4. Assim temos a execução da especificação integrada com a IDE. Veja outras formas executá-las <a href="http://code.google.com/p/specs/wiki/RunningSpecs" target="_blank">aqui</a>.</p>
<p style="text-align:justify;">Usamos o próprio Lift Test Kit  uma instância de HttpSession (<em>new MockHttpSession</em>), assim podemos instanciar corretamente uma sessão Lift.</p>
<p style="text-align:justify;">
<p style="text-align:justify;">Para a execução dos testes vamos precisar das dependências abaixo. Lembre-se de instalar no seu repositório local Maven a versão SNAPSHOT do Specs 1.6.1 encontrado <a href="http://code.google.com/p/specs/wiki/DeclareSpecifications#Specification_context_(_from_1.6.1_)" target="_blank">aqui</a>.</p>
<pre class="brush: xml;">
        &#60;dependency&#62;
            &#60;groupId&#62;org.scala-tools.testing&#60;/groupId&#62;
            &#60;artifactId&#62;specs&#60;/artifactId&#62;
            &#60;version&#62;1.6.1&#60;/version&#62;
            &#60;scope&#62;test&#60;/scope&#62;
        &#60;/dependency&#62;
        &#60;dependency&#62;
            &#60;groupId&#62;net.liftweb&#60;/groupId&#62;
            &#60;artifactId&#62;lift-testkit&#60;/artifactId&#62;
            &#60;version&#62;1.0&#60;/version&#62;
            &#60;scope&#62;test&#60;/scope&#62;
        &#60;/dependency&#62;
</pre>
<p style="text-align:justify;">Outro ponto importante do framework Specs, é a sua extensibilidade. Podemos criar Matchers tão poderosos quanto queiramos para oferecer um melhor suporte à linguagem única utilizada no negócio do sistema. Supondo que a especificação descreva que um usuário logado no sistema deve ser um usuário Gmail, podemos criar nosso próprio matcher para tornar nossa especificação mais natural. Vamos adicionar o seguinte sistema para especificar o comportamento do nosso matcher, facilitando o entendimento:</p>
<pre class="brush: scala;">
    &#34;A logged user&#34; should {
        &#34;be a Gmail user&#34; in {
            val user = User.currentUser.open_!
            user.email.asString must beAtGmail
        }
    }
</pre>
<p style="text-align:justify;">beAtGamil é um matcher definido em um object que pode conter diversos matchers customizados. Até aqui temos apenas um matcher:</p>
<pre class="brush: scala;">
object CustomMatcherSpec extends Specification {
    &#34;beAtGmail&#34; can {
        &#34;assert users at Gmail&#34; in {
            &#34;paulosuzart@gmail.com&#34; must beAtGmail
        }
    }
}

object CustomMatcher {
    import java.util.regex.Pattern
    val beAtGmail = new Matcher[String]{
        def apply(m : =&#62; String) = {
            val pattern = Pattern.compile(&#34;.+\\@gmail.com&#34;)
                                      (pattern.matcher(m).matches,
                        m + &#34; is at Gmail&#34;,  m + &#34; is not at Gmail&#34;)
        }
    }
}
class CustomSpecTest extends JUnit4(CustomMatcherSpec)
</pre>
<p>Não podemos esquecer de um executor JUnit4 para a integração com a IDE. Seguindo os passos do post passado, você pode ver o resultado das especificações do sistema ToDo e a especificação do Matcher customizado.</p>
<p>BDD é sem dúvida uma metodologia com grande potencial de expansão no mercado e torço pra que muito em breve apareçam oportunidades com tecnologias e metodologias como essas.</p>
<p>Ainda não sei dizer em qual a dimensão de projeto o BDD é mais apropriado, talvez as mesmas dimensões onde TDD e DDD são aplicáveis.</p>
<p>Detalhes como as classes DB, S e todos os fontes do Post, você vai encontrar na aplicação disponibilizada no meu repositório <a href="http://github.com/paulosuzart/todo/" target="_blank">github.</a> Reforço que o projeto froi criado seguindo o tutorial de <a href="http://www.liftweb.net/docs/getting_started.html" target="_blank">Getting Started do Lift</a> e modificado para a construção do Post. E não se esqueça de me seguir no <a href="twitter.com/paulosuzart" target="_blank">Twitter</a>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[My vitriol (let me show you it)]]></title>
<link>http://comradesnarky.wordpress.com/2009/10/18/my-vitriol-let-me-show-you-it/</link>
<pubDate>Sun, 18 Oct 2009 19:54:59 +0000</pubDate>
<dc:creator>Comrade Snarky</dc:creator>
<guid>http://comradesnarky.wordpress.com/2009/10/18/my-vitriol-let-me-show-you-it/</guid>
<description><![CDATA[“That boy’s got a lot of quit in him” – Ron White My ex-husband used to tell me I had an absurd sens]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>“That boy’s got a lot of quit in him” – Ron White</p>
<p>My ex-husband used to tell me I had an absurd sense of self-entitlement, usually when I was bemoaning my writing “career”, or lack thereof, or whining when I wasn’t allowed to buy something frivolous, like shoes. His turn of phrase was both wrong and right with regard to my writing – I ought to actually do enough of it, and then make efforts to disseminate it, before I could justifiably complain that my genius is being ignored. However, I’ll never not believe that it’s not self-entitlement on my part, but a frustration with how the movie industry runs vs. how it was purported to run based on the flattery offered me by the higher-ups at my film school. They made sure I got my money’s worth by filling my head with compliments, and good on them &#8230; except compliments get you nowhere if your daddy doesn’t know someone (or <em>is</em> someone.)</p>
<p>Oh, and then there&#8217;s the lassitude. I’m full of lots and lots of lassitude. It’s a fancier, SAT-approved way of saying I’m fucking lazy. I can’t be bothered to force myself to write. If it isn’t surging from my strong pen hand, it isn’t happening.</p>
<p>The ex was wrong about self-entitlement vis-à-vis purchases. There is never anything frivolous about a great new pair of shoes.</p>
<p>I am catching up with an old e-acquaintance’s <a href="http://www.deusexmalcontent.com/">blog</a>, which is epic and incisive and beautifully written, and I am finally filled with a yen, an actual yearning to write something. I’ve already started two blogs. One is on hiatus, until the boyfriend and I can really sit down and hash out its direction and beef up the content <em>before</em> putting up live and out there. The other, I haven’t even begun but I will &#8230; as soon as we watch those first two movies from Netflix that have been sandwiched between <span style="text-decoration:underline;">Myra Breckinridge</span> and <span style="text-decoration:underline;">Garlic is as Good as 10 Mothers</span> atop the VCR. I swear.</p>
<p>This blog will be different. Solely mine. Solely self-indulgent. To all the things I “used to”, before I let the “quit” get too settled in my soul. I turned 31 last week. No one came out to the bar I selected for my celebration. Whatever it is, I’m doing it wrong. Time to make a change.</p>
<p>I used to be married. You can already see how well that turned out.</p>
<p>I used to write prolifically, and well (if I may say so myself.) I wrote screenplays and blog posts. Now I can barely be bothered to write a two sentence e-mail response because I’m afraid I have nothing of interest to say.</p>
<p>I used to have friends. But I’m lazy, and a homebody, and I refuse to drink and drive, and so I don’t really know that I do have friends anymore (aside from online conveniences, namely the popularity contest/24-7 high school reunion that is the Facebook.)</p>
<p>I used to weight 5 pounds less, back in April. I’m sure I’ll expound upon how much this (stupidly) weighs on me in the future. PS: please note ex<strong>pound</strong> and <strong>weighs</strong> were not used on purpose but I noticed anyway.</p>
<p>I used to do yoga with enthusiasm. I can, thank god, still put my hands flat on the floor when bending forward. But my flexibility is waning, <em>fast</em>, and I’m possibly more disappointed with myself for this than for other, seemingly more important things.</p>
<p>I used to like my job. Between the approach of the industry’s fallow season and, frankly, taking on a job that pays well enough but could be done by a chimpanzee with a headset, I am stultified. Not to mention at the office at odd hours (to wit, I’m in hour 6 of my Sunday shift. I’m wearing two-day old jeans, because no one else will be here, yet I dried my hair in the ladies’ room because I didn’t want it to dry funny. Yesterday, my jeans were fresher, but my hair was not.)</p>
<p>I used to think that, despite my cynicism and lack of motivation, I could someday, somehow, be a beautiful and unique snowflake, that Tyler Durden’s bitter bullshit was just that. I’m pretty sure now that not even my family would notice if I died tomorrow, and all I’ll leave behind are my beloved cats and some fractured scribblings here and there. Well, and a fierce shoe collection.</p>
<p>I used to go to therapy, until I broke up with that bitch for spending my sessions showing me pictures of her doggie, rather than talking about my divorce or the body dysmorphic disorder and acute depression she’d just diagnosed (and doomed – let’s hear it for our country’s health care, and appreciation/understanding of mental &#8230; deficiencies!) me with.</p>
<p>Here’s hoping this is a home for some of my vitriol, because it’s eating me up inside without the side benefit of gnawing away at some of my portlier physical attributes (see what I did there? Tying it back in with how I see myself &#8230; oh never mind. You’ll never hear the end of it and neither will I.)</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Behavior-Driven Development (BDD)]]></title>
<link>http://alanmacgowan.wordpress.com/2009/10/16/behavior-driven-development-bdd/</link>
<pubDate>Fri, 16 Oct 2009 03:31:35 +0000</pubDate>
<dc:creator>alanmacgowan</dc:creator>
<guid>http://alanmacgowan.wordpress.com/2009/10/16/behavior-driven-development-bdd/</guid>
<description><![CDATA[Behavior-Driven Development (BDD) Behavior Driven Development (BDD) es una técnica de desarrollo ági]]></description>
<content:encoded><![CDATA[Behavior-Driven Development (BDD) Behavior Driven Development (BDD) es una técnica de desarrollo ági]]></content:encoded>
</item>
<item>
<title><![CDATA[Behavior Driven Development]]></title>
<link>http://hamagudi.com/2009/10/15/behavior-driven-development/</link>
<pubDate>Thu, 15 Oct 2009 11:51:19 +0000</pubDate>
<dc:creator>hamagudi</dc:creator>
<guid>http://hamagudi.com/2009/10/15/behavior-driven-development/</guid>
<description><![CDATA[Before I could really start a project using TDD to design and architecture the system, I came across]]></description>
<content:encoded><![CDATA[Before I could really start a project using TDD to design and architecture the system, I came across]]></content:encoded>
</item>
<item>
<title><![CDATA[NBehave: integrazione con VS2008 e Resharper]]></title>
<link>http://zenprogramming.wordpress.com/2009/10/14/nbehave-integrazione-con-vs2008-e-resharper/</link>
<pubDate>Wed, 14 Oct 2009 12:53:32 +0000</pubDate>
<dc:creator>giancarloorru</dc:creator>
<guid>http://zenprogramming.wordpress.com/2009/10/14/nbehave-integrazione-con-vs2008-e-resharper/</guid>
<description><![CDATA[In questi giorni mi sto prendendo un po&#8217; di tempo per studiare alcune cose che mi riservavo di]]></description>
<content:encoded><![CDATA[In questi giorni mi sto prendendo un po&#8217; di tempo per studiare alcune cose che mi riservavo di]]></content:encoded>
</item>
<item>
<title><![CDATA[Especificando validações com Scala, Specs e Lift - Parte I]]></title>
<link>http://codemountain.wordpress.com/2009/10/14/especificando-validacoes-com-scala-specs-e-lift-i/</link>
<pubDate>Wed, 14 Oct 2009 03:21:18 +0000</pubDate>
<dc:creator>paulosuzart</dc:creator>
<guid>http://codemountain.wordpress.com/2009/10/14/especificando-validacoes-com-scala-specs-e-lift-i/</guid>
<description><![CDATA[Pra variar um post sem ligação alguma com o anterior. Mas vamos lá. Há pouco mais de um ano que come]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Pra variar um post sem ligação alguma com o anterior. Mas vamos lá.</p>
<p>Há pouco mais de um ano que comecei a estudar <a href="http://www.scala-lang.org/" target="_blank">Scala</a>, e durante este tempo e me dediquei quase que puramente à linguagem. O máximo que brinquei foi com <a href="http://code.google.com/p/simple-build-tool/" target="_blank">Scala SBT</a>, o <a href="http://technically.us/code">Dispatch</a> do <a href="http://twitter.com/n8han" target="_blank">n8han</a> e outras coisinhas. Acredito que até mesmo por não ser meu foco profissional (por hora) demorei pra estudar o <a href="http://www.liftweb.net/" target="_blank">Lift</a>, o framework MVC para Scala.</p>
<p>Completei o <a href="http://www.liftweb.net/docs/getting_started.html" target="_blank">getting started</a> do framework e comecei a fazer uma segunda aplicação de estudo com <a href="http://twitter.com/lucastex" target="_blank">@lucastex</a> e <a href="http://twitter.com/r4f4e1" target="_blank">@r4f4e1</a>. Mas o motivo desse post é um processo de desenvolvimento que me chamou a atenção depois que vi o Cucumber. BDD, ou <a href="http://behaviour-driven.org/" target="_blank">BehaviourDrivenDevelopment</a> é uma metodologia ágil que vem como um complemento &#8211; ou mesmo evolução &#8211; ao TDD (Test Driven Development) e se transformando em uma ferramenta primordial para o <a href="http://domaindrivendesign.org/" target="_blank">DDD (DomainDrivenDesign)</a>.</p>
<p>Existem muitos frameworks BDD como <a href="http://rspec.info/" target="_blank">RSpec</a>, <a href="http://code.google.com/p/specs/" target="_blank">Specs</a>, <a href="http://www.artima.com/scalatest/" target="_blank">Scala Test</a>, <a href="http://cukes.info/" target="_blank">Cucumber</a>, <a href="http://jbehave.org/" target="_blank">JBehave</a>, <a href="http://code.google.com/p/jsspec/" target="_blank">jsspec</a>, e escolhi o Specs por algum motivo obscuro.</p>
<p>Sendo bem objetivo e tentando reduzir a quantidade de palavras no post (deixando o máximo de código possível), o foco do BDD é a construção de comportamentos esperados para o sistema ao invés de testes. A construção de testes, em última instância, tem interesse em verificar o comportamento que o sistema deve (<strong>should</strong>) ter em diversos cenários (<strong>examples</strong>), por isso BDD.</p>
<p>Outro ponto importante é a tão falada linguagem ubíqua, ou seja, uma linguagem que todos os envolvidos na construção do software consigam entender. Frameworks BDD permitem que esta linguagem seja executável e escrita na propria linguagem de construção do sistema. Scala é muito poderosa na construção de <a href="http://en.wikipedia.org/wiki/Domain-specific_language" target="_blank">DSLs (Domain Specific Languages)</a>, chegando ao ponto do código se parecer com uma escrita em ingles, não em uma linguagem de programação. Neste post, o comportamento que escolhi especificar foi de validação de dados de domínio:</p>
<pre class="brush: scala;">

    &#38;quot;Create/Update a ToDo item&#38;quot; should {
        &#38;quot;show the following error messages:&#38;quot; &#38;gt;&#38;gt; {
            &#38;quot;Description must be 3 characters&#38;quot; &#38;gt;&#38;gt; {
                &#38;quot;if description field length is less than 3&#38;quot; in {
                    val todo = ToDo.create.owner(User.currentUser)
                    todo.desc(&#38;quot;&#38;quot;).validate must
                    contain(FieldError(todo.desc, Text(&#38;quot;Description must be 3 characters&#38;quot;)))
                }
            }

            &#38;quot;&#38;lt;b&#38;gt;Priority must be 1-10&#38;lt;/b&#38;gt;&#38;quot; &#38;gt;&#38;gt; {
                &#38;quot;if priority field is not between, including, 1 and 10&#38;quot; in {
                    val todo = ToDo.create.owner(User.currentUser)
                    todo.priority(-1).validate must
                    contain(FieldError(todo.priority, &#38;lt;b&#38;gt;Priority must be 1-10&#38;lt;/b&#38;gt;))
                }
            }
        }
    }
</pre>
<p>Nos parágrafos acima note em negrito as palavras <strong>should</strong> e <strong>example</strong>. Indicamos com should o que o sistema (ToDo app) deve fazer nos (<strong>in</strong>) exemplos, ou cenários, que seguem.</p>
<p>Dada cada uma das mensagens esperadas, o trecho de código delimitado por in {&#8230;} é implementado com um ou mais matchers.  o matcher must contain é usado aqui por que o método de Validação de uma classe mapper no lift retorna um List[FieldError]. FieldError é uma case class de construção FieldError[Identifier, NodeSeq]. Logo, o matcher must contain verifica a existência de um objeto com o formato especificado na lista de erros retornados na validação.</p>
<p><strong>Logo</strong>, os matcher são os responsáveis por assegurar que a especificação descrita no texto será atendida pelo resultado do código nos exemplos.</p>
<p>O <a href="http://code.google.com/p/specs/wiki/MatchersGuide" target="_blank">guia de matchers</a> apresenta uma listagem completa desta DSL que pode ser aplicada em Iterables, String, Objects, Maps, Numer, Options, ScalaChecks, XML, Arquivos e grafos de objetos. E para ilustrar o uso de matchers para string.</p>
<p>Ao executar a especificação acima, temos o resultado:</p>
<pre class="brush: bash;">
-------------------------------------------------------
Running com.liftworkshop.todo.TodoSpecTest
Tests run: 3, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 2.694 sec &#38;lt;&#38;lt;&#38;lt; FAILURE!
Running com.liftworkshop.todo.AppTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.042 sec

Results :

Failed tests:
  Create/Update a ToDo item should show the following error messages: Description must be 3 characters if description field length is less than 3
  Create/Update a ToDo item should show the following error messages: &#38;lt;b&#38;gt;Priority must be 1-10&#38;lt;/b&#38;gt; if priority field is not between, including, 1 and 10
  Create/Update a ToDo item should show the following error messages: &#38;lt;b&#38;gt;Priority must be 1-10&#38;lt;/b&#38;gt; if priority field is not between, including, 1 and 10

Tests run: 5, Failures: 3, Errors: 0, Skipped: 0
</pre>
<p>Isto por que os campos desc e priority (mostrados abaixo) não implementam nenhuma validação:</p>
<pre class="brush: scala;">
class ToDo extends LongKeyedMapper[ToDo] with IdPK {
    lazy val priorityList = (1 to 10).map(v =&#38;gt; (v.toString, v.toString))

    def getSingleton = ToDo

    object done extends MappedBoolean(this)
    object owner extends MappedLongForeignKey(this, User)

    object priority extends MappedInt(this) {
        override def defaultValue = 5

        override def _toForm = Full(select(ToDo.priorityList,
                                           Full(is.toString),
                                           f =&#38;gt; set(f.toInt)))
    }

    object desc extends MappedPoliteString(this, 128)
}
object ToDo extends ToDo with LongKeyedMetaMapper[ToDo]
</pre>
<p>E aqui chegamos a um ponto interessante do BDD, certamente herdado do TDD: vamos escrever o código estritamente necessário para atender a nossa especificação. Supondo que você tenha o mínimo de conhecimento com Lift e quem sabe tenha feito o getting started, adicionemos as validações assim:</p>
<pre class="brush: scala;">
    object desc extends MappedPoliteString(this, 128) {
        override def validations = valMinLen(3, &#38;quot;Description must be 3 characters&#38;quot;) _ :: super.validations
    } // para o mapeamento da descrição e ...

    object priority extends MappedInt(this) {
    ...
        override def validations = validPriority _ :: super.validations

        def validPriority(in : Int) : List[FieldError] =
        if (in &#38;gt; 0 &#38;amp;&#38;amp; in &#38;lt;= 10) Nil
        else List(FieldError(this, &#38;lt;b&#38;gt;Priority must be 1-10&#38;lt;/b&#38;gt;))
    ...
    }
</pre>
<p>O método validations é redefinido em cada propriedade mepada que necessida validação. O campo desc apenas obriga o tamanho mínimo para 3 com a mensagem especificada definido pela função utilitária valMinLen. Já o campo priority instancia diretamente um FieldError passando o campo contendo o erro junto com a mensagem em negrito.</p>
<p>Este projeto foi montado usando o NetBeans junto com o Maven conforme descrito no getting started do Lift. Fazendo um pequeno ajuste (descrito no próximo post), temos a execução da especificação integrada ao JUnit na IDE NetBeans.</p>
<p>Executando outra vez a especificação, teremos todos os testes ok como na figura a seguir. Um print do Netbeans.</p>
<div class="wp-caption aligncenter" style="width: 595px"><img title="Spec ok" src="http://dl.getdropbox.com/u/180764/test.png" alt="Especificação atendida!" width="585" height="189" /><p class="wp-caption-text">Especificação atendida!</p></div>
<p>Esta foi talvez a parte mágica da coisa. Onde tudo já está funcionando e precisamos só curtir o BDD num exemplo sofrível com intuito de ilustrar esta metodologia, o framework Specs, o framework Lift e a linguagem Scala.</p>
<p>O código completo do projeto estará disponível no próximo Post desta série. As versões utilizadas no projeto são: Lift 1.0, <a href="http://www.scala-tools.org/repo-snapshots/org/scala-tools/testing/specs/1.6.1-SNAPSHOT" target="_blank">Scala Specs 1.6.1</a>, <a href="http://easymock.org/" target="_blank">EasyMock 2.5.2</a> (instalada no repositório maven local). E no próximo Post teremos: Configurando seu projeto Maven para o uso de Scala Specs; Explorando mais matchers; Configurando Contexto Specs para execução da especificação em uma LiftSession acessando a base de dados; Especificando Snippets Lift, e mais. Será que cabe tudo em mais um Post? Vai ter que caber.</p>
<p>Se puder visite <a href="http://behaviour-driven.org/" target="_blank">o site do BDD</a> e conheça mais sobre esta metodologia no mínimo interessante. Dado que não sou especialista em nenhum metodologia ágil, se você tem ou teve alguma experiência prática com BDD, TDD ou DDD deixe seu comentário ou sua sugestão sobre como abordar o tema de maneira mais prática.</p>
<p>Veja a <a href="http://codemountain.wordpress.com/2009/10/20/especificando-validacoes-com-scala-specs-e-lift-parte-ii/" target="_self">Parte II</a> deste post.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Tags 2D : le Flashcode désormais compatible avec Android et les iPhones]]></title>
<link>http://toofax.wordpress.com/2009/10/12/tags-2d-le-flashcode-desormais-compatible-avec-android-et-les-iphones/</link>
<pubDate>Mon, 12 Oct 2009 15:08:27 +0000</pubDate>
<dc:creator>novaleo75</dc:creator>
<guid>http://toofax.wordpress.com/2009/10/12/tags-2d-le-flashcode-desormais-compatible-avec-android-et-les-iphones/</guid>
<description><![CDATA[L&#8217;application permettant de scanner ces code-barres 2D interactifs est désormais compatible av]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>L&#8217;application permettant de scanner ces code-barres 2D interactifs est désormais compatible avec ces deux familles de smartphones. De quoi assurer le décollage de ce nouveau support de communication ?</strong></p>
<p><!--§1--> Nouvelle étape pour l&#8217;écosystème des codes-barres 2D interactifs. Après <a href="http://www.businessmobile.fr/actualites/technologies/0,39044306,39700822,00.htm">Mobiletag</a>, l&#8217;AFMM (Association Française du Multimédia Mobile) annonce ce lundi la mise à disposition gratuite de l&#8217;application flashcode sur l&#8217;AppStore (iPhone) et l&#8217;Android market. Elle était jusqu&#8217;à aujourd&#8217;hui disponible pour les mobiles sous Windows Mobile, Symbian ou sBlackberry OS.</p>
<p><!--§2-->Baptisés flashcode ou mobiletag, ces codes-barres 2D qui peuvent être placés sur n&#8217;importe quel support (une affiche, une page de journal&#8230;) ont un principe commun : photographiés par un terminal compatible (intégrant donc un logiciel dédié), ils renvoient vers un contenu multimédia mobile (site internet, publicité&#8230;).</p>
<p><!--§3--><strong>70% de smartphones compatibles </strong></p>
<p><!--§4--><!--§3-->Le scan peut également déclencher l&#8217;envoi d&#8217;un SMS, d&#8217;un MMS, d&#8217;email ou un appel voix. On imagine alors les possibilités pour les spécialistes du marketing. &#8220;A l&#8217;heure où de plus en plus d&#8217;attention est portée à l&#8217;iPhone, la présence de l&#8217;application flashcode sur l&#8217;AppStore était attendue par de nombreux annonceurs&#8221;, commente l&#8217;AFMM.</p>
<p><!--§5--><!--§5-->Pour l&#8217;utilisateur, il s&#8217;agit d&#8217;accéder plus simplement à des contenus. Pour l&#8217;opérateur, le flashcode est un levier de trafic sollicité (ce qui est important en termes d&#8217;acceptation du message).</p>
<p><!--§6--></p>
<p><!--§7-->Désormais, près de 10 millions de téléphones mobiles et 70% des smartphones  sont aujourd&#8217;hui compatibles flashcode, ajoute l&#8217;association.</p>
<p><!--§8-->Depuis deux ans, <a href="http://www.businessmobile.fr/actualites/technologies/0,39044306,39700822,00.htm">les expérimentations</a> liées à ces codes-barres 2D se multiplient. Dernière en date, <a href="http://www.zdnet.fr/actualites/telecoms/0,39040748,39706162,00.htm">l&#8217;Hyperlivre</a> développé par Orange et Robert Laffont. L&#8217;ouvrage est truffé de flashcodes renvoyant vers des contenus supplémentaires multimédias.</p>
<p><!--§9-->Il y a un an, les magazines Public, Closer et Voici ont ainsi proposé à leurs lecteurs d&#8217;accéder à du contenu exclusif via leur téléphone mobile grâce aux codes 2D.</p>
<p><!--§10--><!--§10-->Résultat des courses, sur les 2 millions de personnes possédant un combiné compatible, 30.000 demandes de téléchargement de l&#8217;application flashcode ont été enregistrées.</p>
<p style="text-align:right;">Source : BusinessMobile</p>
<h2>A propos de la solution TooFAX® :</h2>
<p align="justify"><span style="color:#000000;">TooFAX® est une solution moderne et innovante de fax dématérialisé, vous permettant l&#8217;envoi, la réception, et la sauvegarde de <a href="http://www.toofax.com" target="_blank">fax par internet</a> ou par e-mail. Depuis votre ordinateur de bureau ou portable, votre PDA, etc, TooFAX® vous permet d&#8217;effectuer des opérations de <a href="http://www.toofax.com" target="_blank">faxing </a>sur les 5 continents. </span></p>
<p align="justify"><a href="http://www.toofax.com/"><span style="color:#000000;"><span style="text-decoration:underline;">TooFAX®</span></span></a><span style="color:#000000;"> </span><span style="color:#000000;">est la synthèse entre les atouts du Fax (rapidité, valeur juridique) et l’aspect pratique de l’e-mail.</span></p>
<h4><strong>Actualité de TooFAX</strong>® :</h4>
<p><a href="http://www.facebook.com/toofax" target="_blank"><img title="fax mailing facebook" src="http://toofax.wordpress.com/files/2009/09/fax-mailing-facebook.gif" alt="fax mailing facebook" width="55" height="54" /></a><a href="http://toofax.wordpress.com/" target="_blank"> </a><a href="http://toofax.wordpress.com/" target="_blank"><img title="fax mailing wordpress" src="http://toofax.wordpress.com/files/2009/09/fax-mailing-wordpress.gif" alt="fax mailing wordpress" width="58" height="58" /></a> <a href="http://twitter.com/toofax" target="_blank"><img title="fax mailing twitter" src="http://toofax.wordpress.com/files/2009/09/fax-mailing-twitter.gif" alt="fax mailing twitter" width="54" height="54" /></a></p>
<p><span style="color:#000000;">- Site internet : </span><a href="http://www.toofax.com/" target="_blank"><span style="color:#000000;"><span style="text-decoration:underline;">http://www.toofax.com</span></span></a></p>
<p><span style="color:#000000;">- Site du service : </span><a href="http://www.service.toofax.com/" target="_blank"><span style="color:#000000;"><span style="text-decoration:underline;">http://www.service.toofax.com</span></span></a></p>
<p><span style="color:#000000;">- Vidéos de démonstration </span><span style="color:#000000;"><span style="text-decoration:underline;">: <a href="http://www.video.toofax.com/" target="_blank">http://www.video.toofax.com</a></span></span></p>
<p><span style="color:#000000;">- Groupe Facebook : <a href="http://www.facebook.com/toofax">http://www.facebook.com/toofax</a></span></p>
<p><span style="color:#000000;">- Club des utilisateurs de la solution : </span><a href="http://www.club.toofax.com/" target="_blank"><span style="color:#000000;"><span style="text-decoration:underline;">http://www.club.toofax.com</span></span></a></p>
<p><span style="color:#000000;">- Actualités en ligne des services TooFAX® :  <a href="http://twitter.com/toofax">http://twitter.com/toofax</a></span></p>
<p><span style="color:#000000;">- Blog  officiel de la gamme de services TooFAX® : <a href="../">http://toofax.wordpress.com/</a></span></p>
<p><span style="color:#000000;">- Base de données gratuite de n° de fax pour vos opérations de <a href="http://www.toofaxdata.com/">faxing</a> : <a href="http://www.toofaxdata.com/">http://www.toofaxdata.com</a></span></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[ Levée de fonds multiples pour les géants français du Web]]></title>
<link>http://toofax.wordpress.com/2009/10/12/levee-de-fonds-multiples-pour-les-geants-francais-du-web/</link>
<pubDate>Mon, 12 Oct 2009 09:09:01 +0000</pubDate>
<dc:creator>novaleo75</dc:creator>
<guid>http://toofax.wordpress.com/2009/10/12/levee-de-fonds-multiples-pour-les-geants-francais-du-web/</guid>
<description><![CDATA[Business &#8211; Dailymotion lève 15 millions d&#8217;euros tandis que Deezer obtient 6,5 millions s]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><div id="storytext">
<p><img src="http://www.zdnet.fr/i/edit/ne/2009/03/argent97x72.jpg" alt="" width="95" height="70" /><strong><em>Business</em> &#8211; Dailymotion lève 15 millions d&#8217;euros tandis que Deezer obtient 6,5 millions supplémentaires.</strong></p>
<p>Les affaires reprennent pour les géants du Web français. On apprend en effet coup sur coup deux levées de fonds pour les stars hexagonales de la toile que sont Dailymotion et Deezer.</p>
<p>Le premier vient d&#8217;obtenir de ses investisseurs une nouvelle rallonge de 15 millions d&#8217;euros. Objectif pour le site d&#8217;échanges de vidéos : le développement à l&#8217;international et parvenir à diversifier ses sources de revenus, encore dépendantes de la publicité.</p>
<p><strong>Développement de services payants </strong></p>
<p>Il s&#8217;agit en effet de lancer de nouveaux services payants, notamment pour les professionnels, au moment où la société &#8220;est désormais rentable&#8221;, selon son p-dg.</p>
<p>En avril dernier, la presse révélait que le service était en quête d&#8217;argent frais&#8230; Il faut dire que son chiffre d&#8217;affaires atteindrait les 10 millions d&#8217;euros alors que son point d&#8217;équilibre se situerait entre 17 et 20 millions&#8230;</p>
<p><a href="http://www.zdnet.fr/actualites/0,39051260,3900046236q,00.htm">Deezer</a> de son côté annonce une nouvelle levée de fonds de 6,5 millions d&#8217;euros, la seconde de son histoire. En tout, le géant de la musique en streaming a obtenu depuis 2007 de la part de ses investisseurs une participation de 12,2 millions.</p>
<p>Là encore, il s&#8217;agit de diversifier les sources de revenus pour être moins dépendant de la publicité. &#8220;Cette levée de fonds, valide notre positionnement et notre stratégie. Nous sommes désormais prêts à poursuivre notre développement sur les modèles premiums et sur les territoires Européens.&#8221; soulignent les fondateurs du service, Jonathan Benassaya et Daniel Marhely.</p>
<p>Dans le même temps, Deezer annonce une réorganisation de sa structure avec la création d&#8217;Odyssey Music Group, société qui contrôlera BlogMusic (qui édite Deezer), les activités de régie et les développements technologiques.</p>
</div>
<p style="text-align:right;">Source : ZDnet</p>
<h2>A propos de la solution TooFAX® :</h2>
<p align="justify"><span style="color:#000000;">TooFAX® est une solution moderne et innovante de fax dématérialisé, vous permettant l&#8217;envoi, la réception, et la sauvegarde de <a href="http://www.toofax.com" target="_blank">fax par internet</a> ou par e-mail. Depuis votre ordinateur de bureau ou portable, votre PDA, etc, TooFAX® vous permet d&#8217;effectuer des opérations de <a href="http://www.toofax.com" target="_blank">faxing </a>sur les 5 continents. </span></p>
<p align="justify"><a href="http://www.toofax.com/"><span style="color:#000000;"><span style="text-decoration:underline;">TooFAX®</span></span></a><span style="color:#000000;"> </span><span style="color:#000000;">est la synthèse entre les atouts du Fax (rapidité, valeur juridique) et l’aspect pratique de l’e-mail.</span></p>
<h4><strong>Actualité de TooFAX</strong>® :</h4>
<p><a href="http://www.facebook.com/toofax" target="_blank"><img title="fax mailing facebook" src="http://toofax.wordpress.com/files/2009/09/fax-mailing-facebook.gif" alt="fax mailing facebook" width="55" height="54" /></a><a href="http://toofax.wordpress.com/" target="_blank"> </a><a href="http://toofax.wordpress.com/" target="_blank"><img title="fax mailing wordpress" src="http://toofax.wordpress.com/files/2009/09/fax-mailing-wordpress.gif" alt="fax mailing wordpress" width="58" height="58" /></a> <a href="http://twitter.com/toofax" target="_blank"><img title="fax mailing twitter" src="http://toofax.wordpress.com/files/2009/09/fax-mailing-twitter.gif" alt="fax mailing twitter" width="54" height="54" /></a></p>
<p><span style="color:#000000;">- Site internet : </span><a href="http://www.toofax.com/" target="_blank"><span style="color:#000000;"><span style="text-decoration:underline;">http://www.toofax.com</span></span></a></p>
<p><span style="color:#000000;">- Site du service : </span><a href="http://www.service.toofax.com/" target="_blank"><span style="color:#000000;"><span style="text-decoration:underline;">http://www.service.toofax.com</span></span></a></p>
<p><span style="color:#000000;">- Vidéos de démonstration </span><span style="color:#000000;"><span style="text-decoration:underline;">: <a href="http://www.video.toofax.com/" target="_blank">http://www.video.toofax.com</a></span></span></p>
<p><span style="color:#000000;">- Groupe Facebook : <a href="http://www.facebook.com/toofax">http://www.facebook.com/toofax</a></span></p>
<p><span style="color:#000000;">- Club des utilisateurs de la solution : </span><a href="http://www.club.toofax.com/" target="_blank"><span style="color:#000000;"><span style="text-decoration:underline;">http://www.club.toofax.com</span></span></a></p>
<p><span style="color:#000000;">- Actualités en ligne des services TooFAX® :  <a href="http://twitter.com/toofax">http://twitter.com/toofax</a></span></p>
<p><span style="color:#000000;">- Blog  officiel de la gamme de services TooFAX® : <a href="../">http://toofax.wordpress.com/</a></span></p>
<p><span style="color:#000000;">- Base de données gratuite de n° de fax pour vos opérations de <a href="http://www.toofaxdata.com/">faxing</a> : <a href="http://www.toofaxdata.com/">http://www.toofaxdata.com</a></span></p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
