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

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.

主站蜘蛛池模板: 上饶市| 鄂温| 启东市| 宝应县| 黔西| 德兴市| 五华县| 营口市| 甘孜县| 玛纳斯县| 朝阳市| 抚松县| 项城市| 绥江县| 清苑县| 义马市| 精河县| 神池县| 巴彦县| 五河县| 合山市| 乐昌市| 青川县| 渝中区| 广河县| 昌宁县| 英吉沙县| 合山市| 宜兴市| 闻喜县| 财经| 雷山县| 中方县| 桦甸市| 崇州市| 沾化县| 隆化县| 江陵县| 湘西| 临颍县| 南部县|