2009-07-22

NUnitEx

NUnitEx is an extension to NUnit.  It makes the assertions more of a flow to write.

Instead of writing

string myString = MyMethod();
Assert.AreEqual( "selfelected", myString );
one writes
string myString = MyMethod();
myString.Should().Be.EqualTo( "selfelected" );
A good thing with the former approach is that the coloured syntax makes it easier to distinquish method calls from assertions.

But when one tests exception throwing nunitex is the way to go.

Originally one had to write one method per call that threw an exception.  Even as a happy typist I think it was too much.  Nunitex easily handles exception throwing calls almost as ordinary calls.

See the example code at http://code.google.com/p/nunitex/ for yourself.

No comments: