package guitests;

import org.junit.Test;

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

public class RedoCommandTest extends TaskManagerGuiTest {

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


    public void redo() {
        redoAdd();
    }

    /**
     * Tries to redo an add command
     */
    @Test
    public void redoAdd() {
        TestTask taskToAdd = td.alice;
        commandBox.runCommand(taskToAdd.getAddCommand());
        commandBox.runCommand(UndoCommand.COMMAND_WORD);
        expectedList = TestUtil.addTasksToList(expectedList, taskToAdd);
        assertRedoSuccess(currentList, expectedList);
    }

}

@@ -23,24 +23,117 @@
 ort 
-org.junit.Test;%0A
+static org.junit.Assert.assertTrue;%0A%0Aimport org.junit.Test;%0A%0Aimport seedu.address.logic.commands.RedoCommand;
 %0Aimp
@@ -844,10 +844,531 @@
 %0A    %7D%0A%0A
+    /**%0A     * Runs redo command and checks whether the current list matches the expected list%0A     * @param currentList list before redo command is carried out%0A     * @param expectedList list after redo command is carried out%0A     */%0A    private void assertRedoSuccess(TestTask%5B%5D currentList, TestTask%5B%5D expectedList) %7B%0A        commandBox.runCommand(RedoCommand.COMMAND_WORD);%0A        assertTrue(taskListPanel.isListMatching(expectedList));%0A        assertResultMessage(String.format(RedoCommand.MESSAGE_SUCCESS));%0A    %7D%0A
 %7D%0A

Create assertRedoSuccess function