package seedu.tache.testutil;

import seedu.tache.commons.exceptions.IllegalValueException;
import seedu.tache.model.TaskManager;
import seedu.tache.model.task.Task;
import seedu.tache.model.task.UniqueTaskList;

/**
 *
 */
public class TypicalTestTasks {

    public TestTask eggsAndBread;
    public TestTask readBook;
    public TestTask visitGrandma;
    public TestTask payDavid;
    public TestTask getFit;
    public TestTask findGirlfriend;
    public TestTask visitSarah;

    public TypicalTestTasks() {
        try {
            eggsAndBread = new TaskBuilder().withName("Buy Eggs and Bread")
                    .withStartDateTime("01-04-17 19:55:12")
                    .withTags("HighPriority").build();
            readBook = new TaskBuilder().withName("Read Book about Software Engineering")
                    .withEndDateTime("21-04-17 23:59:59")
                    .withTags("LowPriority").build();
            visitGrandma = new TaskBuilder().withName("Visit Grandma")
                    .withStartDateTime("15-04-17 16:00:00")
                    .withEndDateTime("21-04-17 19:00:00").build();
            payDavid = new TaskBuilder().withName("Pay David 20 for cab").build();
            visitSarah = new TaskBuilder().withName("Visit Sarah")
                                          .withTags("MediumPriority").build();

            // Manually added
            getFit = new TaskBuilder().withName("Get fit").build();
            findGirlfriend = new TaskBuilder().withName("Find a girlfriend").build();
        } catch (IllegalValueException e) {
            e.printStackTrace();
            assert false : "not possible";
        }
    }

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

    public TestTask[] getTypicalTasks() {
        return new TestTask[]{eggsAndBread, readBook, visitGrandma, payDavid, visitSarah};
    }

    public TaskManager getTypicalTaskManager() {
        TaskManager ab = new TaskManager();
        loadTaskManagerWithSampleData(ab);
        return ab;
    }
}

@@ -614,37 +614,35 @@
            .with
-Start
+End
 DateTime(%2201-04-
@@ -636,20 +636,20 @@
 eTime(%220
-1-04
+4-01
 -17 19:5
@@ -834,29 +834,29 @@
 ndDateTime(%22
-21-04
+04-21
 -17 23:59:59
@@ -1027,13 +1027,13 @@
 me(%22
-15-04
+04-15
 -17 
@@ -1085,13 +1085,13 @@
 me(%22
-21-04
+04-21
 -17 

Update TypicalTestTask dates to mm/dd/yyyy