Uncategorized

NBuilder website launched

Posted on June 14, 2009. Filed under: Uncategorized |

I’ve created a website for NBuilder.

I’ve created some documentation for the main features which I’ll be adding to over the coming weeks.

Please check it out – http://nbuilder.org

Advertisements
Read Full Post | Make a Comment ( 1 so far )

Fluent Dates added to NBuilder

Posted on June 6, 2009. Filed under: Uncategorized |

I’ve just published a new release of NBuilder with fluent date support. This means you can specify dates in a nice readable syntax.

The Problem

Say you want to set a date, 21:15 on March 21st 2008

You’d most likely do it something like this:

var date = new DateTime(2009, 03, 21, 21, 15);

This doesn’t read particularly well especially if you have loads of different dates.

The Solution

NBuilder’s fluent dates:

var date = The.Year(2008).On.March.The21st.At(21, 15);

That is the full syntax, there are loads of different variations, for convenience and better readability within different contexts.

No year (defaults to current year):

product.Created = On.March.The21st.At(09, 15);

No time:

product.LastEdited = On.March.The21st;

Using The(x) instead:

product.Created = On.March.The(15)

Using static months instead:

Just having the month without On. might read better in certain situations

myEntity.LastEditedOn = December.The10th

Specifying a time:

TimeSpan time = At.Time(23, 15);

or

TimeSpan time = The.Time(23, 15);

Today at 2pm:

var date = Today.At(14, 00);

You can use seconds as well:

var dateTime = July.The4th.At(07, 00, 05);

Using in the context of NBuilder

You can use the dates anywhere but in the context of NBuilder it would be something like this:

Fluent dates and NBuilder

Of course you can use the fluent dates with the RandomGenerator too:

random_fluent_dates

Hope you find it useful. Any comments / suggestions, please let me know.

Download NBuilder 2.1.7

Download NBuilder 2.1.7 from google code

Read Full Post | Make a Comment ( None so far )

NBuilder update coming shortly…

Posted on March 26, 2009. Filed under: Uncategorized |

My contract at De Beers is coming to an end on the 3 April and I’ve been working incredibly long hours finishing off my final project so I haven’t had any time to work on NBuilder. I do have some really big changes coming soon which will really improve it a great deal and turn it into something robust which can be used on real projects.

After almost a year at De Beers, I’ve decided to have a bit of time off to work on my own stuff.  I’m not sure if this is a good idea given the ‘current climate’ but we’ll see!

I’ll probably have a month or two off, NBuilder is top of my list of things to do as I really think it has a lot of potential. Then I plan to learn as much as I can about automated acceptance testing.

Read Full Post | Make a Comment ( None so far )

NBuilder source code available

Posted on March 2, 2009. Filed under: Uncategorized |

I have posted the source for NBuilder on google code.

http://code.google.com/p/nbuilder/

Read Full Post | Make a Comment ( None so far )

Liked it here?
Why not try sites on the blogroll...