package guitests;

import static org.junit.Assert.assertTrue;

import org.junit.Test;

import seedu.address.logic.commands.UndoCommand;
import seedu.address.testutil.TestTask;
import seedu.address.testutil.TestUtil;

public class UndoCommandTest extends TaskManagerGuiTest {

    private TestTask[] expectedList = td.getTypicalTasks();

    /**
     * Tries to undo an add command
     */
    @Test
        TestTask taskToAdd = td.alice;
        commandBox.runCommand(taskToAdd.getAddCommand());
        assertUndoSuccess(expectedList);
    }

}


@@ -392,16 +392,44 @@
   @Test%0A
+    public void undoAdd() %7B%0A
         
@@ -565,11 +565,275 @@
 %0A    %7D%0A%0A
+    private void assertUndoSuccess(TestTask%5B%5D expectedList) %7B%0A        commandBox.runCommand(UndoCommand.COMMAND_WORD);%0A        assertTrue(taskListPanel.isListMatching(expectedList));%0A        assertResultMessage(String.format(UndoCommand.MESSAGE_SUCCESS));%0A%0A    %7D%0A%0A
 %7D%0A%0A

Add assertUndoSuccess method