@@ -0,0 +1,2653 @@
+package guitests;%0A%0Aimport static org.junit.Assert.*;%0Aimport static seedu.jimi.logic.commands.DeleteCommand.MESSAGE_DELETE_TASK_SUCCESS;%0A%0Aimport org.junit.Test;%0A%0Aimport seedu.jimi.commons.exceptions.IllegalValueException;%0Aimport seedu.jimi.model.task.Name;%0Aimport seedu.jimi.testutil.TestFloatingTask;%0Aimport seedu.jimi.testutil.TestUtil;%0A%0Apublic class EditCommandTest extends AddressBookGuiTest%7B%0A%0A    @Test%0A    public void edit() throws IllegalValueException %7B%0A        TestFloatingTask%5B%5D currentList = td.getTypicalTasks();%0A        %0A        //edit the first task in list with all details%0A        int targetIndex = 1;%0A        %0A        assertEditTaskSuccess(targetIndex, currentList);%0A%0A        //edit the last task in list with only name changes%0A        currentList = TestUtil.removeTaskFromList(currentList, targetIndex);%0A        targetIndex = currentList.length;%0A        assertEditTaskSuccess(targetIndex, currentList);%0A%0A        //edit the middle task of the list with only name changes%0A        currentList = TestUtil.removeTaskFromList(currentList, targetIndex);%0A        targetIndex = currentList.length/2;%0A        assertEditTaskSuccess(targetIndex, currentList);%0A%0A        //invalid index%0A        commandBox.runCommand(%22edit %22 + currentList.length + 1);%0A        assertResultMessage(%22The task index provided is invalid%22);%0A        %0A        //TODO: edit the first event in the list with all details%0A    %7D%0A    %0A    /**%0A     * Runs the edit command on the targetTask and checks if the edited task matches with changedTask.%0A     * Expected new task is to be at the top of the list. //TODO: change to match previous index of edited task%0A     * %0A     * @param targetIndex Index of target task to be edited.%0A     * @param currentList List of tasks to be edited.%0A     * @throws IllegalValueException %0A     */%0A    private void assertEditTaskSuccess(int targetIndex, TestFloatingTask... currentList) throws IllegalValueException%7B%0A%0A        final String newName = %22Get rich or die coding%22;%0A        TestFloatingTask expectedTask = new TestFloatingTask();%0A        expectedTask.setName(new Name(newName)); //set up newTask with changed name%0A        %0A        //edit the name of the target task with the newName%0A        commandBox.runCommand(%22edit %22 + targetIndex + %22 %22 + newName);%0A        %0A        //confirm the list now contains all previous persons except the deleted person%0A        //TODO: change from checking last index to previous index of changed task%0A        assertTrue(personListPanel.isListMatching(expectedTask));%0A%0A        //confirm the result message is correct%0A        assertResultMessage(String.format(MESSAGE_DELETE_TASK_SUCCESS, expectedTask));%0A    %7D%0A%0A%7D%0A

Add EditCommand JUnit tests