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

Writing the tests

This is the initial step of the technique, where you have to write the tests that describe a component or feature to be developed. The component can be the user interface, business rule or logic, data persistence routine, or a method implementing a specific user requirement. The tests need to be brief and should contain the required data input and desired outcome expected by the component being tested.

While writing the tests, technically you have solved half of the development task, because the design of the code is usually conceived through the thought pattern and process put into writing the tests. It becomes easier to tackle the difficult code after the easier code, which is the test that has been written. At this point, as a TDD newcomer, the tests are not expected to be 100% perfect or have full code coverage, but with continuous practice and adequate refactoring, this can be achieved.

主站蜘蛛池模板: 闽清县| 武隆县| 札达县| 千阳县| 子长县| 宣恩县| 安福县| 鄂伦春自治旗| 天门市| 灵寿县| 长沙县| 莎车县| 南召县| 靖远县| 阆中市| 砚山县| 同江市| 新丰县| 多伦县| 盐边县| 永济市| 右玉县| 阳新县| 西林县| 扎囊县| 长治市| 永和县| 浦东新区| 肇庆市| 定边县| 应城市| 信阳市| 临泉县| 阳江市| 三亚市| 肇庆市| 上饶市| 安阳市| 泰兴市| 辛集市| 洱源县|