Visual Studio 2010: Making TDD Just a Little Easier

Many times it’s the little things that make life easier.  For people who practice TDD (Test Driven Development) with Visual Studio here is a common scenario that can be an annoyance: You’re writing your test and need to create an instance of a class, but that the class doesn’t exist yet.  So you type:

SomeClass test = new SomeClass();

Now, as you’re typing this the Visual Studio Intellisense tries to be very helpful, but the class just doesn’t exist yet so it gets confused.  The options it provides look like this:

image

Since the class doesn’t yet exist it doesn’t appear in the intellisense window and you often have to hit ESC to close Intellisense or it attempts to select something for you that is close to something it knows about.  Not exactly ideal.

Now, in Visual Studio 2010 this has been made much nicer.  Check this out:

image

This is the same situation where the SomeClass class has not been defined; however, Intellisense offers it as an option!  No more hitting ESC to close intellisense.  Now I just have to retrain myself to not hit the ESC when doing this. :)

Thanks to Jeff Blankenburg for showing me this.