<?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: Anyone with test framework experience?</title>
	<atom:link href="http://www.lazycoder.com/weblog/2006/10/05/anyone-with-test-framework-experience/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lazycoder.com/weblog/2006/10/05/anyone-with-test-framework-experience/</link>
	<description></description>
	<lastBuildDate>Fri, 07 Oct 2011 15:08:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Kevin Dente</title>
		<link>http://www.lazycoder.com/weblog/2006/10/05/anyone-with-test-framework-experience/comment-page-1/#comment-37454</link>
		<dc:creator>Kevin Dente</dc:creator>
		<pubDate>Sat, 07 Oct 2006 00:46:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.lazycoder.com/weblog/index.php/archives/2006/10/05/anyone-with-test-framework-experience/#comment-37454</guid>
		<description>I didn&#039;t mean that the constructor would never fail. But it will never return null. In other words:
FuzzyDateTextBox target = new FuzzyDateTextBox();

will never result in &quot;target&quot; being null. If the constructor blows up, it&#039;ll throw an exception, and the Assert will never be run.</description>
		<content:encoded><![CDATA[<p>I didn&#8217;t mean that the constructor would never fail. But it will never return null. In other words:<br />
FuzzyDateTextBox target = new FuzzyDateTextBox();</p>
<p>will never result in &#8220;target&#8221; being null. If the constructor blows up, it&#8217;ll throw an exception, and the Assert will never be run.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott</title>
		<link>http://www.lazycoder.com/weblog/2006/10/05/anyone-with-test-framework-experience/comment-page-1/#comment-37435</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Fri, 06 Oct 2006 05:10:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.lazycoder.com/weblog/index.php/archives/2006/10/05/anyone-with-test-framework-experience/#comment-37435</guid>
		<description>Oh, don&#039;t tell me that I forgot that classes and members are private by default. That fixed the problem in this case with MBUnit. I still had other problems with MBUnit that I haven&#039;t been able to fully explain.

Will the constructor never fail Kevin? Right now, my constructor is nothing more than the default constructor, in the future I may refactor the class to be derived from something else and call the base constructor in my constructor, and my supers constructor may be more complicated. Winform constructors created by the visual designer ALWAYS call &quot;InitializeComponent&quot; in the constructor, which in turn creates many, many other objects, some of whom have more complicated constructors. In fact, during my NUnit attempts, I had a constructor test fail due to a threading issue, The constructor has never failed during runtime, but my test failed. I suspect due to a bug in the testing framework. What do I do about my unit tests if they are dependent upon bugs in the framework? Do I not write unit tests for things that fail for reasons external to my code? It&#039;s one of my gripes about unit testing, how much is too much. What tests the unit tests I write? How do I verify they are testing the correct thing in the correct maner?</description>
		<content:encoded><![CDATA[<p>Oh, don&#8217;t tell me that I forgot that classes and members are private by default. That fixed the problem in this case with MBUnit. I still had other problems with MBUnit that I haven&#8217;t been able to fully explain.</p>
<p>Will the constructor never fail Kevin? Right now, my constructor is nothing more than the default constructor, in the future I may refactor the class to be derived from something else and call the base constructor in my constructor, and my supers constructor may be more complicated. Winform constructors created by the visual designer ALWAYS call &#8220;InitializeComponent&#8221; in the constructor, which in turn creates many, many other objects, some of whom have more complicated constructors. In fact, during my NUnit attempts, I had a constructor test fail due to a threading issue, The constructor has never failed during runtime, but my test failed. I suspect due to a bug in the testing framework. What do I do about my unit tests if they are dependent upon bugs in the framework? Do I not write unit tests for things that fail for reasons external to my code? It&#8217;s one of my gripes about unit testing, how much is too much. What tests the unit tests I write? How do I verify they are testing the correct thing in the correct maner?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Dente</title>
		<link>http://www.lazycoder.com/weblog/2006/10/05/anyone-with-test-framework-experience/comment-page-1/#comment-37433</link>
		<dc:creator>Kevin Dente</dc:creator>
		<pubDate>Fri, 06 Oct 2006 04:50:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.lazycoder.com/weblog/index.php/archives/2006/10/05/anyone-with-test-framework-experience/#comment-37433</guid>
		<description>Em, not that this really solves your problem, but your constructor test will never fail. Calling &quot;new ClassName()&quot; will never return null.

Also, I noticed that your FuzzyDateTextBoxTests is not declared public. That might be causing your problem where it doesn&#039;t find any tests.</description>
		<content:encoded><![CDATA[<p>Em, not that this really solves your problem, but your constructor test will never fail. Calling &#8220;new ClassName()&#8221; will never return null.</p>
<p>Also, I noticed that your FuzzyDateTextBoxTests is not declared public. That might be causing your problem where it doesn&#8217;t find any tests.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott</title>
		<link>http://www.lazycoder.com/weblog/2006/10/05/anyone-with-test-framework-experience/comment-page-1/#comment-37429</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Fri, 06 Oct 2006 02:58:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.lazycoder.com/weblog/index.php/archives/2006/10/05/anyone-with-test-framework-experience/#comment-37429</guid>
		<description>Well, of course that works. ;) Actually, my code looked like this.

namespace MBUnitTest
{
    [TestFixture]
    public class MBUnitTest
    {
        [Test]
        public void FailTest()
        {
            Assert.Fail(&quot;It Failed&quot;);
        }
    }
}

I load that in the MBUnit GUI, the test shows up, and it fails as planned. However, the GUI doesn&#039;t show ANY tests in the following code.

namespace FuzzyDateTextBoxTests
{
    [TestFixture]
    class FuzzyDateTextBoxTests
    {
        [Test]
        public void TestConstructor()
        {
            FuzzyDateTextBox target = new FuzzyDateTextBox();

            Assert.IsNotNull(target, &quot;Constructor failed&quot;);
        }

        [Test]
        public void TestDateParse()
        {
            FuzzyDateTextBox _fdtb = new FuzzyDateTextBox();
            _fdtb.Text = &quot;07/15/2006&quot;;
        }

    }
}

Which confuses me to no end.  However, if I add the MBUnitTest code to the FuzzyDateTextBox code and load the assembly in theMBUnit gui, it shows the MBUnitTests, bt not the FuzzyDateTextBox test.

Any ideas? What am I doing wrong. I swear the code I posted above in the code in it&#039;s entirety.</description>
		<content:encoded><![CDATA[<p>Well, of course that works. <img src='http://www.lazycoder.com/weblog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Actually, my code looked like this.</p>
<p>namespace MBUnitTest<br />
{<br />
    [TestFixture]<br />
    public class MBUnitTest<br />
    {<br />
        [Test]<br />
        public void FailTest()<br />
        {<br />
            Assert.Fail(&#8220;It Failed&#8221;);<br />
        }<br />
    }<br />
}</p>
<p>I load that in the MBUnit GUI, the test shows up, and it fails as planned. However, the GUI doesn&#8217;t show ANY tests in the following code.</p>
<p>namespace FuzzyDateTextBoxTests<br />
{<br />
    [TestFixture]<br />
    class FuzzyDateTextBoxTests<br />
    {<br />
        [Test]<br />
        public void TestConstructor()<br />
        {<br />
            FuzzyDateTextBox target = new FuzzyDateTextBox();</p>
<p>            Assert.IsNotNull(target, &#8220;Constructor failed&#8221;);<br />
        }</p>
<p>        [Test]<br />
        public void TestDateParse()<br />
        {<br />
            FuzzyDateTextBox _fdtb = new FuzzyDateTextBox();<br />
            _fdtb.Text = &#8220;07/15/2006&#8243;;<br />
        }</p>
<p>    }<br />
}</p>
<p>Which confuses me to no end.  However, if I add the MBUnitTest code to the FuzzyDateTextBox code and load the assembly in theMBUnit gui, it shows the MBUnitTests, bt not the FuzzyDateTextBox test.</p>
<p>Any ideas? What am I doing wrong. I swear the code I posted above in the code in it&#8217;s entirety.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Haacked</title>
		<link>http://www.lazycoder.com/weblog/2006/10/05/anyone-with-test-framework-experience/comment-page-1/#comment-37426</link>
		<dc:creator>Haacked</dc:creator>
		<pubDate>Fri, 06 Oct 2006 00:31:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.lazycoder.com/weblog/index.php/archives/2006/10/05/anyone-with-test-framework-experience/#comment-37426</guid>
		<description>Which version of MbUnit are you running?  I assume you made sure your test project references the MbUnit.Framework.dll and that you marked up your test classes with the [TestFixture] attribute and your test methods with the [Test] attribute.

[TestFixture]
public class MyTests
{
  [Test]
  public void SomeTest()
  {
    Assert.Fail(&quot;It failed&quot;);
  }
}

Put that class in a class library, compile it, then point MbUnit to that assembly.</description>
		<content:encoded><![CDATA[<p>Which version of MbUnit are you running?  I assume you made sure your test project references the MbUnit.Framework.dll and that you marked up your test classes with the [TestFixture] attribute and your test methods with the [Test] attribute.</p>
<p>[TestFixture]<br />
public class MyTests<br />
{<br />
  [Test]<br />
  public void SomeTest()<br />
  {<br />
    Assert.Fail(&#8220;It failed&#8221;);<br />
  }<br />
}</p>
<p>Put that class in a class library, compile it, then point MbUnit to that assembly.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

