<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dublin ALT.NET &#187; book-club</title>
	<atom:link href="http://dublinalt.net/tag/book-club/feed/" rel="self" type="application/rss+xml" />
	<link>http://dublinalt.net</link>
	<description>The first ALT.NET group in Ireland</description>
	<lastBuildDate>Wed, 16 May 2012 21:16:58 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Book Club &#8211; New Book</title>
		<link>http://dublinalt.net/2010/06/29/book-club-new-book/</link>
		<comments>http://dublinalt.net/2010/06/29/book-club-new-book/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 08:47:31 +0000</pubDate>
		<dc:creator>roundcrisis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[book-club]]></category>

		<guid isPermaLink="false">http://dublinalt.net/?p=275</guid>
		<description><![CDATA[We are just about to finish the mythical DDD by Eric Evans, it was hard work, but I think I speak for all when I say
a) I m glad it s over
b) Its possibly the best way to read the book ( please comment and disagree with me if you feel like it)
The good news [...]]]></description>
			<content:encoded><![CDATA[<p>We are just about to finish the mythical DDD by Eric Evans, it was hard work, but I think I speak for all when I say<br />
a) I m glad it s over<br />
b) Its possibly the best way to read the book ( please comment and disagree with me if you feel like it)</p>
<p>The good news is that we are starting a new book &#8220;7 Languages in 7 Weeks&#8221;</p>
<p><a href="http://pragprog.com/titles/btlang/seven-languages-in-seven-weeks"><img class="alignleft" title="7 Languages in 7 Weeks" src="http://pragprog.com/images/covers/original/btlang.jpg" alt="" width="292" height="350" /></a><br />
To come to the book club simply check our calendar for the time and date, lately we have been meeting in Trinity Capital Hotel, every Tuesday at 7pm, if you are interested please subscribe to our mailing list.<br />
Cheers</p>
<p>Andrea</p>
]]></content:encoded>
			<wfw:commentRss>http://dublinalt.net/2010/06/29/book-club-new-book/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Art of Unit Testing &#8211; Chapter 3</title>
		<link>http://dublinalt.net/2009/10/05/the-art-of-unit-testing-chapter-3/</link>
		<comments>http://dublinalt.net/2009/10/05/the-art-of-unit-testing-chapter-3/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 22:39:33 +0000</pubDate>
		<dc:creator>roundcrisis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AoUT]]></category>
		<category><![CDATA[book-club]]></category>

		<guid isPermaLink="false">http://dublinalt.net/?p=156</guid>
		<description><![CDATA[Chapter 3 is about stubs. The meat of this chapter is on the techniques used to break dependencies.
To use most of these techniques you need to extract an interface and inject a stub into the class under test. The options presented in the book are:
- Receive an interface at the constructor level
- Receive an interface [...]]]></description>
			<content:encoded><![CDATA[<p>Chapter 3 is about stubs. The meat of this chapter is on the techniques used to break dependencies.</p>
<p>To use most of these techniques you need to extract an interface and inject a stub into the class under test. The options presented in the book are:</p>
<p>- Receive an interface at the constructor level<br />
- Receive an interface as a property<br />
- Getting a stub just before the method call (using factories)</p>
<p>The first and second options seem to be the ones we all seem to be more used to, and we also agreed on the fact that is good to use the first method when making a dependency required and using the second method ( by properties) when the dependency is optional.</p>
<p>IoC containers are mentioned but there is little or no mention on how to use them when testing.</p>
<p>The third option we didn&#8217;t really see the point, it seemed over complicating something that can be simpler, and we couldn&#8217;t see the advantage of using this technique, perhaps it is useful in Legacy scenarios?  In the book, he (Roy Osherove) mentions that this seems cumbersome at the beginning but it becomes more natural. I find it hard to understand the advantages of this method,  I would really appreciate other peoples comments on this.</p>
<p>Then there is some content on Extract and Override, the idea of overriding a virtual method  to be able to obtain a result to make the system testable seems to me somewhat more natural, however, I still think there is a lot of investment (code wise) and small return, it also makes your test harder to read.</p>
<p>There is another section of the chapter when it talks about encapsulation, using <strong>internals</strong> and [<strong>internalsVisibleTo</strong>] and in general, different ways to open up your code enough to make it testable hiding bits of the API that you don&#8217;t consider should be public.</p>
<p>Not the most straight forward chapter to read but plenty to make you think.</p>
<p>Comments on this chapter from David:</p>
<div>
<p><strong>Chapter 3 – Using Stubs to break dependencies</strong></p>
<p>Constructor and property injection are very similar and usually involve using an interface to allow you to stub the functionality.</p>
<p>Constructor injection is the most common and is preferred when a dependency is required (most dependencies are).</p>
<p>Property injection is useful when a dependency is optional. Logging is the only example that I can think of. If a logger is set it’s used otherwise no logging takes place but the system still functions as expected.</p>
<p>He does a nice job of discussing pros and cons. Briefly mentions IoC containers but these techniques really come into their own when used in conjunction with a container and it would have been nice to see a bit more said on this. Possibly that the chapter was written early and the IoC stuff added as an afterthought.</p>
<p><strong>3.4.5<span> </span>Getting a stub just before a method call. </strong></p>
<p>He doesn&#8217;t talk about pros and cons in this section as well as he did about constructor injection.</p>
<p><strong>Factory class</strong> – Also likely to use an interface but instead of injecting directly into the system under test you inject it into a know location that the SUT then uses to get the dependency. One major drawback with this method (not mentioned in the book) is that it makes the dependencies implicit. With Ctor and property injection, the dependencies are explicitly called out in the interface of the SUT. With implicit dependencies it’s all too easy to miss a dependency that you really should stub during testing. It also makes the test more difficult to follow because you set something up in a place that has no immediate connection to the SUT</p>
<p>Takes a detour into hiding seams using conditional compilation (something I’m really not a big fan of). I thought this section broke up the flow of the discussion and should probably have been kept until the end.</p>
<p><strong>Extract and override</strong></p>
<p>Technique involves subclassing the class under test, in your test project, and overriding a single method so that either a stub (implementing an interface) or a simple value (section 3.5.1) can be injected into the SUT.</p>
<p>In my opinion if you’re injecting a stub you’re probably best off using either ctor or property injection because, as mentioned above, it makes the dependency explicit. I can possibly see some use for this technique if you only want to replace a value or set a flag. Even then I’d have to wonder whether there shouldn’t be some other way to perform the test by first manipulating the state of an object via its public interface.</p>
<p>In the summary he says, “The closer you are to the surface of the object under test <strong>[Like with ctor and property injection - DW]</strong>, the easier your test will be to understand and manage, but you may also be giving up some of your power to manipulate the environment of the object under test.” However he never really goes into much detail of this power. He also talks about using the extract and override technique throughout the book so hopefully we&#8217;ll get some more clues later on.</div>
]]></content:encoded>
			<wfw:commentRss>http://dublinalt.net/2009/10/05/the-art-of-unit-testing-chapter-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Book Club Meetup 1 Review &#8211; Next meet up details</title>
		<link>http://dublinalt.net/2009/09/10/book-club-meetup-1-review-next-meet-up-details/</link>
		<comments>http://dublinalt.net/2009/09/10/book-club-meetup-1-review-next-meet-up-details/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 09:35:10 +0000</pubDate>
		<dc:creator>roundcrisis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[book-club]]></category>

		<guid isPermaLink="false">http://dublinalt.net/?p=110</guid>
		<description><![CDATA[We met last night for the first Book Club, I think It went pretty well. I know I really enjoyed it.
We  are reading The Art of Unit Testing  ( by Roy Osherove) this is the review for chapter one.
We talked about the importance of testing , the importance of differentiating between Integration Tests and Unit [...]]]></description>
			<content:encoded><![CDATA[<p>We met last night for the first Book Club, I think It went pretty well. I know I really enjoyed it.</p>
<p>We  are reading The Art of Unit Testing  ( by <a href="http://weblogs.asp.net/ROsherove/" target="_blank">Roy Osherove</a>) this is the review for chapter one.</p>
<p>We talked about the importance of testing , the importance of differentiating between Integration Tests and Unit Tests and perhaps realised that there is a very important place for Integration tests in our process.</p>
<p>We were also talking about TDD by Example (K. Beck) and how both books together can help first to learn how to unit test and then to write better tests.</p>
<p>On Integration Test again we talked about<a href="http://fitnesse.org/" target="_blank"> Fit(nesse)</a> <a href="http://storyteller.tigris.org/" target="_blank">StoryTeller</a>, <a href="http://cukes.info/" target="_blank">cucumber</a> and we came to mention <a href="http://www.ndepend.com/" target="_blank">NDepend</a> somehow (I cant remember how, but I can remember someone asking for links so here you go).</p>
<p>I think we are all in the right track seeing tests as a way to achieve quality , we know what is the purist approach but I think none of us were afraid to say well, actually that will take more time that doing something in a pragmatic way.</p>
<p>A typical example of this will be the XML Parser, a purist will have the xml in a string , a more pragmatic approach is to have a file close to the Test assembly, the drawback of this is that you are then creating a dependency on the IO operation and testing the IO which is not a good idea, also you are creating a dependency on the file .</p>
<p><strong> Next Meetup</strong></p>
<p>We also realised that one chapter was a bit to little, so next meetup its chapter 2 and 3. Another change we introduced is that we are meeting on Monday as it suits all the ones that were there a bit better.</p>
<p>(Apologies for the edit but the post was a bit unreadable had to edit)</p>
]]></content:encoded>
			<wfw:commentRss>http://dublinalt.net/2009/09/10/book-club-meetup-1-review-next-meet-up-details/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

