From b92587ccd7fff92496eba6fad259189f958886c0 Mon Sep 17 00:00:00 2001 From: NaychiMin Date: Thu, 9 Nov 2023 18:43:56 +0800 Subject: [PATCH] Edit junit test to match updated output. --- src/main/java/seedu/cafectrl/parser/Parser.java | 2 +- src/test/java/seedu/cafectrl/parser/ParserTest.java | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/seedu/cafectrl/parser/Parser.java b/src/main/java/seedu/cafectrl/parser/Parser.java index 534213b3a9..da1b10a0bc 100644 --- a/src/main/java/seedu/cafectrl/parser/Parser.java +++ b/src/main/java/seedu/cafectrl/parser/Parser.java @@ -424,7 +424,7 @@ private static Command prepareListIngredient(Menu menu, String arguments, Ui ui) if (!matcher.matches()) { return new IncorrectCommand(ErrorMessages.MISSING_ARGUMENT_FOR_LIST_INGREDIENTS - + ListSaleByDayCommand.MESSAGE_USAGE, ui); + + ListIngredientCommand.MESSAGE_USAGE, ui); } try { diff --git a/src/test/java/seedu/cafectrl/parser/ParserTest.java b/src/test/java/seedu/cafectrl/parser/ParserTest.java index ffe6819427..633d8b4793 100644 --- a/src/test/java/seedu/cafectrl/parser/ParserTest.java +++ b/src/test/java/seedu/cafectrl/parser/ParserTest.java @@ -72,7 +72,8 @@ public void parseCommand_missingIndex_returnsErrorMessage() { IncorrectCommand incorrectCommand = (IncorrectCommand) result; String feedbackToUser = incorrectCommand.feedbackToUser; - assertEquals(ErrorMessages.MISSING_ARGUMENT_FOR_LIST_INGREDIENTS, feedbackToUser); + assertEquals(ErrorMessages.MISSING_ARGUMENT_FOR_LIST_INGREDIENTS + ListIngredientCommand.MESSAGE_USAGE, + feedbackToUser); } @Test @@ -90,7 +91,7 @@ public void parseCommand_invalidIndex_returnsErrorMessage() { IncorrectCommand incorrectCommand = (IncorrectCommand) result; String feedbackToUser = incorrectCommand.feedbackToUser; - assertEquals(ErrorMessages.MISSING_ARGUMENT_FOR_LIST_INGREDIENTS, feedbackToUser); + assertEquals(ErrorMessages.INVALID_DISH_INDEX_TO_LIST, feedbackToUser); } @Test @@ -108,7 +109,7 @@ public void parseCommand_indexOutOfBounds_returnsErrorMessage() { IncorrectCommand incorrectCommand = (IncorrectCommand) result; String feedbackToUser = incorrectCommand.feedbackToUser; - assertEquals(ErrorMessages.INVALID_DISH_INDEX, feedbackToUser); + assertEquals(ErrorMessages.UNLISTED_DISH, feedbackToUser); } @Test