@@ -0,0 +1,1830 @@
+package guitests;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport java.util.ArrayList;%0A%0Aimport org.junit.Test;%0A%0Aimport guitests.guihandles.TaskCardHandle;%0Aimport hard2do.taskmanager.commons.core.Messages;%0Aimport hard2do.taskmanager.commons.exceptions.IllegalValueException;%0Aimport hard2do.taskmanager.logic.commands.AddTagCommand;%0Aimport hard2do.taskmanager.logic.commands.DeleteTagCommand;%0Aimport hard2do.taskmanager.logic.commands.EditCommand;%0Aimport hard2do.taskmanager.logic.commands.FindTagCommand;%0Aimport hard2do.taskmanager.model.tag.UniqueTagList.DuplicateTagException;%0Aimport hard2do.taskmanager.testutil.TestTask;%0A%0A//@@author A0147989B%0Apublic class FindTagCommandTest extends TaskManagerGuiTest %7B%0A    %0A    @Test%0A    public void testFindTag_updatedTasksExpected() throws DuplicateTagException, IllegalValueException %7B%0A        TestTask%5B%5D currentList = td.getTypicalTasks();%0A        String tagToFind = %22shag%22;%0A        //find tag to the first of the list%0A        assertFindTagSuccess(currentList, tagToFind);%0A        %0A        //find tag to the middle of the list%0A        tagToFind = %22tired%22;%0A        assertFindTagSuccess(currentList, tagToFind);%0A        %0A        //find tag at the end of list%0A        tagToFind = %22food%22;%0A        assertFindTagSuccess(currentList, tagToFind);%0A    %7D%0A    %0A    %0A    @Test%0A    public void testDeleteTag_notExistingTag_errorMessageExpected() %7B%0A        commandBox.runCommand(%22findtag notExisting%22);%0A        assertResultMessage(%220 tasks listed!%22);%0A    %7D%0A    %0A    //helper method for main test%0A    private void assertFindTagSuccess(final TestTask%5B%5D currentList, String tagToFind) throws DuplicateTagException, IllegalValueException %7B%0A        commandBox.runCommand(%22findtag %22 + tagToFind);%0A%0A        //confirm the result message is correct%0A        assertResultMessage(%221 tasks listed!%22);%0A    %7D%0A%7D%0A

Test cases for findtag