VS 2010, Test Driven Development and my Favorite New Button

Awww yeah...this new button in Visual Studio 2010 Beta 2 is the bomb. It’s going to save me lots of time. If you are a test driven development guy too you need to know about it. It is the “Toggle between suggestion and standard completion mode” button. Wow, how boring. It is, unless you’re a TDD guy.

That button, my friends, is your friend. So in this example I’m writing the test for the “Dude” class. That class will have first and last name properties that will store...first and last names. There will also be a full name property that will create a full name out of the two. Pretty basic. I wanted to write a test for this, partially because I heard that this feature was here.

So here is the difference. If the editor is in normal mode, the statement completion suggests “DudeTests” for me as I start typing the last part of teh statement, “Dude”. When I type the first parenthesis it turns “Dude” into “DudeTests” because that is the only class in scope that it knows that starts with “Dude”. Awesome when you have written the code. Annoying when you haven’t.

However, if you toggle that little button to on it will still suggest “DudeTests” but it doens’t autocomplete it for you. This is going to save me a bazillion ctrl-z’s. Try it out. It is da bomb.

Comments

Anderson Imes 2009-10-20 05:11:33

Awesome... that feature drives me crazy sometimes.