//@@author A0147984L
package seedu.address.model.task;

import static org.junit.Assert.assertEquals;

import org.junit.Test;

import seedu.address.model.task.UniqueTaskList.DuplicateTaskException;
import seedu.address.testutil.TypicalTestTasks;

public class UniqueTaskListTest {

    private UniqueTaskList tester = new UniqueTaskList();
    private final TypicalTestTasks testUtil = new TypicalTestTasks();

    @Test
    public void sort() throws DuplicateTaskException {

        tester.add(new Task(testUtil.familyDinner));
        tester.add(new Task(testUtil.meeting));
        tester.add(new Task(testUtil.travel));
        tester.add(new Task(testUtil.shopping));

        tester.sort();

        assertEquals(tester.get(0).getName().fullName, "meeting");
        assertEquals(tester.get(1).getName().fullName, "family dinner");
        assertEquals(tester.get(2).getName().fullName, "shopping");
        assertEquals(tester.get(3).getName().fullName, "travel");
    }
}

@@ -119,16 +119,79 @@
 .Test;%0A%0A
+import seedu.address.commons.exceptions.IllegalValueException;%0A
 import s
@@ -1033,11 +1033,1847 @@
 );%0A    %7D
+%0A%0A    @Test%0A    public void deleteTest() throws DuplicateTaskException %7B%0A%0A        Task shoppingTask = new Task(testUtil.shopping);%0A%0A        tester.add(shoppingTask);%0A        tester.add(new Task(testUtil.familyDinner));%0A        tester.add(new Task(testUtil.meeting));%0A        tester.add(new Task(testUtil.travel));%0A        tester.delete(shoppingTask);%0A%0A        tester.sort();%0A%0A        assertEquals(tester.get(0).getName().fullName, %22meeting%22);%0A        assertEquals(tester.get(1).getName().fullName, %22family dinner%22);%0A        assertEquals(tester.get(2).getName().fullName, %22travel%22);%0A    %7D%0A%0A    @Test%0A    public void updateValidTest() throws DuplicateTaskException %7B%0A%0A        Task shoppingTask = new Task(testUtil.shopping);%0A%0A        tester.add(new Task(testUtil.familyDinner));%0A        tester.add(new Task(testUtil.meeting));%0A        tester.add(new Task(testUtil.travel));%0A        tester.sort();%0A        tester.updateTask(1, shoppingTask);%0A%0A        assertEquals(tester.get(0).getName().fullName, %22meeting%22);%0A        assertEquals(tester.get(1).getName().fullName, %22shopping%22);%0A        assertEquals(tester.get(2).getName().fullName, %22travel%22);%0A    %7D%0A%0A    @Test%0A    public void updateValidEventTest() throws IllegalValueException %7B%0A        Event testEvent = new Event(new Name(%22test%22), new TaskDate(%2215/4%22), new TaskTime(%2220:00%22),%0A                new TaskDate(%2215/4%22), new TaskTime(%2221:00%22), null, null, null, null, false);%0A%0A        tester.add(new Task(testUtil.familyDinner));%0A        tester.add(new Task(testUtil.meeting));%0A        tester.add(new Task(testUtil.travel));%0A        tester.sort();%0A        tester.updateTask(1, testEvent);%0A%0A        assertEquals(tester.get(0).getName().fullName, %22meeting%22);%0A        assertEquals(tester.get(1).getName().fullName, %22test%22);%0A        assertEquals(tester.get(2).getName().fullName, %22travel%22);%0A    %7D
 %0A%7D%0A

Add testcases for UniqueTaskList