Dropwizard is hot and ready to serve resources so it’s time to create the first HTTP API endpoint and make our app useful. In this post I will prepare endpoint which return random clean code rule.
In the previous Gradle series post we built Wrapper to execute Gradle tasks without installed version on your machine. It’s time to write some code and make our project useful. In this post Gradle will help us to start a web server.
To make it happened we need:
It’s not a problem to test class for which you can create an instance and execute implemented methods. Little problem starts when you would like to test class without an instance of this class. My way to test abstract classes is to create instance of the class as a mock via Mockito and simulate the behaviour.
This action will protect project developers before using different Gradle version on each development machine and make development environment setup easier for the new contributors.
If you are searching a nice and easy to use tool to work with Java (or any other) project – Gradle was created for it. This is a perfect tool to execute standard operations, such as: compile source code, run tests and build application (jar file).