Home > BDD > dSpec update

dSpec update

March 5th, 2007

Grab the code here: dSpec.rar

What’s new?

First, some semantics. In the last iteration you said:

ShouldEqual()
ShouldNotEqual()

Now you say:

Should.Equal()
Should.Not_.Equal()

You can use “Not_” on any specifier. Additionally you can now say:

Should.Be.GreaterThan().And_.Be.LessThan()

You can string together specifiers using “And_”.

I’ve added some new specifiers:

GreaterThan()
LessThan()
AtLeast()
AtMost()
Nil_()
Assigned()
DecendFrom()
OfType()
True()
False()

Also, all specifiers can be modified where before only ShouldEqual() could be modified.Some examples of some wild specs:

TheNumber := 3;
Specify.That(TheNumber).Should.Equal(3).And_.Not_.Equal(2).And_.Not_.Equal(4); // 5 is right out!

Specify.That(False).Should.Not_.Be.True.And_.Be.False.And_.Not_.Be.True;
Specify.That(42).Should.Be.AtLeast(40).And_.Not_.Be.GreaterThan(50).And_.Be.LessThan(50);

Have fun!

BDD

  1. Justin
    March 21st, 2007 at 09:03 | #1

    First off, I like the idea… I also like the general goal of the site.

    Are there any plans to support managed versions of Delphi? For me it is important that I try to single source my tests as much as possible, especially given that the VCL isn’t fully single sourced yet.

    Also, how committed are you to keeping this open source, if at all? Is this a project that you will eventually check into sourceforge?

  2. jdawkins
    March 22nd, 2007 at 07:18 | #2

    Thanks Justin.

    I am 100% committed to keeping this open source. Eventually I will check it into sourceforge.

    I haven’t had a chance to think about a managed version on the code. I think there should be one. I guess it’s the sort of think I could use help on if anyone were so inclined.

  3. March 26th, 2010 at 02:06 | #3

    Great series. A bit out of my league, but I’m learning stuff each step of the way. Can’t wait to get to it.

  4. June 13th, 2010 at 00:30 | #4

    All are so nice! I like that all video and there is really nice cinematography at there.

  5. June 22nd, 2010 at 01:55 | #5

    This was a good read, kinda early in the morning though. Should do some work Laughing lol

  6. June 22nd, 2010 at 01:56 | #6

    Although I can’t agree with all you staded, I must confess I do love your way of writing.

  7. June 24th, 2010 at 00:35 | #7

    Great post and now I know what to do, thank you! Actually this Blog post helped me a lot. I hope you continue writing about this kind of entry.

  8. June 24th, 2010 at 01:20 | #8

    I found this informative and interesting blog so i think so its very useful and knowledge able.I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me.

  9. June 24th, 2010 at 01:25 | #9

    Funny how no one seems to catch the fact that some local Chambers wish to keep from being blown up by the likes of SIEU thugs that have proven they will beat up opposition minding their own business &/or bite fingers off of them, as they did last year, thus choose not voice their views at times.Like the fraud that called a press conference in DC late 2009 — and were busted by the US Chamber. Hilarious!
    Our companies have been members of the local Chamber for many years.
    Why is MJ dead set against them? Because their views differ than yours?
    Interesting!

  10. June 28th, 2010 at 01:27 | #10

    I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post

  11. June 28th, 2010 at 19:01 | #11

    Hi! Like im doing this research paper on legalizing pot. I like info that you have given! Thank you!

  12. June 29th, 2010 at 23:51 | #12

    Happy to see your blog as it is just what I’ve looking for and excited to read all the posts.

  13. July 8th, 2010 at 00:27 | #13

    I admire the valuable information you offer in your articles. I will bookmark your blog and have my children check up here often. I am quite sure they will learn lots of new stuff here than anybody else!

  14. July 29th, 2010 at 22:25 | #14

    I suggest this site to my friends so it could be useful & informative for them also. Great effort.

  1. No trackbacks yet.

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word