Is summary necessary in unit test method

后端 未结 8 885
忘掉有多难
忘掉有多难 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 08:02

    Personally, I try to make the tests easy enough to read that documentation would be redundant. I use inline comments within the test method to explain why I'm doing something a particular way, not what I'm doing.

提交回复
热议问题