<?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: Effective Tests: A Unit Test Example</title>
	<atom:link href="http://lostechies.com/derekgreer/2011/03/14/effective-tests-a-unit-test-example/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/derekgreer/2011/03/14/effective-tests-a-unit-test-example/</link>
	<description>pursuing well-crafted software</description>
	<lastBuildDate>Tue, 14 May 2013 13:08:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: Derek Greer</title>
		<link>http://lostechies.com/derekgreer/2011/03/14/effective-tests-a-unit-test-example/#comment-82</link>
		<dc:creator>Derek Greer</dc:creator>
		<pubDate>Fri, 29 Apr 2011 13:35:00 +0000</pubDate>
		<guid isPermaLink="false">/blogs/derekgreer/archive/2011/03/14/effective-tests-a-unit-test-example.aspx#comment-82</guid>
		<description>I present &quot;baby steps&quot; toward the beginning of the series, but topics for
further improving upon the intent of our tests will be discussed as the
series progresses.</description>
		<content:encoded><![CDATA[<p>I present &#8220;baby steps&#8221; toward the beginning of the series, but topics for<br />
further improving upon the intent of our tests will be discussed as the<br />
series progresses.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wojtek</title>
		<link>http://lostechies.com/derekgreer/2011/03/14/effective-tests-a-unit-test-example/#comment-81</link>
		<dc:creator>Wojtek</dc:creator>
		<pubDate>Fri, 29 Apr 2011 12:47:00 +0000</pubDate>
		<guid isPermaLink="false">/blogs/derekgreer/archive/2011/03/14/effective-tests-a-unit-test-example.aspx#comment-81</guid>
		<description>AAA unit test patern is very good on simple object, on more complex it is sometimes better to create one test class for each context of tested class. Put Arrange and Act in SetupContext method and test all results in each test method:

[TestFixutre]
public class WhenAddingValueToTheContainer()
{

[TestFixtureSetup]
SetupContext()
{
      // Create sample data
     // Act on it
}

[Test]
public void ShouldContainOneElement()
{
   Assert.That(_container.Items, Has.Count.EqualTo(1));
}

[Test]
public void ShouldHaveTotalValueEqualTo100()
{
   Assert.That(_container.TotalValue, Is.EqualTo(100));
}</description>
		<content:encoded><![CDATA[<p>AAA unit test patern is very good on simple object, on more complex it is sometimes better to create one test class for each context of tested class. Put Arrange and Act in SetupContext method and test all results in each test method:</p>
<p>[TestFixutre]<br />
public class WhenAddingValueToTheContainer()<br />
{</p>
<p>[TestFixtureSetup]<br />
SetupContext()<br />
{<br />
      // Create sample data<br />
     // Act on it<br />
}</p>
<p>[Test]<br />
public void ShouldContainOneElement()<br />
{<br />
   Assert.That(_container.Items, Has.Count.EqualTo(1));<br />
}</p>
<p>[Test]<br />
public void ShouldHaveTotalValueEqualTo100()<br />
{<br />
   Assert.That(_container.TotalValue, Is.EqualTo(100));<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
