<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Testing patterns: don&#8217;t assert without cause</title>
	<atom:link href="http://twasink.net/2005/05/30/testing-patterns-dont-assert-without-cause/feed/" rel="self" type="application/rss+xml" />
	<link>http://twasink.net/2005/05/30/testing-patterns-dont-assert-without-cause/</link>
	<description>Robert&#039;s Rambling Ruminations Regarding Reality...</description>
	<lastBuildDate>Thu, 12 Apr 2012 16:31:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Tom Hawtin</title>
		<link>http://twasink.net/2005/05/30/testing-patterns-dont-assert-without-cause/#comment-227</link>
		<dc:creator><![CDATA[Tom Hawtin]]></dc:creator>
		<pubDate>Tue, 31 May 2005 04:06:05 +0000</pubDate>
		<guid isPermaLink="false">http://twasink.net/wp/?p=142#comment-227</guid>
		<description><![CDATA[Seems to me like it&#039;s a variant of always check for null argument idiom.

Both are a good idea, IMO. You want to say explicitly in the code that nulls are out. And as a side effect you don&#039;t have the possibility of code changes removing the check in some obscure cases.
]]></description>
		<content:encoded><![CDATA[<p>Seems to me like it&#8217;s a variant of always check for null argument idiom.</p>
<p>Both are a good idea, IMO. You want to say explicitly in the code that nulls are out. And as a side effect you don&#8217;t have the possibility of code changes removing the check in some obscure cases.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://twasink.net/2005/05/30/testing-patterns-dont-assert-without-cause/#comment-226</link>
		<dc:creator><![CDATA[Michael]]></dc:creator>
		<pubDate>Mon, 30 May 2005 19:33:58 +0000</pubDate>
		<guid isPermaLink="false">http://twasink.net/wp/?p=142#comment-226</guid>
		<description><![CDATA[I found myself slipping into a pattern where I would stuff a whole lot of assertions into one method, whereas I *should* be doing what you suggest above (breaking out important assertions to indicate a major failure seperately from more functional tests).

This is cause I am going through a slow test suite-hatred phase. And that leaks down into me thinking &quot;that doesn&#039;t really need a test all of its own...&quot;...

(of course the real reason for slow unit tests is cause they often aren&#039;t unit tests).
]]></description>
		<content:encoded><![CDATA[<p>I found myself slipping into a pattern where I would stuff a whole lot of assertions into one method, whereas I *should* be doing what you suggest above (breaking out important assertions to indicate a major failure seperately from more functional tests).</p>
<p>This is cause I am going through a slow test suite-hatred phase. And that leaks down into me thinking &#8220;that doesn&#8217;t really need a test all of its own&#8230;&#8221;&#8230;</p>
<p>(of course the real reason for slow unit tests is cause they often aren&#8217;t unit tests).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Watkins</title>
		<link>http://twasink.net/2005/05/30/testing-patterns-dont-assert-without-cause/#comment-225</link>
		<dc:creator><![CDATA[Robert Watkins]]></dc:creator>
		<pubDate>Mon, 30 May 2005 13:04:50 +0000</pubDate>
		<guid isPermaLink="false">http://twasink.net/wp/?p=142#comment-225</guid>
		<description><![CDATA[It _can_ be sensible to put the assertNotNull() in. This, BTW, assumes that failures make more sense than null pointers. :)

The problem lies in the _repeated_ assertions. Assert it once, in one test, then don&#039;t do it again.

Of course, the assertNotNull isn&#039;t the only example of this particular anti-pattern; it&#039;s merely the most prevalant.
]]></description>
		<content:encoded><![CDATA[<p>It _can_ be sensible to put the assertNotNull() in. This, BTW, assumes that failures make more sense than null pointers. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The problem lies in the _repeated_ assertions. Assert it once, in one test, then don&#8217;t do it again.</p>
<p>Of course, the assertNotNull isn&#8217;t the only example of this particular anti-pattern; it&#8217;s merely the most prevalant.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://twasink.net/2005/05/30/testing-patterns-dont-assert-without-cause/#comment-224</link>
		<dc:creator><![CDATA[Michael]]></dc:creator>
		<pubDate>Mon, 30 May 2005 12:24:17 +0000</pubDate>
		<guid isPermaLink="false">http://twasink.net/wp/?p=142#comment-224</guid>
		<description><![CDATA[Interesting. I too assumed that it was sensible to put the null check to stop the annoying null pointers.

But as David Brent says &quot;assume puts an ass between &#039;u&#039; and &#039;me&#039;&quot;.

It is also an interesting point that if you look at your failures first, you will have a better chance of seeing at a glance what is wrong, rather then looking at the exceptions peppering your results.


]]></description>
		<content:encoded><![CDATA[<p>Interesting. I too assumed that it was sensible to put the null check to stop the annoying null pointers.</p>
<p>But as David Brent says &#8220;assume puts an ass between &#8216;u&#8217; and &#8216;me&#8217;&#8221;.</p>
<p>It is also an interesting point that if you look at your failures first, you will have a better chance of seeing at a glance what is wrong, rather then looking at the exceptions peppering your results.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

