dSpec alpha
Release early and release often … =)
I’ve uploaded my first go-around here: http://www.delphixtreme.com/downloads/dspec/dSpec.rar
dSpec is an extension of the DUnit framework. Behavior specifications are creating by descending from TContext (instead of TTestCase) and using published methods to execute the specifications (just like in DUnit). As discussed in the previous blog entry you assert behavior using the Specify.That method instead of using CheckEquals. Where before we would have said:
if WeAreInSectorZZ9PluralZAlpha then
CheckNotEquals(42, TheAnwserToLifeTheUniverseAndEveryThing)
else
CheckEquals(42, TheAnwserToLifeTheUniverseAndEverything)
We can now say:
Specify.That(TheAnwserToLifeTheUniverseAndEverything).ShouldEqual(42).Unless(WeAreInSectorZZ9PluralZAlpha);
(that line was a little too long for this blog theme. See the example project for the whole Hitchhikers Guide to the Galaxy joke =P )
As you can see we can modify the specification “ShouldEqual” with “Unless”. We can even say:
Specify.That(f).ShouldEqual(3.5).WithAToleranceOf(0.01).Unless(ToleranceIsInvalid)
Here we string together many modifiers.
See the dSpecBehaviors project in the specifications folder of the archive for more examples.
Remember this is a first stab. I only implemented enough to show how this sort of thing might work. I’m interested in hearing your comments.
it was a wonderful chance to visit this kind of site and I am happy to know. thank you so much for giving us a chance to have this opportunity!
I appreciate yout report.
I found your website perfect for my needs. It contains wonderful and helpful posts. I have read most of them and got a lot from them.
Best canon Coffee Mugs! Funny, Cute, & Humorous Unique designs. Also find Travel Mugs, Coffee Cups also, or Create Photo Personalized Mugs & Drinkware