@@ -0,0 +1,1385 @@
+package guitests;%0A%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport org.junit.Test;%0A%0Aimport seedu.taskboss.commons.core.Messages;%0Aimport seedu.taskboss.logic.commands.AddCommand;%0Aimport seedu.taskboss.testutil.TestTask;%0Aimport seedu.taskboss.testutil.TestUtil;%0A%0Apublic class UndoCommandTest extends TaskBossGuiTest %7B%0A%0A    @Test%0A    public void undo() %7B%0A        //without any last command%0A        commandBox.runCommand(%22undo%22);%0A        assertResultMessage(UndoCommand.MESSAGE_WITHOUT_PREVIOUS_OPERATION);%0A    %09%0A        //undo one command%0A        TestTask%5B%5D currentList = td.getTypicalTasks();%0A        TestTask taskToAdd = td.wedding;%0A        commandBox.runCommand(taskToAdd.getAddCommand());%0A        commandBox.runCommand(%22delete %22 + currentList.length);%0A        TestTask%5B%5D expectedList = TestUtil.addTasksToList(currentList, taskToAdd);%0A        assertUndoCommandSuccess(expectedList);%0A              %0A        //undo another command after undoing one command%0A        assertUndoCommandSuccess(currentList);%0A%0A        //invalid command%0A        commandBox.runCommand(%22undo2%22);%0A        assertResultMessage(Messages.MESSAGE_UNKNOWN_COMMAND);%0A    %7D%0A    %0A    private void assertUndoCommandSuccess(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

Create UndoCommandTest.java