Preliminary investigation

When we know the required feature, we will start looking at the Alexandria project:

  • 15 files
  • Gradle-based (build.gradle)
  • 0 tests

Firstly, we want to confirm that this project has never been tested, and the lack of a test folder reveals so:

    $ find src/test
    find: src/test: No such file or directory
  

These are the folder contents for the Java part:

    $ cd src/main/java/com/packtpublishing/tddjava/ch09/alexandria/
    $ find .
    .
    ./Book.java
    ./Books.java
    ./BooksEndpoint.java
    ./BooksRepository.java
    ./CustomExceptionMapper.java
    ./MyApplication.java
    ./States.java
    ./User.java
    ./UserRepository.java
    ./Users.java
  

Here is the rest:

    $ cd src/main
    $ find resources webapp
    resources
    resources/applicationContext.xml
    webapp
    webapp/WEB-INF ...

Get Test-Driven Java Development - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.