Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task 374, 376 Edit output message of add_order for better clarity. #384

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/main/java/seedu/cafectrl/ui/Ui.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public void showToUserWithSpaceBetweenLines(ArrayList<String> 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) {
Expand Down Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions src/test/java/seedu/cafectrl/command/AddOrderCommandTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/seedu/cafectrl/data/PantryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Loading