@@ -0,0 +1,3551 @@
+package guitests;%0A%0Aimport static org.junit.Assert.assertTrue;%0Aimport static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;%0Aimport static seedu.address.logic.commands.MarkCommand.MESSAGE_MARK_TASK_SUCCESS;%0A%0Aimport org.junit.Test;%0A%0Aimport seedu.address.commons.core.Messages;%0Aimport seedu.address.logic.commands.MarkCommand;%0Aimport seedu.address.testutil.TestTask;%0A%0A// TODO: reduce GUI tests by transferring some tests to be covered by lower level tests.%0Apublic class MarkCommandTest extends TaskManagerGuiTest %7B%0A%0A    // The list of tasks in the task list panel is expected to match this list.%0A    // This list is updated with every successful call to assertMarkSuccess().%0A    TestTask%5B%5D expectedTasksList = td.getTypicalTasks();%0A%0A    @Test%0A    public void sort() %7B%0A%0A        //mark the first in the list from Undone to Done%0A        int targetIndex = 1;%0A        assertMarkSuccess(targetIndex, expectedTasksList);%0A%0A        //mark the first in the list from Done to Undone%0A        assertMarkSuccess(targetIndex, expectedTasksList);%0A%0A        //mark the last in the list from Undone to Done%0A        targetIndex = expectedTasksList.length;%0A        assertMarkSuccess(targetIndex, expectedTasksList);%0A%0A        //mark the last in the list from Done to Undone%0A        assertMarkSuccess(targetIndex, expectedTasksList);%0A%0A        //mark from the middle of the list from Undone to Done%0A        targetIndex = expectedTasksList.length / 2;%0A        assertMarkSuccess(targetIndex, expectedTasksList);%0A%0A        //mark from the middle of the list from Done to Undone%0A        assertMarkSuccess(targetIndex, expectedTasksList);%0A%0A        //invalid index%0A        commandBox.runCommand(%22mark %22 + expectedTasksList.length + 1);%0A        assertResultMessage(%22The task index provided is invalid%22);%0A%0A    %7D%0A%0A    @Test%0A    public void mark_missingTaskIndex_failure() %7B%0A        commandBox.runCommand(%22mark Bobby%22);%0A        assertResultMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, MarkCommand.MESSAGE_USAGE));%0A    %7D%0A%0A    @Test%0A    public void mark_invalidTaskIndex_failure() %7B%0A        commandBox.runCommand(%22mark 8 Bobby%22);%0A        assertResultMessage(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);%0A    %7D%0A    /**%0A     * Checks whether the edited task has the correct updated details.%0A     *%0A     * @param filteredTaskListIndex index of task to edit in filtered list%0A     * @param taskManagerIndex index of task to edit in the address book.%0A     *      Must refer to the same task as %7B@code filteredTaskListIndex%7D%0A     * @param detailsToMark details to edit the task with as input to the edit command%0A     * @param editedTask the expected task after editing the task's details%0A     */%0A    private void assertMarkSuccess(int targetIndexOneIndexed, final TestTask%5B%5D currentList) %7B%0A        TestTask taskToMark = currentList%5BtargetIndexOneIndexed - 1%5D; // -1 as array uses zero indexing%0A        //TestTask%5B%5D expectedRemainder = TestUtil.removeTaskFromList(currentList, targetIndexOneIndexed);%0A%0A        commandBox.runCommand(%22mark %22 + targetIndexOneIndexed);%0A%0A        //confirm the list now contains all previous tasks except the deleted task%0A        assertTrue(taskToMark.getStatus().status.equals(%22Done%22)  ?%0A                !currentList%5BtargetIndexOneIndexed - 1%5D.getStatus().status.equals(%22Done%22) :%0A                currentList%5BtargetIndexOneIndexed - 1%5D.getStatus().status.equals(%22Done%22));%0A%0A        //confirm the result message is correct%0A        assertResultMessage(String.format(MESSAGE_MARK_TASK_SUCCESS, currentList%5BtargetIndexOneIndexed - 1%5D));%0A    %7D%0A%7D%0A

Add mark tests