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

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.

主站蜘蛛池模板: 襄垣县| 无极县| 平山县| 兴安县| 和田县| 巴林左旗| 永年县| 望都县| 珲春市| 荆州市| 延津县| 闵行区| 绥滨县| 宜兴市| 北辰区| 信宜市| 辽阳市| 苗栗县| 尚志市| 和静县| 哈尔滨市| 安多县| 海盐县| 九寨沟县| 鹤峰县| 乌兰察布市| 承德县| 信阳市| 海口市| 甘孜| 麻城市| 邵阳县| 赤壁市| 蕲春县| 工布江达县| 那曲县| 赤水市| 丹江口市| 邵阳县| 赣榆县| 濮阳市|