- Test-Driven Java Development(Second Edition)
- Alex Garcia Viktor Farcic
- 236字
- 2021-06-24 18:31:50
Red-Green-Refactor – From Failure Through Success until Perfection
The Red-Green-Refactor technique is the basis of test-driven development (TDD). It is a game of ping pong in which we are switching between tests and implementation code at great speed. We'll fail, then we'll succeed, and, finally, we'll improve.
We'll develop a Tic-Tac-Toe game by going through each requirement one at a time. We'll write a test and see if it fails. Then, we'll write code that implements that test, run all the tests, and see them succeed. Finally, we'll refactor the code and try to make it better. This process will be repeated many times until all the requirements are successfully implemented.
We'll start by setting up the environment with Gradle and JUnit. Then, we'll go a bit deeper into the Red-Green-Refactor process. Once we're ready with the setup and theory, we'll go through the high-level requirements of the application.
With everything set, we'll dive right into the code—one requirement at a time. Once everything is done, we'll take a look at the code coverage and decide whether it is acceptable or whether more tests need to be added.
The following topics will be covered in this chapter:
- Setting up the environment with Gradle and JUnit
- The Red-Green-Refactor process
- Tic-Tac-Toe's requirements
- Developing Tic-Tac-Toe
- Code coverage
- More exercises
- HTML5+CSS3+JavaScript從入門到精通:上冊(微課精編版·第2版)
- WildFly:New Features
- The Android Game Developer's Handbook
- Python GUI Programming Cookbook
- Cassandra Data Modeling and Analysis
- Python高效開發實戰:Django、Tornado、Flask、Twisted(第3版)
- Oracle BAM 11gR1 Handbook
- Unity UI Cookbook
- C語言從入門到精通
- 搞定J2EE:Struts+Spring+Hibernate整合詳解與典型案例
- Building Serverless Architectures
- SciPy Recipes
- Magento 2 Beginners Guide
- 玩轉.NET Micro Framework移植:基于STM32F10x處理器
- Qt 4開發實踐