O'Reilly logo

Quality Code: Software Testing Principles, Practices, and Patterns by Stephen Vance

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Bootstrapping

A purely test-driven project starts with a test. However, creating the repo in GitHub creates a README.md if you want it to be able to clone it. This is a good opportunity to write the spec for the project, or at least the initial spec, so I wrote that first.

Next, I used Maven’s archetype generation to set up the structure of the project. I chose an archetype that generated a project for Java-executable JARs, which generated the main class and its test class. As discussed in Chapter 6, I started with the constructor. I did not have an immediate need for attributes, so as the full recipe for bootstrapping the constructor did not apply, I squeezed a simple default construction test [445f41f] between various project setup commits. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required