This is the the repo for the Unit Testing Workshop held at the Hoplite meeting on Thursday March 7. It teaches the attendees how to write JUnit tests for their code, and how unit tests can help to discover bugs. Especially useful if you add functionality or do other refactoring of your code.
Clone this repo to your local machine and import the Java project with your favorite editor. Your editior must offer JUnit support.
Complete the test stubs in MovieTest.java
and APITest.java
After completing the tests check if your expectations match the actual output. If not, meaning the test failed, either investigate your test or check the source code to make sure there are no bugs. Repeat this until all tests turn green.
Congratualtions you just successfully unit tested this code and found and fixed bugs in the process.