Rory Primrose

Learn from my mistakes, you don't have time to make them yourself

View project on GitHub

Using GhostDoc to document unit test classes

To follow up on my last post about documenting unit test methods with GhostDoc, a similar concept can be applied to documenting unit test classes.

Add a custom rule under the Classes section in the GhostDoc configuration dialog.

I have used the name “Matches unit test class” and identified type names that end with “Tests”. I have entered the summary documentation with the following value:

The $(TypeName.ShortNameAsSee)
class is used to test the <see cref=”$(TypeName.Words.Verbatim.ExceptLast)” /> class.$(End)

Edit Rule dialog

This produces much nicer documentation that the default documentation provided by Visual Studio.

Written on March 18, 2009