官术网_书友最值得收藏!

Writing the code

After the tests have been written, you should write enough code to implement the feature for the tests you wrote earlier. Bear in mind that the goal here is to try to employ good practices and standards in writing the code to make the test pass. All the approaches that lead to writing bad or stinking code should be avoided.

Try to avoid test overfitting, a situation where you write code just to make the tests pass. Instead you should write the code to implement the feature or user requirements fully, so as to ensure that every possible use case of the feature is covered to avoid situations where the code has different behaviors when executed by the test cases and when in production.

主站蜘蛛池模板: 黔江区| 宜都市| 平凉市| 榆树市| 义乌市| 建宁县| 刚察县| 肇庆市| 沂源县| 宁武县| 家居| 景泰县| 三江| 黑水县| 上饶县| 廊坊市| 伊宁县| 盘锦市| 兴文县| 和平区| 衡阳县| 上栗县| 彩票| 青州市| 丰宁| 宁明县| 临桂县| 康保县| 武定县| 张家港市| 佳木斯市| 双江| 石门县| 延寿县| 拉孜县| 治县。| 威海市| 五指山市| 乐东| 丽江市| 略阳县|