<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Easy 2 Test == Less Reason to Test ?</title>
	<atom:link href="http://stuffthathappens.com/blog/2007/11/01/easy-2-test-less-reason-to-test/feed/" rel="self" type="application/rss+xml" />
	<link>http://stuffthathappens.com/blog/2007/11/01/easy-2-test-less-reason-to-test/</link>
	<description>Technology and Geek Stuff by Eric Burke</description>
	<lastBuildDate>Thu, 04 Nov 2010 22:37:00 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Alex Miller - Unit testing is dumb</title>
		<link>http://stuffthathappens.com/blog/2007/11/01/easy-2-test-less-reason-to-test/comment-page-1/#comment-832</link>
		<dc:creator>Alex Miller - Unit testing is dumb</dc:creator>
		<pubDate>Fri, 02 Nov 2007 15:34:46 +0000</pubDate>
		<guid isPermaLink="false">http://stuffthathappens.com/blog/2007/11/01/easy-2-test-less-reason-to-test/#comment-832</guid>
		<description>[...] just read Eric&#8217;s beautiful post on unit testing and it struck a chord (well several). He&#8217;s right on that testing [...]</description>
		<content:encoded><![CDATA[<p>[...] just read Eric&#8217;s beautiful post on unit testing and it struck a chord (well several). He&#8217;s right on that testing [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mario Aquino</title>
		<link>http://stuffthathappens.com/blog/2007/11/01/easy-2-test-less-reason-to-test/comment-page-1/#comment-829</link>
		<dc:creator>Mario Aquino</dc:creator>
		<pubDate>Fri, 02 Nov 2007 12:54:54 +0000</pubDate>
		<guid isPermaLink="false">http://stuffthathappens.com/blog/2007/11/01/easy-2-test-less-reason-to-test/#comment-829</guid>
		<description>The name class above looks like the kind of thing that would be tested as a side effect of testing some other class containing the business rules which necessitate the existence of the Name class.  No user story would call for the Name class to be added to the system but rather for something that either retrieves or uses the data that the Name class encapsulates and *that* would be the target of a test.  If we always start with failing tests before writing code that adds new capability to an application, it is inevitable that tests we write will cover classes with trivial complexity.  Is it Name classes responsibility to check that it&#039;s fields aren&#039;t null?  I don&#039;t think so because Name class is neither the originator nor the consumer of the data.  If null values could possibly be handed to Name, I would look at how the system allowed that in the first place.

What if the requirement becomes &#039;First letters of first name and last name should be capitalized for display if they aren&#039;t stored that way in the system&#039;?  Is that Name classes responsibility or the responsibility of the thing that returns a Name to its caller or the responsibility of the callers&#039; (which displays the values carried by Name instances)?  Starting with a failing test that examines those kinds of details will ensure that you cover the implementation of the rules.  This way you might not end up with a NameTest that checks the trivial implementation of Name but instead with some other test that accomplishes the same thing.</description>
		<content:encoded><![CDATA[<p>The name class above looks like the kind of thing that would be tested as a side effect of testing some other class containing the business rules which necessitate the existence of the Name class.  No user story would call for the Name class to be added to the system but rather for something that either retrieves or uses the data that the Name class encapsulates and *that* would be the target of a test.  If we always start with failing tests before writing code that adds new capability to an application, it is inevitable that tests we write will cover classes with trivial complexity.  Is it Name classes responsibility to check that it&#8217;s fields aren&#8217;t null?  I don&#8217;t think so because Name class is neither the originator nor the consumer of the data.  If null values could possibly be handed to Name, I would look at how the system allowed that in the first place.</p>
<p>What if the requirement becomes &#8216;First letters of first name and last name should be capitalized for display if they aren&#8217;t stored that way in the system&#8217;?  Is that Name classes responsibility or the responsibility of the thing that returns a Name to its caller or the responsibility of the callers&#8217; (which displays the values carried by Name instances)?  Starting with a failing test that examines those kinds of details will ensure that you cover the implementation of the rules.  This way you might not end up with a NameTest that checks the trivial implementation of Name but instead with some other test that accomplishes the same thing.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.214 seconds -->

