测试一个函数需要写一个测试函数,测试函数中再构建相应的数据环境来调用被测试的函数

一个函数的实现要调用另一个没用完成对函数,可以写一个假的函数来模拟

Error codes should also be accompanied by descriptive error messages. However, only in rare circumstances should the error message try to predict why the error occurred. It should simply relate what happened