命名单元测试方法的一般规则是什么?我相信很多人都对这个问题感到疑惑.假设,一个被测试的方法是
public Customer GetCustomerById(int id)
Run Code Online (Sandbox Code Playgroud)
您如何命名单元测试方法?
GetCustomerById
?
GetCustomerByIdTest
?
GetCustomerByIdShouldReturnCustomer
?
GetCustomerByIdShoudReturnCustomerWhenItSucceeds
?
GetCustomerByIdShouldReturnNullWhenNotFound
?
Get_Customer_By_Id
?
..等等等等.
有什么想法吗?谢谢.
unit-testing ×1