<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Plip&amp;#39;s Weblog : NUnit</title><link>http://weblogs.asp.net/plip/archive/tags/NUnit/default.aspx</link><description>Tags: NUnit</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>This week I 'ave mostly been eating MbUnit</title><link>http://weblogs.asp.net/plip/archive/2006/10/22/This-week-I-_2700_ave-mostly-been-eating-MbUnit.aspx</link><pubDate>Sun, 22 Oct 2006 22:03:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:707484</guid><dc:creator>Plip</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/plip/rsscomments.aspx?PostID=707484</wfw:commentRss><comments>http://weblogs.asp.net/plip/archive/2006/10/22/This-week-I-_2700_ave-mostly-been-eating-MbUnit.aspx#comments</comments><description>&lt;p&gt;In the famous words of &lt;a href="http://www.bbc.co.uk/comedy/fastshow/characters/jesse.shtml"&gt;Jesse from the Fast show&lt;/a&gt;...&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.bbc.co.uk/gloucestershire/voices2005/images/jesse_lead_203x152.jpg" alt="" width="203" height="152" /&gt; &lt;/p&gt;&lt;p&gt;This week I &amp;#39;ave mostly been eating MbUnit. &lt;/p&gt;&lt;p&gt;&lt;a href="http://weblogs.asp.net/astopford/"&gt;Andrew&lt;/a&gt; has spent several months persuading me of the virtues of MbUnit and it&amp;#39;s finally paid off. I&amp;#39;ve moved the last of my NUnit tests over the MbUnit today.&lt;/p&gt;&lt;p&gt;What&amp;#39;s sparked off this mass migration is one really simple feature that MbUnit provides that NUnit does not, the RowTest.&lt;/p&gt;&lt;p&gt;The RowTest allows me to pass in different arguments to the same unit test in an itterative fashion, effectivly reducing the number of tests I have to write by a factor of the variations of parameters a sequence of code&amp;nbsp;could possibly&amp;nbsp;have, in some cases this can be hundreds.&lt;/p&gt;&lt;p&gt;Here&amp;#39;s a test I&amp;#39;ve put together for a session on unit testing in .NET and ASP.NET that I&amp;#39;m giving in Newcastle later this week.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;[RowTest()]&lt;br /&gt;[Row(0, 0, false)]&lt;br /&gt;[Row(0, 1, true)]&lt;br /&gt;[Row(0, -1, false)]&lt;br /&gt;[Row(0, 0.1, true)]&lt;br /&gt;[Row(0, -0.1, false)]&lt;br /&gt;public void CheckNorthOfEquator(double Longitude, double Latitude, bool IsInNorth)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OurClassLibrary.Point P = new OurClassLibrary.Point();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; P.Longitude = Longitude;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; P.Latitude = Latitude;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; bool Actual = OurClassLibrary.PositionManager.IsNorthOfEquator(P);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Assert.AreEqual(Actual, IsInNorth);&lt;br /&gt;}&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;The RowTest is a really slick feature and it&amp;#39;s one I&amp;#39;ve fallen in love with.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=707484" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/plip/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/plip/archive/tags/NUnit/default.aspx">NUnit</category><category domain="http://weblogs.asp.net/plip/archive/tags/Testing/default.aspx">Testing</category><category domain="http://weblogs.asp.net/plip/archive/tags/MbUnit/default.aspx">MbUnit</category><category domain="http://weblogs.asp.net/plip/archive/tags/TestDriven.NET/default.aspx">TestDriven.NET</category></item></channel></rss>