diff --git a/src/main/java/seedu/cafectrl/ui/Ui.java b/src/main/java/seedu/cafectrl/ui/Ui.java index fc396c978e..08fd772a71 100644 --- a/src/main/java/seedu/cafectrl/ui/Ui.java +++ b/src/main/java/seedu/cafectrl/ui/Ui.java @@ -179,7 +179,7 @@ public void showToUserWithSpaceBetweenLines(ArrayList message) { } public void showDishAvailability(int numberOfDishes){ - showToUser("Available Dishes: " + numberOfDishes); + showToUser("Available quantity: " + numberOfDishes); } public void showNeededRestock(String ingredientName, int currentQuantity, String unit, int neededIngredient) { @@ -278,6 +278,7 @@ public void showOrderStatus(String orderStatus, String totalCost) { public void showDishAvailabilityMessage() { showToUser(Messages.AVAILABLE_DISHES); + showToUser(Messages.LINE_STRING); } public void showPreviousDay() { showToUser(Messages.PREVIOUS_DAY_COMMAND_MESSAGE); diff --git a/src/test/java/seedu/cafectrl/command/AddOrderCommandTest.java b/src/test/java/seedu/cafectrl/command/AddOrderCommandTest.java index c9efddfd70..357bbd5c52 100644 --- a/src/test/java/seedu/cafectrl/command/AddOrderCommandTest.java +++ b/src/test/java/seedu/cafectrl/command/AddOrderCommandTest.java @@ -63,11 +63,12 @@ public void execute_addValidOrder_expectOneOrder() { + "Total order cost: $5.00" + Messages.LINE_STRING + Messages.AVAILABLE_DISHES + + Messages.LINE_STRING + "Dish: chicken rice" - + "Available Dishes: 8" + + "Available quantity: 8" + Messages.LINE_STRING + "Dish: chicken curry" - + "Available Dishes: 4"; + + "Available quantity: 4"; String normalizedExpected = expectedOutput.toLowerCase().replaceAll("\\s+", "").trim(); String normalizedActual = actualOutput.toLowerCase().replaceAll("\\s+", "").trim(); diff --git a/src/test/java/seedu/cafectrl/data/PantryTest.java b/src/test/java/seedu/cafectrl/data/PantryTest.java index ab4509170c..9294f7068d 100644 --- a/src/test/java/seedu/cafectrl/data/PantryTest.java +++ b/src/test/java/seedu/cafectrl/data/PantryTest.java @@ -115,10 +115,10 @@ void calculateDishAvailability_orderCompleteNoRestock_showMaxDish() { System.setOut(originalOut); String expectedOutput = "Dish: Chicken Rice" - + "Available Dishes: 2" + + "Available quantity: 2" + Messages.LINE_STRING + "Dish: Chicken Chop" - + "Available Dishes: 2" ; + + "Available quantity: 2" ; String normalizedExpected = expectedOutput.toLowerCase().replaceAll("\\s+", "").trim(); String normalizedActual = actualOutput.toLowerCase().replaceAll("\\s+", "").trim();