NUnitEx is an extension to NUnit. It makes the assertions more of a flow to write.
Instead of writing
string myString = MyMethod();one writes
Assert.AreEqual( "selfelected", myString );
string myString = MyMethod();A good thing with the former approach is that the coloured syntax makes it easier to distinquish method calls from assertions.
myString.Should().Be.EqualTo( "selfelected" );
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:
Post a Comment