diff --git a/docs/UserGuide.md b/docs/UserGuide.md index c0d3a80462..192c2bac37 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -271,7 +271,7 @@ Format: `list_sale day/DAY_TO_DISPLAY` Example: `list_sale day/2` Output: -- list_sale day/2 lists the dishes sold along with the total sales for day 1. +- list_sale day/2 lists the dishes sold along with the total sales for day 2. ``` +---------------------------------------------------------------------------+ | Day 2: | diff --git a/src/main/java/seedu/cafectrl/data/OrderList.java b/src/main/java/seedu/cafectrl/data/OrderList.java index 0a5d834173..3ad333b72c 100644 --- a/src/main/java/seedu/cafectrl/data/OrderList.java +++ b/src/main/java/seedu/cafectrl/data/OrderList.java @@ -53,7 +53,7 @@ public void printOrderList(Menu menu, Ui ui) { } for (Order aggregatedOrder : aggregatedOrders) { - if (aggregatedOrder.getQuantity()==0) { + if (aggregatedOrder.getQuantity() == 0) { continue; } diff --git a/src/test/java/seedu/cafectrl/command/AddOrderCommandTest.java b/src/test/java/seedu/cafectrl/command/AddOrderCommandTest.java index 358370786a..c9efddfd70 100644 --- a/src/test/java/seedu/cafectrl/command/AddOrderCommandTest.java +++ b/src/test/java/seedu/cafectrl/command/AddOrderCommandTest.java @@ -118,7 +118,7 @@ public void execute_addInvalidOrder_expectRestockMessage() { String expectedOutput = Messages.CHEF_MESSAGE + Messages.RESTOCK_CORNER - + "| Restock | Current | Needed |" + + Messages.RESTOCK_TITLE + Messages.RESTOCK_CORNER + "| chicken | 1000g | 2000g |" + Messages.RESTOCK_END_CAP diff --git a/src/test/java/seedu/cafectrl/command/ListIngredientCommandTest.java b/src/test/java/seedu/cafectrl/command/ListIngredientCommandTest.java index 4ee915edbf..da06b4426c 100644 --- a/src/test/java/seedu/cafectrl/command/ListIngredientCommandTest.java +++ b/src/test/java/seedu/cafectrl/command/ListIngredientCommandTest.java @@ -4,6 +4,7 @@ import seedu.cafectrl.data.Menu; import seedu.cafectrl.data.dish.Dish; import seedu.cafectrl.data.dish.Ingredient; +import seedu.cafectrl.ui.Messages; import seedu.cafectrl.ui.Ui; import java.io.ByteArrayOutputStream; @@ -40,14 +41,14 @@ public void execute_validIndex_printsIngredients() { String actualOutput = baos.toString().trim(); System.setOut(originalOut); - String expectedOutput = "+-------------------------------------------------------+" + String expectedOutput = Messages.INGREDIENTS_END_CAP + "| Dish: chicken rice |" - + "+----------------------------------------+--------------+" - + "| Ingredient + Quantity +" - + "+----------------------------------------+--------------+" + + Messages.INGREDIENTS_CORNER + + Messages.INGREDIENTS_TITLE + + Messages.INGREDIENTS_CORNER + "| rice | 100g |" + "| chicken | 200g |" - + "+-------------------------------------------------------+"; + + Messages.INGREDIENTS_END_CAP; String normalizedExpected = expectedOutput.toLowerCase().replaceAll("\\s+", "").trim(); String normalizedActual = actualOutput.toLowerCase().replaceAll("\\s+", "").trim();