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

Writing a test

Every new feature starts with a test. The main objective of this test is to focus on requirements and code design before writing the code. A test is a form of an executable documentation and can be used later on to get an understanding of what the code does or what are the intentions behind it.

At this point, we are in the red state since the execution of tests fails. There is a discrepancy between what tests expect from the code and what the implementation code actually does. To be more specific, there is no code that fulfills the expectation of the last test; we haven't written it yet. It is possible that at this stage all the tests are actually passing, but that's the sign of a problem.

主站蜘蛛池模板: 孝昌县| 五峰| 长汀县| 裕民县| 科尔| 灵武市| 永年县| 潞城市| 海宁市| 庐江县| 肥城市| 连城县| 北京市| 平湖市| 阜新| 巴塘县| 东方市| 团风县| 兴文县| 宁国市| 舟曲县| 临夏县| 临高县| 中牟县| 化德县| 澄迈县| 清新县| 清丰县| 伊川县| 台州市| 苏州市| 屏山县| 连南| 赤壁市| 鲁甸县| 麦盖提县| 南安市| 栖霞市| 长沙市| 兴城市| 沁阳市|