After attending the fish bowl session at the Austin Code Camp, Chad Myers offered to help anyone with TDD and BDD. So last I night, we were able to hook up online. We used Skype and Microsoft SharedView to have a virtual pairing session. I felt it went really well and was still smiling the next day :). About half way into the session Jay Smith joined us.
The first task we had was setting up my environment with the correct development tools. If you are first starting out with TDD and BDD then you must have the correct tools. Below is what we installed and I will explain each.
ReSharper 4.0 Nightly Builds
ReSharper is a refactoring and productivity add-on for Visual Studio. I kind of think of it as IntelliSense on steroids. The ones who can master ReSharper can really gen some code. Below is a sample dialog box for renaming a method.
NUnit is one of the many unit testing frameworks. This framework was ported from JUnit. A unit testing framework is a must have when creating tests. In the next couple of blog posts I will show how NUnit works.
Rhino Mocks 3.5 Beta - For .Net 3.5
When using TDD you start with creating the test first. So since the domain objects are not created, you cannot build complete tests. To create the test you use mocks to act as the objects that are not created or difficult or impossible to incorporate into a unit test. You could think of mocks as a architect's sketch of a house. The sketch is a starting point to flesh out the details.
Lastly we installed TestDriven.Net. This makes it easy to run the unit test you create. We set up the following shortcut-keys.