« The Post Whiteboard Domain Model | Home | TDD: Learning NUnit »

Meet the new boss, same as the old boss

By indomitablehef | September 23, 2007

So, let’s skip the “sorry I haven’t posted in awhile” stuff and just get on with it, shall we?

After five months of trying to get used to the Unit Testing framework in Visual Studio.Net, I’ve decided to go back to NUnit. This is my first experience with version 2.4.x, with the new constraint-based assert model. One of the benefits of unit tests is their self-documenting capacity for documenting your application’s code. Examine the Unit tests, and it should be clear how the application is supposed to work. With the new constraint-based model in NUnit 2.4.x, you can now write your assert statements in a way that reads almost like an English sentence. Here’s a simple example:

Assert.That( myString, Is.EqualTo("Hello") );

Sweet, huh? So, yeah, it’s nice that Microsoft is including Unit Testing with Visual Studio, as well as other tools like MSBuild, etc., but I’m back to believing that they just aren’t ready yet.

Coming up: More agile-enabling practices, like Automated Builds with NAnt and Continuous Integration with CruiseControl.net.

Topics: Uncategorized |

Comments