package guitests;

import static org.junit.Assert.assertTrue;

import org.junit.Test;

import seedu.lifekeeper.testutil.TestActivity;

//@@author A0125097A
public class ListCommandTest extends AddressBookGuiTest {

    @Test
    public void list_fromEmptyPanel() {
        TestActivity[] currentList = td.getTypicalActivities();
        commandBox.runCommand("find nothing");

        commandBox.runCommand("list");
        assertTrue(activityListPanel.isListMatching(currentList));
    }

    @Test
    public void listTask_fromAllPanelsShown() {
        TestActivity[] currentList = td.getTypicalActivities();
        TestActivity[] expectedList = td.getTasksOnly();

        commandBox.runCommand("list task");
        assertTrue(activityListPanel.isListMatching(expectedList));
    }

    @Test
    public void listActivities_fromAllPanelsShown() {
        TestActivity[] currentList = td.getTypicalActivities();
        TestActivity[] expectedList = td.getActivitiesOnly();

        commandBox.runCommand("list activity");
        assertTrue(activityListPanel.isListMatching(expectedList));
    }

    @Test
    public void listEvents_fromAllPanelsShown() {
        TestActivity[] currentList = td.getTypicalActivities();
        TestActivity[] expectedList = td.getEventsOnly();

        commandBox.runCommand("list event");
        assertTrue(activityListPanel.isListMatching(expectedList));
    }

    // @@A0131813R
    @Test
    public void listAll_fromAllPanelsShown() {
        TestActivity[] currentList = td.getTypicalActivities();
        TestActivity[] expectedList = td.getTypicalActivities();

        commandBox.runCommand("list all");
        assertTrue(activityListPanel.isListMatching(expectedList));
    }
}

@@ -545,72 +545,8 @@
 ) %7B%0A
-        TestActivity%5B%5D currentList = td.getTypicalActivities();%0A
     
@@ -590,32 +590,32 @@
 getTasksOnly();%0A
+
 %0A        command
@@ -786,72 +786,8 @@
 ) %7B%0A
-        TestActivity%5B%5D currentList = td.getTypicalActivities();%0A
     
@@ -1032,72 +1032,8 @@
 ) %7B%0A
-        TestActivity%5B%5D currentList = td.getTypicalActivities();%0A
     
@@ -1228,32 +1228,32 @@
 1813R%0A    @Test%0A
+
     public void 
@@ -1287,72 +1287,8 @@
 ) %7B%0A
-        TestActivity%5B%5D currentList = td.getTypicalActivities();%0A
     

Refactor ListCommandTest