Since the naming of a unit test method makes its purpose more meaningful, is it necessary to add a summary to a unit test method?
Example:
/// <summary>
/// Check the FormatException should be thrown when a give country data line contains a invalid number.
/// </summary>
[TestMethod]
public void FormatException_Should_Thrown_When_Parse_CountryLine_Containing_InvalidNumber()
{
...
}
I think the long descriptive name is more important than the XML comment. Since the unit test isn’t going to be part of an API, you don’t need the XML comment.
For Example:
is more useful than:
XML Comments should be used for documenting APIs and frameworks.