@@ -0,0 +1,3209 @@
+package guitests;%0A%0Aimport org.junit.Test;%0A%0Aimport seedu.taskitty.commons.core.Messages;%0Aimport seedu.taskitty.commons.util.TaskUtil;%0Aimport seedu.taskitty.model.task.Task;%0Aimport seedu.taskitty.testutil.TestTask;%0Aimport seedu.taskitty.testutil.TestTaskList;%0A%0Aimport static org.junit.Assert.assertTrue;%0Aimport static seedu.taskitty.logic.commands.DoneCommand.MESSAGE_MARK_TASK_AS_DONE_SUCCESS;%0A%0Apublic class DoneCommandTest extends TaskManagerGuiTest %7B%0A%0A    @Test%0A    public void done() %7B%0A%0A        //mark as done using todo/default%0A        TestTaskList currentList = new TestTaskList(td.getTypicalTasks());%0A        %0A        int targetIndex = currentList.size(%22%22);%0A        assertMarkAsDoneSuccess(targetIndex, currentList);%0A%0A        //mark as done in deadline%0A        targetIndex = currentList.size(%22d%22);%0A        assertMarkAsDoneSuccess(targetIndex, %22d%22, currentList);%0A%0A        //mark as done in event%0A        targetIndex = currentList.size(%22e%22);%0A        assertMarkAsDoneSuccess(targetIndex, %22e%22, currentList);%0A        %0A        //invalid index%0A        commandBox.runCommand(%22done t %22 + (currentList.size(%22t%22) + 1));%0A        assertResultMessage(%22The task index provided is invalid%22);%0A        %0A        //invalid command%0A        commandBox.runCommand(%22donee e %22 + (currentList.size(%22e%22)));%0A        assertResultMessage(Messages.MESSAGE_UNKNOWN_COMMAND);%0A        %0A    %7D%0A    %0A    /**%0A     * %0A     * Runs the done command to mark the task at specified index as done and confirms the result is correct %0A     * with todo as the default category.%0A     * @param targetIndexOneIndexed e.g. to mark the first task in the list as done, 1 should be given as the target index.%0A     * @param currentList A copy of the current list of tasks (before being marked as done).     %0A     */%0A    private void assertMarkAsDoneSuccess(int targetIndexOneIndexed, final TestTaskList currentList) %7B%0A        assertMarkAsDoneSuccess(targetIndexOneIndexed, %22t%22, currentList);%0A    %7D%0A    %0A    /**%0A     * %0A     * Runs the done command to mark the task at specified index as done and confirms the result is correct %0A     * @param targetIndexOneIndexed e.g. to mark the first task in the list as done, 1 should be given as the target index.%0A     * @param category the category in which to mark as done from.%0A     * @param currentList A copy of the current list of tasks (before being marked as done).     %0A     */%0A    private void assertMarkAsDoneSuccess(int targetIndexOneIndexed, String category, final TestTaskList currentList) %7B%0A        TestTask taskToMark = currentList.getTaskFromList(targetIndexOneIndexed - 1, category); //-1 because array uses zero indexing%0A        %0A        currentList.markTaskAsDoneInList(targetIndexOneIndexed - 1, category, taskToMark);%0A        commandBox.runCommand(%22done %22 + category + %22 %22 + targetIndexOneIndexed);%0A        %0A        int categoryIndex = TaskUtil.getCategoryIndex(category);%0A        //confirm the list now contains the original list + the task marked as done%0A        assertTrue(currentList.isListMatching(taskListPanel));%0A%0A        //confirm the result message is correct%0A        assertResultMessage(String.format(MESSAGE_MARK_TASK_AS_DONE_SUCCESS, Task.CATEGORIES%5BcategoryIndex%5D, taskToMark));%0A    %7D%0A%7D%0A

Add done command test