@@ -0,0 +1,1560 @@
+package guitests;%0A%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport org.junit.Test;%0A%0Aimport seedu.ezdo.commons.core.Messages;%0Aimport seedu.ezdo.logic.commands.UndoCommand;%0Aimport seedu.ezdo.testutil.TestTask;%0Aimport seedu.ezdo.testutil.TestUtil;%0A%0Apublic class UndoCommandTest extends EzDoGuiTest %7B%0A%0A    @Test%0A    public void undo() %7B%0A%0A        //undo without anything to undo%0A        commandBox.runCommand(%22undo%22);%0A        assertResultMessage(UndoCommand.MESSAGE_NO_PREV_COMMAND);%0A%0A        //invalid command%0A        commandBox.runCommand(%22undoo%22);%0A        assertResultMessage(Messages.MESSAGE_UNKNOWN_COMMAND);%0A%0A        //undo an add%0A        TestTask taskToAdd = td.hoon;%0A        TestTask%5B%5D currentList = td.getTypicalTasks();%0A        commandBox.runCommand(taskToAdd.getAddCommand(false));%0A        assertUndoSuccess(currentList);%0A%0A        //undo a clear%0A        currentList = td.getTypicalTasks();%0A        commandBox.runCommand(%22clear%22);%0A        assertUndoSuccess(currentList);%0A%0A        //undo two things%0A        currentList = td.getTypicalTasks();%0A        commandBox.runCommand(taskToAdd.getAddCommand(false));%0A        TestTask%5B%5D currentListTwo = TestUtil.addTasksToList(currentList, taskToAdd);%0A        commandBox.runCommand(%22clear%22);%0A        assertUndoSuccess(currentListTwo);%0A        assertUndoSuccess(currentList);%0A%0A    %7D%0A%0A    private void assertUndoSuccess(TestTask%5B%5D expectedList) %7B%0A        commandBox.runCommand(%22undo%22);%0A        assertTrue(taskListPanel.isListMatching(expectedList));%0A        assertResultMessage(UndoCommand.MESSAGE_SUCCESS);%0A    %7D%0A%7D%0A

Add UndoCommand tests