The University of Sydney

School of Information Technologies

Task 1 Unit Test

This is a small unit test for task 1 to make sure that your submission has the correct output formatting.

To use the unit test for the first Skeleton, first download it from here. For the second skeleton, download it here. The following instructions are written with the first skeleton in mind, but the same steps will work for the second.

You can get started with the plugin in just 9 easy steps:

1. Place SimpleCalcTest.java in the same folder as SimpleCalc.java

2. Start Eclipse

3. Refresh the project by right clicking on the project and then clicking on refresh, or pressing f5 while the project is selected.

4. There will be an error in the unit test. We will fix that now. Double click on the unit test to open it up.

5. Hover over the error on line 3 (import static org.junit.Assert.assertEquals) and a window will pop up.

6. Scroll down in the new window created by hovering over the error until you can see "Fix project setup ..." and click on it.

7. A new window will pop up, click ok.

8. While SimpleCalcTest.java is in focus in eclipse, click the play button.

9. On the left hand side a new view should open up with the heading JUnit. If the bar is green, call over your tutor to see your code.

If the bar is red, a failure trace will be provided in the bottom left to assist you in fixing your problems.