Skip to content

Commit

Permalink
Merge pull request #106 from CS2103AUG2016-T14-C2/V0.5rc-Increase-Tes…
Browse files Browse the repository at this point in the history
…t-Coverage

V0.5rc increase test coverage
  • Loading branch information
qhng authored Oct 29, 2016
2 parents 9675f25 + 6a79168 commit ecf942d
Show file tree
Hide file tree
Showing 31 changed files with 1,418 additions and 266 deletions.
Binary file added Collate-TUI.jar
Binary file not shown.
3 changes: 3 additions & 0 deletions collate.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
java -jar Collate-TUI.jar collate from src/main to collated/main include java, fxml, css
java -jar Collate-TUI.jar collate from src/test to collated/test include java
java -jar Collate-TUI.jar collate from docs to collated/docs include md, html
2 changes: 1 addition & 1 deletion collated/docs/A0139915W.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Format: `add TASK_NAME [s/START_DATE] [e/END_DATE] [l/LOCATION] [p/PRIORITY_LEVE
> LOCATION | `Optional` Specifies the location where the task happens.
> PRIORITY_LEVEL | `Optional` Specifies the priority level of the task.<br>`Accepts` values `low`, `medium`, `high`<br>`Defaults` to `???`
> RECURRING_TYPE | `Optional` Specifies the recurring type of the task.<br>`Accepts` values `none`, `daily`, `weekly`, `monthly`, `yearly`<br>`Defaults` to `none`
> NUMBER_OF_RECURRENCE | `Optional` Specifies the number of times the task recurrs. A value of 0 specifies a never-ending recurrence.<br>`Defaults` to `0`<br>`Ignored` if RECURRING_TYPE is `none`
> NUMBER_OF_RECURRENCE | `Optional` Specifies the number of times the task recurrs. <br>`Defaults` to `1`<br>`Ignored` if RECURRING_TYPE is `none`
> CATEGORY | `Optional` Specifies a custom category for the task. This can be used for keeping track of similar tasks.
> DESCRIPTION | `Optional` Describes the task.

Expand Down
32 changes: 13 additions & 19 deletions collated/main/A0097627N.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@Override
public boolean redo() {
execute();
return false;
return true;
}

/**
Expand All @@ -26,20 +26,18 @@
*/
@Override
public boolean undo() {

UnmodifiableObservableList<Task> lastShownList = model.getFilteredTaskListTask();

for (int i = 0; i < lastShownList.size(); i++) {
if (lastShownList.get(i) == toAdd){
ReadOnlyTask taskToDelete = lastShownList.get(i);
try {
model.deleteTask(taskToDelete);
} catch (TaskNotFoundException e) {
e.printStackTrace();
}
Iterator<Task> itr = tasksAdded.iterator();
while (itr.hasNext()) {
try {
model.deleteTask(itr.next());
} catch (TaskNotFoundException e) {
// do nothing.
}
}
return false;
}
// clears the list of tasks added.
// if redo is performed, the list will be populated again.
tasksAdded.clear();
return true;
}

/**
Expand Down Expand Up @@ -501,8 +499,6 @@
}
} catch (TaskNotFoundException pnfe) {
assert false : "The target task cannot be missing";
} catch (DuplicateTaskException e) {
e.printStackTrace();
} catch (InvalidDateException e) {
assert false : "The target task should be valid, only the archived flag is set";
}
Expand Down Expand Up @@ -895,9 +891,7 @@
}
} catch (TaskNotFoundException pnfe) {
assert false : "The target task cannot be missing";
} catch (DuplicateTaskException e) {
e.printStackTrace();
}catch (InvalidDateException e) {
} catch (InvalidDateException e) {
assert false : "The target task should be valid, only the archived flag is set";
}
return new CommandResult(resultSb.toString());
Expand Down
Loading

0 comments on commit ecf942d

Please sign in to comment.