Debugging Visual Studio Extensions

Writing Visual Studio Extensions has gotten much easier with recent versions of Visual Studio, but figuring out how to debug them can be hard. When you debug an extension, you run it in an instance of Visual Studio using a separate set of settings called an experimental hive. When you launch this from Visual Studio, it takes care of installing your extension and the debugger is attached to Visual Studio itself.

(more…)

Read more

Using NUnit’s TestCase Attribute

In the last post, we setup an NUnit test project and ran it in Visual Studio. In this post we are going to expand on that code to add more unit tests using the NUnit TestCase attribute.

Looking back at the last post, we are testing a method that converts an enum value to a friendly string by splitting the enum name at capitals. In that post, we only tested with one enum value. In this post, we will test with multiple enum values to ensure that the method handles every type of input. We will then remove code duplication by using the [TestCase] attribute to run one test many times with different data. (more…)

Read more