All posts tagged 'bunit'

.NET Musings

Practical T/BDD - Half Day Hands-on Lab at CodeMash 2010

What are we going to do for four hours?  Well, to say it succinctly, we are going to code.  I’m constantly getting feed back that developers understand the concepts of Test/Behavior Driven Development, but can’t make the jump to real world use.  So, let’s develop an application that will actually be useful to some/most/all of the attendees after the session is complete and they go on their merry way.

I often run into issues with third party tools and keeping them up to date in my projects. Tools like MbUnit, MSpec, NHibernate, etc.  I always set up a folder in my solution to hold all of the assemblies referenced.   I do this instead of using the GAC (or Program Files or whatever) to prevent the configuration nightmare that plagues a lot of projects out there.  This works great until it’s time to update all of the local files with the newest bits.  Turns into a fairly manual process.  (Sure, I could power script this, but then my context for the session would go away).

The requirements are simple (and incomplete – go figure, they are requirements after all).

  • Pass in a target directory and a list of tools
  • Get list of all files for each tool from the configuration data.
  • Copy all missing or updated files to the target locations.

Given that minimal set of details, we are going to build the software test first.  How? By using MSpec to flush out the specifications, MbUnit to control the assertions, and RhinoMocks for the mocking framework.

The initial set of specifications and shell projects are located at http://www.skimedic.com/samples/CodeMash2010PreconSetup.zip.  Please have this file downloaded in addition to the tools MSpec, MbUnit, and RhinoMocks, and be ready to code!

Updated:

Please also have a test runner loaded – I will be using ReSharper, which can be evaluated from here ReSharper Trial.  Install MbUnit/Gallio after R#. 

See you Wednesday!

Happy Coding!

Managed Windows Shared Hosting by OrcsWeb