Skip to main content


Showing posts from June, 2006

Behaviour Driven Development...Introducing NSpec

A while ago I read an interesting post from Udi Dahan and it formally introduced me to the concept of Behaviour Driven Development (BDD) and Behaviour Specification. Unwittingly I'd arrived at the concept myself (albeit a bit later than everyone else!) when thinking about (and trying to communicate to the team) what Unit Tests ultimately perform...I formed this concept whilst trying to distill my approach to coding into a bullet point check list of steps we should all be following to produce robust, good quality code.

One of the steps is to comment the interface methods and include the exceptions we anticipate it could throw. For instance a "ReadDataFromFile" method should throw a "FileNotFoundException" in the pre-condition checks at the beginning of the method if the file does not exist. Thus you are defining the behaviour of the method and hence my enlightenment moment!

Shortly after this point I read that blog from Udi and it all made sense and the terminolog…