package guitests;

public class ViewCommandTest {

}

@@ -1,53 +1,1586 @@
-package guitests;%0A%0Apublic class ViewCommandTest %7B%0A
+//@@ author A0147996E%0Apackage guitests;%0A%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport org.junit.Test;%0A%0Aimport seedu.address.commons.core.Messages;%0Aimport seedu.address.testutil.TestTask;%0A%0Apublic class ViewCommandTest extends TaskManagerGuiTest %7B%0A%0A    @Test%0A    public void view () %7B%0A        //view all tasks in Dueue%0A        assertViewResult(%22view %22, td.gym, td.gym2, td.gym3, td.date,%0A                td.cs2103, td.study, td.assignment);%0A        //view multiple tasks by view name%0A        assertViewResult(%22view personal%22, td.gym, td.gym2, td.gym3, td.date);%0A        //view single task by view name%0A        assertViewResult(%22view study%22, td.assignment);%0A%0A        //view finished tasks in Dueue%0A        commandBox.runCommand(%22finish 1%22);%0A        commandBox.runCommand(%22finish 2%22);%0A        commandBox.runCommand(%22finish 3%22);%0A        assertViewResult(%22view finished%22, td.gym, td.gym2, td.gym3);%0A%0A        //view favorite tasks in Dueue%0A        assertViewResult(%22view favorite%22, td.assignment);%0A    %7D%0A%0A    @Test%0A    public void view_invalidCommand_fail() %7B%0A        commandBox.runCommand(%22views study%22);%0A        assertResultMessage(Messages.MESSAGE_UNKNOWN_COMMAND);%0A%0A        commandBox.runCommand(%22viewstudy%22);%0A        assertResultMessage(Messages.MESSAGE_UNKNOWN_COMMAND);%0A    %7D%0A%0A    private void assertViewResult(String command, TestTask... expectedHits) %7B%0A        commandBox.runCommand(command);%0A        assertListSize(expectedHits.length);%0A        assertResultMessage(expectedHits.length + %22 tasks found!%22);%0A        assertTrue(taskListPanel.isListMatching(expectedHits));%0A    %7D
 %0A%7D%0A

Update view command test