Skip to content

Lab 1 - Fix Test

In this lab you'll make sure that your environment is set up properly with the latest code. You'll also fix a broken test to help refamiliarize yourself with the project.

Fix the Failing Test

Preparation

Create a new training directory for this week's class.

Using git, clone the Meal Kiosk repository from GitHub:

git clone https://github.com/spiral-learning/mealkiosk.git

or

Download the ZIP file from GitHub, here:

https://github.com/spiral-learning/mealkiosk/archive/master.zip

Open Project in IntelliJ IDEA

If you don't already have IntelliJ IDEA installed, please do so now by following these instructions.

  1. Start IntelliJ IDEA
  2. From the File menu, select Open
  3. Navigate to the directory containing the Meal Kiosk project
  4. Select the build.gradle file
  5. Choose the Open as Project option

Run All Tests

Once the project is loaded, look at the Project window on the left side and find the java directory underneath the test directory.

rightclick

Right-click on the java directory and then select Run All Tests from the menu.

runalltests

Fix the Failing Test

You will see one of the tests is failing. Your job is to figure out why it's failing and then fix the code to make it work.