//@@author A0142073R
package guitests;

import org.junit.Test;

import seedu.taskell.commons.exceptions.IllegalValueException;
import seedu.taskell.testutil.TestTask;

import static org.junit.Assert.assertTrue;

public class ListPriorityCommandTest extends TaskManagerGuiTest {

    @Test
    public void listPriority() throws IllegalValueException {

        // list 2 tasks in the list
        TestTask[] currentList = td.getTypicalTasks();
        String priority = "1";
        assertlistPrioritySuccess(currentList, priority, td.archivePastEmails, td.borrowBooks, td.collectParcel, td.discardBooks,td.editPowerpoint);

         //no tasks to list
         priority = "0";
         assertlistPrioritySuccess(currentList, priority);
        
         // invalid command format
         commandBox.runCommand("list-priority");
         assertResultMessage("Invalid command format! \n" + "list-priority" + ": List the task with the specified priority. "
                 + "Parameters: INDEX (must be between 0 and 3 inclusive).\n"
                 + "Example: list-priority 1");

    }

    /**
     * Runs the list priority command to list tasks with a specified
     * priority and confirms the result is correct.
     * 
     * @param priority
     *            e.g. to list tasks with priority 1, "1"
     *            should be given as the date.
     * @param currentList
     *            A copy of the current list of tasks (before prioritising).
     * @param 
     * @throws IllegalValueException
     */
    private void assertlistPrioritySuccess(final TestTask[] currentList, String priority, TestTask... values)
            throws IllegalValueException {

        commandBox.runCommand("list-priority " + priority);

        assertListSize(values.length);
        // confirm the result message is correct
        assertResultMessage(values.length + " tasks listed!");
        // confirm the list now contains all previous tasks except the edited
        // task
        assertTrue(taskListPanel.isListMatching(values));
    }

}
// @@author
@@ -120,16 +120,62 @@
 eption;%0A
+import seedu.taskell.model.task.TaskPriority;%0A
 import s
@@ -508,19 +508,41 @@
 ority = 
-%221%22
+TaskPriority.LOW_PRIORITY
 ;%0A      
@@ -737,11 +737,32 @@
 y = 
-%220%22
+TaskPriority.NO_PRIORITY
 ;%0A  

Add magic string