JSONPlaceholder
Some tests for- Searching user by username (username is set in
src/test/resources/test.properties
). - Fetching all posts written by user (if there are no posts it is logged).
- 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:
- Install the Lombok Plugin
- Enable annotation processing
- Go to Preferences... > Build, Execution, Deployment > Compiler > Annotation Processors
- Set check box:
- Enable annotation processing
- After enabling, run Build -> Rebuild Project