Skip to content

Commit

Permalink
Fix JUnit test
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaniceTang committed Nov 10, 2023
1 parent 3c7332d commit ab2ee65
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ META-INF/MANIFEST.MF
data/

cafeCtrl.log
cafeCtrl.log.lck
2 changes: 1 addition & 1 deletion src/main/java/seedu/cafectrl/CafeCtrl.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ public class CafeCtrl {
*/

private CafeCtrl() {
initLogger();
this.ui = new Ui();
this.storage = new Storage(this.ui);
this.sales = new Sales();
this.menu = this.storage.loadMenu();
this.pantry = this.storage.loadPantryStock();
this.sales = this.storage.loadOrderList(menu);
this.currentDate = new CurrentDate(sales);
initLogger();

logger.info( "CafeCtrl initialised successfully");
assert sales.getOrderLists().size() == currentDate.getCurrentDay() + 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public void execute() {
} catch (IndexOutOfBoundsException e) {
logger.log(Level.WARNING, "DeleteDishCommand unsuccessful: " + e.getMessage(), e);
ui.showToUser(ErrorMessages.INVALID_DISH_INDEX);
throw new IndexOutOfBoundsException();
}
}
}

0 comments on commit ab2ee65

Please sign in to comment.