Is summary necessary in unit test method

后端 未结 8 889
忘掉有多难
忘掉有多难 2021-02-07 07:01

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:

/// 

        
8条回答
  •  深忆病人
    2021-02-07 07:51

    Not necessary, but if you feel the XML comments add value above and beyond the name of the unit test itself (which looks like to be comprehensive) then you'll be doing other developers a service.

    If the summary is essentially a direct duplicate of the unit test method name, then I think this is overkill.

提交回复
热议问题