Problem Description (pdf here)
Create a simulator of an automatic coffee dispensing machine, called the Barista-matic. The machine maintains an inventory of drink ingredients, and is able to dispense a fixed set of possible drinks by combining these ingredients in different amounts.
Implemented:
- java main code
- java unit tests
Integrated:
- gradle build automation system
- junit test framework
- jacoco code coverage library
- log4j logging service
Project Root: "./baristamatic_gradle"
Main Class: "edu.indiana.cs.coffee.EntryPoint"
Main Code Location:
./baristamatic_gradle/src/main/java/...
Unit Tests Code Location:
./baristamatic_gradle/src/test/java/...
Unit Tests HTML report file will be at:
./baristamatic_gradle/build/reports/tests/index.html
Code Coverage HTML report file will be at:
./baristamatic_gradle/build/reports/coverage/index.html
Build System (Gradle)
------------------------------------------------------------
Essential tasks runnable from root project
------------------------------------------------------------
Build tasks
-----------
build - Assembles and tests this project. Also generates unit test & code coverage reports.
clean - Deletes the build directory and output jar file.
jar - Assembles a jar archive and exports it to 'baristamatic-3/baristamatic_gradle/'.
run - Runs this project as a JVM application
Help tasks
----------
tasks - Displays the tasks runnable from root project 'baristamatic_gradle'.
- inventory.json has JSON records which contains all ingredients.
- menu.json has JSON records which contains all drinks menu with their recipe.
-
Install Gradle Build Tool (click here for reference)
-
For eclipse, install Buildship 1.0.16 Plugin for Gradle 2.14 (click here for reference)
-
Inside
baristamatic_gradle
directory run any of the above mentioned gradle tasks, for example, run any one of the following line -gradle build gradle run gradle jar
-
How to run executable jar -
java -jar ./baristamatic_gradle.jar
To see a sample video demo of this project, click at
Java Unit Tests (junit tool)
##Java Code Coverage (jacoco tool)
Project Type: Gradle Project
Gradle Version: 2.14.1
Java Version: Oracle Java 1.8 (64 bit)
IDE: GGTS 3.6.4.RELEASE (which is built on Eclipse Luna SR1 4.4.2)
OS: Linux (ubuntu 14.04) 64 bit