Is summary necessary in unit test method

后端 未结 8 887
忘掉有多难
忘掉有多难 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:52

    It is necessary to add a summary when the summary can provide more information that can/should be encoded in method name. Please note that when I say "necessary" when referring to any documentation, I mean is "necessary to convey 100% of needed context/detail/nuances to a new coder inheriting the project or to you yourself 5 years later".

提交回复
热议问题