Some tests for JSONPlaceholder

  1. Searching user by username (username is set in src/test/resources/test.properties).
  2. Fetching all posts written by user (if there are no posts it is logged).
  3. Checking the format of email addresses for the comments (if there are no comments it is logged).

How to run server:

npm install -g json-server
json-server --watch src/test/resources/db.json

How to run tests:

./gradlew clean test

Using Lombok with IntelliJ IDEA:

  1. Install the Lombok Plugin
  2. Enable annotation processing
    1. Go to Preferences... > Build, Execution, Deployment > Compiler > Annotation Processors
    2. Set check box:
      • Enable annotation processing
    3. After enabling, run Build -> Rebuild Project