O'Reilly logo

Test-Driven Java Development by Alex Garcia, Viktor Farcic

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

Developing Tic-Tac-Toe v2

We'll continue where we left off with Tic-Tac-Toe in Chapter 3, Red-Green-Refactor: From Failure Through Success until Perfection. The complete source code of the application developed so far can be found at https://bitbucket.org/vfarcic/tdd-java-ch06-tic-tac-toe-mongo.git. Use the VCS | Checkout from Version Control | Git option from the IntelliJ IDEA to clone the code. As with any other project, the first thing we need to do is add the dependencies to build.gradle:

dependencies {
    compile 'org.jongo:jongo:1.1'
    compile 'org.mongodb:mongo-java-driver:2.+'
    testCompile 'junit:junit:4.11'
    testCompile 'org.mockito:mockito-all:1.+'
}

Importing the MongoDB driver should be self-explanatory. Jongo is a very helpful set of utility ...

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