<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Strategies for Structuring Unit Tests</title>
	<link>http://laribee.com/blog/2007/01/24/strategies-for-structuring-unit-tests/</link>
	<description>a yeah yeah, i push models like weight</description>
	<pubDate>Sat, 11 Oct 2008 23:24:47 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: Dave</title>
		<link>http://laribee.com/blog/2007/01/24/strategies-for-structuring-unit-tests/#comment-417</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Thu, 25 Jan 2007 01:07:01 +0000</pubDate>
		<guid>http://laribee.com/blog/2007/01/24/strategies-for-structuring-unit-tests/#comment-417</guid>
		<description>Jeremy,

I hear you loud and clear. Most of this stuff I discovered (and am discovering) through trial-and-error. I lucked out and got to thinking about this stuff when I saw that presentation by Brad Wilson &#038; Peter Provost (awesome presenters, btw).

Judah,

Great tip. I'll incorporate this into a future revision of this post. I agree with you 100%. Right now I'm putting the tests into their own "Tests" solution folder. One thing I'd like to try is putting them side-by-side with the library under test, e.g.:

  XS.Model.Contacts
  XS.Model.Contacts.Tests

One thing that can be annoying is losing your place w/ Solution Explorer, so I'd be looking to keep everything w/in one scroll through this tactic.</description>
		<content:encoded><![CDATA[<p>Jeremy,</p>
<p>I hear you loud and clear. Most of this stuff I discovered (and am discovering) through trial-and-error. I lucked out and got to thinking about this stuff when I saw that presentation by Brad Wilson &#038; Peter Provost (awesome presenters, btw).</p>
<p>Judah,</p>
<p>Great tip. I&#8217;ll incorporate this into a future revision of this post. I agree with you 100%. Right now I&#8217;m putting the tests into their own &#8220;Tests&#8221; solution folder. One thing I&#8217;d like to try is putting them side-by-side with the library under test, e.g.:</p>
<p>  XS.Model.Contacts<br />
  XS.Model.Contacts.Tests</p>
<p>One thing that can be annoying is losing your place w/ Solution Explorer, so I&#8217;d be looking to keep everything w/in one scroll through this tactic.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Judah</title>
		<link>http://laribee.com/blog/2007/01/24/strategies-for-structuring-unit-tests/#comment-416</link>
		<dc:creator>Judah</dc:creator>
		<pubDate>Thu, 25 Jan 2007 00:33:32 +0000</pubDate>
		<guid>http://laribee.com/blog/2007/01/24/strategies-for-structuring-unit-tests/#comment-416</guid>
		<description>I agree with James, 1 assertion per test. I've found tests to be smaller this way as well as more readable.

We have some 10 projects in a solution. I used to have all unit tests in a single project, but things started getting hairy. I've since broken the unit tests up into projects. Now, 10 projects means 10 unit test projects. Easier to find and maintain and allows you to run only the tests your interested in fairly easily.

Use TestDriven.NET (Visual Studio integration). This makes running your tests a breeze: just right-click and Run Tests from the context menu. Or better yet, assign a hotkey to run tests. I've assigned CTRL+\ to run the current test fixture set, and CTRL+] to run the last test that was run.

Name your test fixtures something other than the class or object they're testing. For example, Foo.cs and FooFixture.cs.

Don't skimp on tests if you're in a hurry, it'll come back to bite you.

Lastly, run tests regularly and always before publishing latest bits.</description>
		<content:encoded><![CDATA[<p>I agree with James, 1 assertion per test. I&#8217;ve found tests to be smaller this way as well as more readable.</p>
<p>We have some 10 projects in a solution. I used to have all unit tests in a single project, but things started getting hairy. I&#8217;ve since broken the unit tests up into projects. Now, 10 projects means 10 unit test projects. Easier to find and maintain and allows you to run only the tests your interested in fairly easily.</p>
<p>Use TestDriven.NET (Visual Studio integration). This makes running your tests a breeze: just right-click and Run Tests from the context menu. Or better yet, assign a hotkey to run tests. I&#8217;ve assigned CTRL+\ to run the current test fixture set, and CTRL+] to run the last test that was run.</p>
<p>Name your test fixtures something other than the class or object they&#8217;re testing. For example, Foo.cs and FooFixture.cs.</p>
<p>Don&#8217;t skimp on tests if you&#8217;re in a hurry, it&#8217;ll come back to bite you.</p>
<p>Lastly, run tests regularly and always before publishing latest bits.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy Brayton</title>
		<link>http://laribee.com/blog/2007/01/24/strategies-for-structuring-unit-tests/#comment-415</link>
		<dc:creator>Jeremy Brayton</dc:creator>
		<pubDate>Thu, 25 Jan 2007 00:15:18 +0000</pubDate>
		<guid>http://laribee.com/blog/2007/01/24/strategies-for-structuring-unit-tests/#comment-415</guid>
		<description>Thank you. I have a hard time coming up with adequate starting points for tests. It's not that I'm an idiot, it's just that I can change my mind about something 500 million times before I think it's the right way(tm). I realize a lot of it is personal preference, but having it broken down severely helps. Having something like this to slap me into somewhat proper alignment is definitely a good thing.</description>
		<content:encoded><![CDATA[<p>Thank you. I have a hard time coming up with adequate starting points for tests. It&#8217;s not that I&#8217;m an idiot, it&#8217;s just that I can change my mind about something 500 million times before I think it&#8217;s the right way(tm). I realize a lot of it is personal preference, but having it broken down severely helps. Having something like this to slap me into somewhat proper alignment is definitely a good thing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://laribee.com/blog/2007/01/24/strategies-for-structuring-unit-tests/#comment-414</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Wed, 24 Jan 2007 21:05:36 +0000</pubDate>
		<guid>http://laribee.com/blog/2007/01/24/strategies-for-structuring-unit-tests/#comment-414</guid>
		<description>That's a solid tip. At very least "cohesive" assertions per test method, which should limit assertions (generally) to 1-5...</description>
		<content:encoded><![CDATA[<p>That&#8217;s a solid tip. At very least &#8220;cohesive&#8221; assertions per test method, which should limit assertions (generally) to 1-5&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Carr</title>
		<link>http://laribee.com/blog/2007/01/24/strategies-for-structuring-unit-tests/#comment-413</link>
		<dc:creator>James Carr</dc:creator>
		<pubDate>Wed, 24 Jan 2007 14:02:24 +0000</pubDate>
		<guid>http://laribee.com/blog/2007/01/24/strategies-for-structuring-unit-tests/#comment-413</guid>
		<description>Good list. Another one I would add is "one assertion per test method." 

One thing that always bites me is seeing a a test where the first test method brings back an object and does 20 random assertions against it, and then it is copy and pasted for each test method, with the intent hidden somewhere along those 20 assertions.</description>
		<content:encoded><![CDATA[<p>Good list. Another one I would add is &#8220;one assertion per test method.&#8221; </p>
<p>One thing that always bites me is seeing a a test where the first test method brings back an object and does 20 random assertions against it, and then it is copy and pasted for each test method, with the intent hidden somewhere along those 20 assertions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DotNetKicks.com</title>
		<link>http://laribee.com/blog/2007/01/24/strategies-for-structuring-unit-tests/#comment-411</link>
		<dc:creator>DotNetKicks.com</dc:creator>
		<pubDate>Wed, 24 Jan 2007 05:07:56 +0000</pubDate>
		<guid>http://laribee.com/blog/2007/01/24/strategies-for-structuring-unit-tests/#comment-411</guid>
		<description>&lt;strong&gt;Strategies for Structuring Unit Tests...&lt;/strong&gt;

You've been kicked (a good thing) - Trackback from DotNetKicks.com...</description>
		<content:encoded><![CDATA[<p><strong>Strategies for Structuring Unit Tests&#8230;</strong></p>
<p>You&#8217;ve been kicked (a good thing) - Trackback from DotNetKicks.com&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
