I recently wrote a small 500 word article on Behavior Driven Development and the subtle differences between it and Test Driven Development. However, there isn’t much you can talk about in 500 words and it makes it even harder if you can’t really format code or show images. We agreed with Eric Nelson that I would post some images of what I was referring to in the article, on my blog. The newsletter should go out today, as such, here is the follow-up post.
Snapshot 1:
Test written using MSpec in C#. The
Establish is used to setup the actual scenario. The
Because is where the actual action takes place. Finally the
It sections are where the assertions happen, where we verify
the behavior.
Snapshot 2:
Output of the test run using TestDriven.NET.
It is generated using the class name and the It declarations to
produce a nicely formatted output (removing the underscores)