23 October 2009

Use AutoHotKey to enable easy BDD naming style

When writing BDD specifications I prefer to use StoryQ. But on smaller projects I often revert to using more traditional TDD with a dash of BDD naming style:

8 public class MessageBusTests

9 {

10 public void Should_send_message_when_event_occur()

11 {

12 // SUT code

13 }

14 }


But typing the underscores soon become tiresome so I use AutoHotKey and a script by JP Boodhoo to auto-insert an underscore every time I hit space.

If you would like to try this out, do the following:
  1. Install AutoHotKey
  2. Copy the file "BDD naming mode.ahk" to your start menu folder along with the two icon files from the zip file.
  3. Double click the .ahk file to enable the script or restart your computer.
Now you can turn on/off the BDD naming style using Ctrl+Shift+U. The BDD icon in your tray should change to indicate activation.

Download BDD naming mode script and icons: AutoHotKeyBDDNamingMode.zip

Labels: ,


Comments: Post a Comment



Links to this post:

Create a Link



<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]