Skip to content

Commit

Permalink
Merge pull request #79 from nvbinh15/branch-io-test
Browse files Browse the repository at this point in the history
Fix io test
  • Loading branch information
nvbinh15 authored Oct 13, 2021
2 parents c3a72cd + 7e32b89 commit fd367f1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/*
2 changes: 1 addition & 1 deletion src/main/java/seedu/duke/commands/DeleteModuleCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
13 changes: 0 additions & 13 deletions text-ui-test/EXPECTED.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -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!
__________________________________________________
1 change: 1 addition & 0 deletions zoomdata/zoom.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CS2131-link
CS2113T-link
CS2343-CS2213
sth-link

0 comments on commit fd367f1

Please # to comment.