@@ -0,0 +1,2578 @@
+package utask.model.task;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertFalse;%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport org.junit.Test;%0A%0Aimport javafx.collections.FXCollections;%0Aimport javafx.collections.ObservableList;%0Aimport utask.model.tag.Tag;%0Aimport utask.model.tag.TagColorIndex;%0Aimport utask.model.tag.TagName;%0Aimport utask.model.tag.UniqueTagList;%0Aimport utask.model.task.UniqueTaskList.TaskNotFoundException;%0Aimport utask.model.util.SampleDataUtil;%0A%0A//@@author A0138423J%0Apublic class UniqueTaskListTest %7B%0A%0A    @Test%0A    public void validEventUniqueTaskListConstructorAndHashCode() throws Exception %7B%0A        // UniqueTaskList created from its constructor%0A        UniqueTaskList listOfTask = new UniqueTaskList();%0A        Task taskToReplace = SampleDataUtil.generateEventTaskWithSeed(1);%0A        listOfTask.add(taskToReplace);%0A%0A        // Task created from raw codes%0A        ObservableList%3CTask%3E rawlist = FXCollections%0A                .observableArrayList();%0A        rawlist.add(taskToReplace);%0A%0A        // compare hashcode of both lists%0A        assertEquals(listOfTask.hashCode(), rawlist.hashCode());%0A    %7D%0A%0A    @Test%0A    public void validEventUniqueTaskListUpdateTag() throws Exception %7B%0A        // UniqueTaskList created from its constructor%0A        UniqueTaskList listOfTask = new UniqueTaskList();%0A        Task taskToReplace = SampleDataUtil.generateEventTaskWithSeed(1);%0A        listOfTask.add(taskToReplace);%0A        Tag tagToReplace = new Tag(%0A                new TagName(%22tag%22 + Math.abs(1)),%0A                new TagColorIndex(%222%22));%0A        Tag tagIncoming = new Tag(%0A                new TagName(%22tag%22 + Math.abs(10)),%0A                new TagColorIndex(%228%22));%0A        listOfTask.updateTaskWithUpdatedTag(tagToReplace, tagIncoming);%0A        taskToReplace.setTags(%0A                new UniqueTagList(new Tag(%0A                        new TagName(%22tag%22 + Math.abs(10)),%0A                        new TagColorIndex(%228%22)),%0A                        new Tag(new TagName(%22tag%22 + Math.abs(2)),%0A                        new TagColorIndex(%228%22))));%0A        assertTrue(listOfTask.contains(taskToReplace));%0A    %7D%0A%0A    @Test(expected = TaskNotFoundException.class)%0A    public void validEventUniqueTaskListRemoveFail() throws Exception %7B%0A        // UniqueTaskList created from its constructor%0A        UniqueTaskList listOfTask = new UniqueTaskList();%0A        Task taskToReplace = SampleDataUtil.generateEventTaskWithSeed(1);%0A        listOfTask.remove(taskToReplace);%0A        assertFalse(listOfTask.contains(taskToReplace));%0A    %7D%0A%0A%7D%0A

Add UniqueTaskList Test