Title: NUnit 2.4.1 &amp; Watin 1.1.0
Slug: nunit-2-4-1-watin-1-1-0
Date: 2007-05-05 03:57:00
Author: Kartones
Lang: en
Tags: Testing, .NET, Development
Description: NUnit 2.4.1 has a new constrained assert model that is more like natural language. WatiN 1.1.0 has been released and can be integrated with NUnit for web application testing.

 <p>There's a new version of <a href="https://nunit.org/">NUnit</a> out there, the 2.4.1. I was eager to try the new 2.4 constrained assert model, because I feel it's more like natural language.</p> <p>Instead of repeating stuff you can read in the official documentation, I will just leave two examples of how different is the new model:</p> <p>Old model:</p> <p><font face="Courier New"><font color="#408080">Assert</font>.AreEqual(<font color="#408080">MovementCommands</font>.TurnLeft, result);</font></p> <p>New model:</p> <p><font face="Courier New"><font color="#408080">Assert</font>.That(result, <font color="#408080">Is</font>.EqualTo(<font color="#408080">MovementCommands</font>.TurnLeft));</font></p> <p>And allows compose assertions too:</p> <p><font face="Courier New"><font color="#408080">Assert</font>.That(myNumber, <font color="#408080">Is</font>.GreaterThan(0) &amp; <font color="#408080">Is</font>.LessThanOrEqualTo(5));</font></p> <p> </p> <p>And, continuing with testing, another great tool I expect to use soon (maybe in my next work assignment ;),  WatiN <a href="http://watin.sourceforge.net/">has released the 1.1.0 version</a>. </p> <p>Apart from being quite usefull (web application testing has been quite painful until last years), it can be integrated in NUnit too (sorry MS guys, I still prefer CC.NET/NAnt before VSTS).</p>