Book Image

Test-Driven Java Development

Book Image

Test-Driven Java Development

Overview of this book

Table of Contents (17 chapters)
Test-Driven Java Development
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
8
Refactoring Legacy Code – Making it Young Again
Index

Developing the remote-controlled ship


Let's start by importing the existing Git repository.

Project setup

Let's start setting up the project:

  1. Open IntelliJ IDEA. If an existing project is already opened, select File | Close Project.

    You will be presented with a screen similar to the following:

  2. To import the project from the Git repository, click on Check out from Version Control and select Git. Type https://bitbucket.org/vfarcic/tdd-java-ch04-ship.git in to the Git Repository URL field and click on Clone:

  3. Answer Yes when asked whether you would like to open the project. Next you will be presented with the Import Project from Gradle dialog. Click on OK:

  4. IDEA will need to spend some time downloading the dependencies specified in the buld.gradle file. Once that is done, you'll see that some classes and corresponding tests are already created:

Helper classes

Imagine that a colleague of yours started working on this project. He's a good programmer and a TDD practitioner, and you trust his abilities to...