Tuesday, September 13, 2005

Not doing what you want

I'm writing:
Validation.AssertIsTrue(
Directory.Exists(pathToLogDirectory),
"Supplied path does not point to an existing directory");

I'd like to write something like:
Assert.That(
Directory.Exists(pathToLogDirectory),
Returnes.True,
Otherwise.Throw(
new ApplicationException("Supplied path does not point to an existing directory")));


One day when the grass is green, the birds are singing and this god forsaken mainframe provides with me with flawless response buffers I'll nuke the Validation class and write, or steal depending on if it's already been done, the Assert.That concept.

Afaik it's only the Nmock2 team that has anything that expressive in the works, but as usual I could be dead wrong. If so, please tell me.

1 Comments:

At 31 October, 2005 23:23, Blogger Johan Andersson said...

TrackBack: http://johan.andersson.net/blog/2005/10/yoda-programming-language-what-mrten.html

 

Post a Comment

<< Home