diff --git a/.gitignore b/.gitignore index fb30aa3825..af660f8843 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,11 @@ module/* logs/ClickLogs.log journalData/journalNotes.txt tasksdata/scheduleTasks.txt +zoomdata/* + +text-ui-test/fooddata/* +text-ui-test/journalData/* +text-ui-test/logs/* +text-ui-test/module/* +text-ui-test/tasksdata/* +text-ui-test/zoomdata/* diff --git a/src/main/java/seedu/duke/commands/DeleteModuleCommand.java b/src/main/java/seedu/duke/commands/DeleteModuleCommand.java index f3378a1909..252343a2c5 100644 --- a/src/main/java/seedu/duke/commands/DeleteModuleCommand.java +++ b/src/main/java/seedu/duke/commands/DeleteModuleCommand.java @@ -36,7 +36,7 @@ public DeleteModuleCommand(String commandArgs) { public void execute(Ui ui, Storage storage) throws ClickException, Exception { ModuleList moduleList = storage.storageModule.readDataFromFile(); int moduleIndex = Integer.parseInt(commandArgs.strip()) - 1; - boolean isValidIndex = moduleIndex > 0 && moduleIndex < moduleList.getNumberOfModules(); + boolean isValidIndex = (moduleIndex >= 0) && (moduleIndex < moduleList.getNumberOfModules()); if (!isValidIndex) { throw new IllegalModuleIndexException(); } diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index 71b5b38fea..2a23163015 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -29,39 +29,26 @@ creating new file... What can I do for you? __________________________________________________ Nice. I've added Samurai Burger to the list, with 433 calories! - __________________________________________________ Nice. I've added McFlurry to the list, with 165 calories! - __________________________________________________ 1st,You consumed Samurai Burger , which has a calorie count of : 433! 2nd,You consumed McFlurry , which has a calorie count of : 165! Wow, that's a lot of food! Finished reading today's list You consumed 598 calories in total today! - __________________________________________________ Added cs2113t | softwareengineering | Expected grade: A - __________________________________________________ Added cs1231 | discrete structure - __________________________________________________ Here are the modules in your list: 1. cs2113t | softwareengineering | Expected grade: A 2. cs1231 | discrete structure | Expected grade: N/A - __________________________________________________ I have deleted this module: cs1231 | discrete structure | Expected grade: N/A - __________________________________________________ Great you have added the note: Today's stuff - __________________________________________________ Great you have added the entry: Random Observation - __________________________________________________ The notebook Today's stuff contains: Random Observation - __________________________________________________ Task has been added successfully! - __________________________________________________ Here's your task list: 1. sometask (on: 10-10-2021) - __________________________________________________ Task has been deleted! - __________________________________________________ __________________________________________________ Bye. Hope to see you again soon! __________________________________________________ diff --git a/zoomdata/zoom.txt b/zoomdata/zoom.txt index 11d0ed9b93..c670355ab5 100644 --- a/zoomdata/zoom.txt +++ b/zoomdata/zoom.txt @@ -1,3 +1,4 @@ CS2131-link CS2113T-link CS2343-CS2213 +sth-link