NUnit 2.4 introduces a really nice programming model they call Constraint-Based Assert Model. I believe MbUnit 2.4 will also have this. I really like this approach to building asserts because it reads almost like English. Assert.That( myString, Is.EqualTo("Hello") );
Look at that fine piece of prose!
I’m so enamored of this approach I thought I’d try to bring it to Subsonic. Here is an example of two existing approaches to create a Query in Subsonic.
new Query("Products").WHERE("ProductId < 5");
new Query("Products").WHERE("ProductId", Comparison.LessThan, 5);
Now what don’t I like about these? Well in the first one, there’s no intellisence to guide me on making sure...