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

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.

主站蜘蛛池模板: 东乡县| 大洼县| 惠水县| 玛纳斯县| 九龙城区| 南康市| 勃利县| 黄石市| 乃东县| 南溪县| 涞源县| 鹤壁市| 疏勒县| 鲁山县| 河南省| 南郑县| 平陆县| 潞城市| 方正县| 抚州市| 乐清市| 丹江口市| 长垣县| 荆州市| 昌都县| 车致| 卢龙县| 大名县| 沾益县| 湄潭县| 巴塘县| 阳江市| 章丘市| 陈巴尔虎旗| 益阳市| 古交市| 文化| 廊坊市| 华坪县| 佛山市| 城市|