<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Tdd on Dr. Random</title><link>https://drrandom.org/tags/tdd/</link><description>Recent content in Tdd on Dr. Random</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Tue, 15 Dec 2009 15:08:00 +0000</lastBuildDate><atom:link href="https://drrandom.org/tags/tdd/index.xml" rel="self" type="application/rss+xml"/><item><title>More CodeRush Awesomeness</title><link>https://drrandom.org/2009/12/15/more-coderush-awesomeness/</link><pubDate>Tue, 15 Dec 2009 15:08:00 +0000</pubDate><guid>https://drrandom.org/2009/12/15/more-coderush-awesomeness/</guid><description>&lt;p&gt;On November 27th, a beta release of the 9.3 version of the Developer Express components, including CodeRush and Refactor Pro! was made available to subscribers.  This release is pretty significant to me because it contains a major feature that I have been waiting for &lt;a href="https://drrandom.org/2007/07/13/taking-the-coderush-plunge/"&gt;for a long time&lt;/a&gt;: A Unit Test Runner.  There were some teasers released by &lt;a href="http://community.devexpress.com/blogs/markmiller/"&gt;Mark Miller&lt;/a&gt; a while back, which only made me want to get my hands on the tool that much more.  My initial impressions are that it is very nice.  It is similar to &lt;a href="http://www.testdriven.net"&gt;TestDriven.Net&lt;/a&gt; in that it provides context menu options to run tests at various levels of granularity (single test, file, project, and solution level) and includes a debug option.  At this point it does not contain some of the additional coolness that TestDriven gives you like NCover/Team Coverage and TypeMock integration, but it does have the advantage of being extensible.  I know it was extensible because Mr. Miller &lt;a href="http://community.devexpress.com/blogs/markmiller/archive/2009/11/16/the-test-runner-you-ve-been-waiting-for.aspx"&gt;told me it was extensible&lt;/a&gt; (the title “The Extensible Unit Test Runner You’ve Been Waiting For” was a clue).  I did not realize how extensible, however, until after I submitted a &lt;a href="http://www.devexpress.com/issue=B142663"&gt;bug report&lt;/a&gt; to DevExpress.  The bug I was reporting (the NUnit TestCase attributes were not recognized), it turns out, was already brought to the attention of the DX team by way of a &lt;a href="http://community.devexpress.com/forums/p/83453/285881.aspx#285881"&gt;forum post&lt;/a&gt;, and they had already planned on correcting it with the next 9.3 release, but I could have saved myself (and Vito on DevExpress team) some time by taking a peek at the source samples bundled with the 9.3 release.  Yep, you guessed it, there with a shared source license were all of the test framework implementation projects.  So this meant I could whip together my own temporary fix while I was waiting for the next release.  It seemed like something that other folks might want to know about, so I thought I would share it here.&lt;/p&gt;</description></item><item><title>More On Testing and "Friend" Assemblies</title><link>https://drrandom.org/2007/06/18/more-on-testing-and-friend-assemblies/</link><pubDate>Mon, 18 Jun 2007 15:33:00 +0000</pubDate><guid>https://drrandom.org/2007/06/18/more-on-testing-and-friend-assemblies/</guid><description>&lt;p&gt;So if you recall from some of my earlier posts, I&amp;rsquo;ve talked about the concept of the &amp;ldquo;Friend&amp;rdquo; class in C++ and how it could apply to TDD within .Net.  Well, today, with the help of Roy Osherove, I just stumbled upon the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.runtime.compilerservices.internalsvisibletoattribute.aspx" title="InternalsVisibleToAttribute"&gt;InternalsVisibleToAttribute&lt;/a&gt; within .Net 2.0.  This allows you to specify within one assembly, another assembly that should have access to the &lt;strong&gt;internal&lt;/strong&gt; members of your assembly.  This is genius, and goes a long way towards allowing you to keep your code encapsulated, while still being testable.  If we could just get them to go one step farther, and allow for access to private and protected members as well, life would be good, and there would be no more of this OOD vs TOOD junk.&lt;/p&gt;</description></item><item><title>Struggles with the UpdaterApplicationBlock</title><link>https://drrandom.org/2007/06/11/struggles-with-the-updaterapplicationblock/</link><pubDate>Mon, 11 Jun 2007 18:53:07 +0000</pubDate><guid>https://drrandom.org/2007/06/11/struggles-with-the-updaterapplicationblock/</guid><description>&lt;p&gt;The project I&amp;rsquo;m working on now has a huge need for auto-update.  Strangely enough, there aren&amp;rsquo;t a whole lot of documented solutions for an auto-update application for .Net 1.1.  In the 2.0 world you have ClickOnce, which handles those sorts of things for you (and in a way that isn&amp;rsquo;t terribly difficult to manage as a developer&amp;hellip;as long as you pay attention to what your doing), but the only real option you get from MS on this is the AutoUpdater Application Block from the Patterns and Practices guys.  I took a look at this when it was in it&amp;rsquo;s 1.0 version a while back, and really didn&amp;rsquo;t care for it much.  The big reason was that it required you set up an AppStart.exe file, which would take a look at your config file to determine which directory to start the app from.  When updates arrived, they were put in new directories based on versions.  This seemed like a lot of effort, and a lot of overhead.  The good news is that there is now a 2.0 version of the application block, and it looks like it is much more configurable, and has the ability to do inproc updates.&lt;/p&gt;</description></item><item><title>More Thoughts on Language Support of TDD</title><link>https://drrandom.org/2007/06/04/more-thoughts-on-language-support-of-tdd/</link><pubDate>Mon, 04 Jun 2007 14:21:47 +0000</pubDate><guid>https://drrandom.org/2007/06/04/more-thoughts-on-language-support-of-tdd/</guid><description>&lt;p&gt;Thinking about &lt;a href="https://drrandom.org/2007/05/29/to-toop-or-oop-how-to-decide/" title="To TOOP or OOP? How to decide?"&gt;my earlier post&lt;/a&gt; discussing the OOP vs TOOP problem, I mentioned at the end that the best solution to this problem in my mind would be integrated language support for test classes.  Specifically, a way to let the Compiler/Runtime know that a specific class is a test class, and should therefore be able to access any and every property of a class.&lt;/p&gt;
&lt;p&gt;It occurred to me that such blatant intrusion into the privacy of a class is not unknown in the programming world.  C++ has the notion of a &amp;ldquo;Friend&amp;rdquo; class.  This is a class that can access all members of another class regardless of their protection level.  To keep things civil, so that just any class can&amp;rsquo;t declare itself to be a Friend of any class it wants, the class that the Friend class would be accessing would declare specifically that classes X, Y and Z are fiends, and so can have free reign.  Granted this is considered to be rather scary, and one of those features that makes C++ an ideal tool for shooting ones own foot off.&lt;/p&gt;</description></item><item><title>Using Unit Testing To Document Requirements</title><link>https://drrandom.org/2007/06/01/using-unit-testing-to-document-requirements/</link><pubDate>Fri, 01 Jun 2007 15:17:02 +0000</pubDate><guid>https://drrandom.org/2007/06/01/using-unit-testing-to-document-requirements/</guid><description>&lt;p&gt;Here is something I&amp;rsquo;ve been kicking around in my head for a while, and thought I would put it down in more or less a &amp;ldquo;permanent&amp;rdquo; format so maybe I&amp;rsquo;ll do something about it sometime&amp;hellip;&lt;/p&gt;
&lt;p&gt;Back when I was first trying to get my head around TDD, one of the things that I found most clarifying was an idea I first saw in &lt;a href="http://www.amazon.com/Test-Driven-Development-Microsoft-NET-Professional/dp/0735619484" title="Test Driven Development in Microsoft .Net"&gt;Test Driven Development in Microsoft .Net&lt;/a&gt; (Microsoft Press).  The idea is that you write tests based on your requirements.  So as a developer, you should have hopefully been given a list of requirements by someone for the project you are working on.  When you go to build the software you start looking at the requirements list, and the pick on (usually a simple one) to start implementing.  Once you have your requirement you start brainstorming tests that can be implemented to fulfill that requirement.  Once you can no longer think of tests for a requirement, you move on to the next one.  After that once you have run out of requirements, then your done writing the software.&lt;/p&gt;</description></item><item><title>I love Mock Objects, but am I a "Mockist"?</title><link>https://drrandom.org/2007/05/29/i-love-mock-objects-but-am-i-a-mockist/</link><pubDate>Tue, 29 May 2007 15:45:00 +0000</pubDate><guid>https://drrandom.org/2007/05/29/i-love-mock-objects-but-am-i-a-mockist/</guid><description>&lt;p&gt;I have officially crossed over&amp;hellip;.I am now using Mock Objects in my tests and &lt;strong&gt;loving it&lt;/strong&gt;.  After much humming and hawing, and trying to figure out how to write truly effective tests, I decided to give it a go, and so grabbed a copy of &lt;a href="http://www.ayende.com/projects/rhino-mocks.aspx" title="Rhino Mocks Home"&gt;Rhino Mocks&lt;/a&gt; and started the grueling task of converting some data access code so that I no longer needed a database to run the tests.  It took a little bit to get my mind around the new way of thinking, but I have to say it worked great.  I&amp;rsquo;m now able to test my data access routines with complete success, and about a 95% code coverage rate.  This is all on top of the fact that I&amp;rsquo;m using Enterprise Library (for 1.1) for data access and exception handling.&lt;/p&gt;</description></item><item><title>Capturing Programmer Intent</title><link>https://drrandom.org/2007/01/02/capturing-programmer-intent/</link><pubDate>Tue, 02 Jan 2007 16:48:24 +0000</pubDate><guid>https://drrandom.org/2007/01/02/capturing-programmer-intent/</guid><description>&lt;p&gt;I was listening to the &lt;a href="http://www.skyscrapr.net/blogs/arcasts/default.aspx"&gt;ArCast&lt;/a&gt; &lt;a href="http://www.skyscrapr.net/blogs/arcasts/default.aspx?ID=595"&gt;recorded&lt;/a&gt; with &lt;a href="http://www.hanselman.com/blog/default.aspx"&gt;Scott Hanselman&lt;/a&gt; earlier today, and he was talking about the idea that &lt;a href="http://www.hanselman.com/blog/ARCastnetInterviewedByRonJacobsAtTechEd2006.aspx"&gt;Non-Software artifacts should approach zero&lt;/a&gt;.  If you&amp;rsquo;ve seen some of his posts, or listened to some &lt;a href="http://www.hanselminutes.com"&gt;Hanselminutes&lt;/a&gt; podcasts, you have no doubt come across this idea before.  I like this particular phrasing mostly because it gets to the heart of what I think one of the most often overlooked aspect of the programming process is; Namely, the intent of the programmer.&lt;/p&gt;</description></item></channel></rss>