views:

353

answers:

4

Having come across a link on stack overflow, I have found the writings of Miško Hevery very engaging reading. So good that I am seeing a new approach to what I previously thought I was doing quite well.

He talks mainly about Dependency Injection, Automated Unit Testing and Good Design.

A number of the good practices he advocates are things that can be programatically detected. And so there is a program to detect them Google Testability Explorer.

My questions is:

  • Is there a C# equivalent to the Java based Google Testability Explorer out there?
  • If so, which is the best?
+1  A: 

It doesn't provide the information in quite the same way as the Google Testability Explorer, but NDepend (non-free) provides a lot of code analysis for .Net assemblies.

David Kemp
IMHO, signal/noise ratio is very low in NDepend =(
Yacoder
A: 

You can also use FXCop.

FxCop is an application that analyzes managed code assemblies (code that targets the .NET Framework common language runtime) and reports information about the assemblies, such as possible design, localization, performance, and security improvements. Many of the issues concern violations of the programming and design rules set forth in the Design Guidelines for Class Library Developers, which are the Microsoft guidelines for writing robust and easily maintainable code by using the .NET Framework.

Hope it helps, Bruno Figueiredo

Bruno Shine
A: 

In addition to NDepend and Fx-Cop (both good), there is also a free CodeMetric add-in for Reflector

Mitch Wheat
Don Vince
+1  A: 

Pex is an interesting entry. It has the potential to take testing to a new level, especially when combined with Code Contracts.

Bryan Watts