package seedu.address.testutil;

import seedu.address.commons.exceptions.IllegalValueException;
import seedu.address.model.TaskList;
import seedu.address.model.task.Task;
import seedu.address.model.task.UniqueTaskList;

/**
 * TODO
 */
public class TypicalTestTasks {

    // TODO naming of tasks as names does not seem to be a good idea, and not descriptive enough
    // for example helpMe and iAmCode are to be manually added in test cases but it is not clear
    // conversely the name shows what the task contains, so it can be helpful
    public TestTask amuseFriend, bet, count, dog, elephant, flipTable, goondu, helpMe, iAmCode;

    public TypicalTestTasks() {
        try {
            amuseFriend = new TaskBuilder().withName("Amuse friend").withTags("friends").build();
            // TODO flip the order of tags and test cases can fail, see TestUtil::compareCardAndPerson
            // using list compare instead of set compare
            bet = new TaskBuilder().withName("Bet dog race").withTags("luck", "money").build();
            count = new TaskBuilder().withName("Count chickens before they hatch").build();
            dog = new TaskBuilder().withName("Dog naming").build();
            elephant = new TaskBuilder().withName("Elephant riding").build();
            flipTable = new TaskBuilder().withName("Flip table").build();
            goondu = new TaskBuilder().withName("Goondu goon").build();

            // Manually added
            helpMe = new TaskBuilder().withName("Help me").build();
            iAmCode = new TaskBuilder().withName("I am code").build();
        } catch (IllegalValueException e) {
            e.printStackTrace();
            assert false : "not possible";
        }
    }

    public static void loadTaskListWithSampleData(TaskList taskList) {
        for (TestTask task : new TypicalTestTasks().getTypicalTasks()) {
            try {
                taskList.addTask(new Task(task));
            } catch (UniqueTaskList.DuplicateTaskException e) {
                assert false : "not possible";
            }
        }
    }

    public TestTask[] getTypicalTasks() {
        return new TestTask[]{amuseFriend, bet, count, dog, elephant, flipTable, goondu};
    }

    public TaskList getTypicalTaskList() {
        TaskList taskList = new TaskList();
        loadTaskListWithSampleData(taskList);
        return taskList;
    }
}

@@ -26,16 +26,87 @@
 tutil;%0A%0A
+import java.time.ZonedDateTime;%0Aimport java.time.temporal.ChronoUnit;%0A%0A
 import s
@@ -197,16 +197,108 @@
 skList;%0A
+import seedu.address.model.task.Deadline;%0Aimport seedu.address.model.task.StartEndDateTime;%0A
 import s
@@ -794,16 +794,41 @@
 mCode;%0A%0A
+    //@@author A0140023E%0A
     publ
@@ -851,37 +851,451 @@
 sks() %7B%0A        
-try %7B
+// Starting Test Date Time is set to one day after today so that dates in the past is not%0A        // generated to prevent a PastDateTimeException from occuring. Furthermore the precision%0A        // is truncated to seconds as Natty does not parse milliseconds%0A        ZonedDateTime startTestDateTime = ZonedDateTime.now().truncatedTo(ChronoUnit.SECONDS).plusDays(1);%0A        try %7B%0A            // floating task with a tag
 %0A            amu
@@ -1537,16 +1537,59 @@
 compare%0A
+            // floating task with two tags%0A
         
@@ -1668,32 +1668,74 @@
 oney%22).build();%0A
+            // floating task with no tags%0A
             coun
@@ -1802,32 +1802,67 @@
 atch%22).build();%0A
+            // task with deadlines%0A
             dog 
@@ -1907,95 +1907,479 @@
 ng%22)
-.build();%0A            elephant = new TaskBuilder().withName(%22Elephant riding%22).build();
+%0A                    .withDeadline(new Deadline(startTestDateTime.plusDays(3))).build();%0A            // task with start and end dates%0A            elephant = new TaskBuilder().withName(%22Elephant riding%22)%0A                    .withStartEndDateTime(new StartEndDateTime(startTestDateTime.plusHours(2),%0A                                                               startTestDateTime.plusHours(3)))%0A                    .build();%0A            // some other random floating tasks
 %0A   
@@ -2552,16 +2552,73 @@
 y added%0A
+            // TODO maybe to use non-floating tasks here%0A
         
@@ -2877,32 +2877,47 @@
        %7D%0A    %7D%0A%0A
+    //@@author%0A
     public stati

Update some test cases in TypicalTestTasks