package seedu.taskboss.testutil;

import seedu.taskboss.commons.exceptions.IllegalValueException;
import seedu.taskboss.model.TaskBoss;
import seedu.taskboss.model.task.Task;
import seedu.taskboss.model.task.UniqueTaskList;

/**
 *
 */
public class TypicalTestTasks {

    public TestTask taskA, taskB, taskC, taskD, taskE, taskF, taskG, taskH, taskI, taskJ, taskK;

    public TypicalTestTasks() {
        try {
            taskA = new TaskBuilder().withName("Attend project meeting")
                    .withInformation("finish report")
                    .withPriorityLevel("Yes")
                    .withStartDateTime("Feb 18, 2017 5pm")
                    .withEndDateTime("Mar 28, 2017 5pm")
                    .withCategories("personal").build();
            taskB = new TaskBuilder().withName("Birthday party")
                    .withInformation("ABCRestaurant, 311, Clementi Ave 2, #02-25")
                    .withPriorityLevel("No")
                    .withStartDateTime("Feb 23, 2017 10pm")
                    .withEndDateTime("Jun 28, 2017 5pm")
                    .withCategories("family", "personal").build();
            taskC = new TaskBuilder().withName("Clean house").withPriorityLevel("Yes")
                    .withStartDateTime("Feb 19, 2017 11pm")
                    .withEndDateTime("Feb 28, 2017 5pm")
                    .withInformation("clean bedroom, study and kitchen").build();
            taskD = new TaskBuilder().withName("Design the poster").withPriorityLevel("Yes")
                    .withStartDateTime("Feb 20, 2017 11.30pm")
                    .withEndDateTime("Apr 28, 2017 3pm")
                    .withInformation("print the poster, submit to manager").build();
            taskE = new TaskBuilder().withName("Ensure code quality").withPriorityLevel("No")
                    .withStartDateTime("Feb 22, 2017 5pm")
                    .withEndDateTime("Feb 28, 2017 5pm")
                    .withInformation("check with Jack").build();
            taskF = new TaskBuilder().withName("Fix bugs in code").withPriorityLevel("No")
                    .withStartDateTime("Feb 21, 2017 1pm")
                    .withEndDateTime("Dec 10, 2017 5pm")
                    .withInformation("bugs in: part A and part D").build();
            taskG = new TaskBuilder().withName("Game project player testing").withPriorityLevel("Yes")
                    .withStartDateTime("Jan 1, 2017 5pm")
                    .withEndDateTime("Nov 28, 2017 5pm")
                    .withInformation("Finish all the UI and model before the test").build();

            // Manually added
            taskH = new TaskBuilder().withName("Have dinner with Hoon Meier").withPriorityLevel("Yes")
                    .withStartDateTime("Feb 19, 2018 5pm")
                    .withEndDateTime("Feb 28, 2018 5pm")
                    .withInformation("little india").build();
            taskI = new TaskBuilder().withName("Invite friends").withPriorityLevel("Yes")
                    .withStartDateTime("Feb 19, 2019 5pm")
                    .withEndDateTime("Feb 28, 2019 5pm")
                    .withInformation("chicago ave").build();
            taskJ = new TaskBuilder().withName("Join the LeaderTeam").withPriorityLevel("Yes")
                    .withStartDateTime("next sat 5pm")
                    .withEndDateTime("tomorrow")
                    .withInformation("Silicon Valley").build();
            taskK = new TaskBuilder().withName("Kelly wedding").withPriorityLevel("Yes")
                    .withStartDateTime("Dec 20 2019")
                    .withEndDateTime("Dec 21 2019")
                    .withInformation("Remember to bring the gift").build();
        } catch (IllegalValueException e) {
            e.printStackTrace();
            assert false : "not possible";
        }
    }

    public static void loadTaskBossWithSampleData(TaskBoss 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[]{taskC, taskE, taskA, taskD, taskB, taskG, taskF};
    }

    public TaskBoss getTypicalTaskBoss() {
        TaskBoss ab = new TaskBoss();
        loadTaskBossWithSampleData(ab);
        return ab;
    }
}

@@ -458,30 +458,19 @@
 me(%22
-Attend project meeting
+Clean house
 %22)%0A 
@@ -510,21 +510,40 @@
 on(%22
-finish report
+clean bedroom, study and kitchen
 %22)%0A 
@@ -812,22 +812,32 @@
 me(%22
-Birthday party
+Have dinner with parents
 %22)%0A 
@@ -1195,27 +1195,31 @@
 thName(%22
-Clean house
+project meeting
 %22).withP
@@ -1397,40 +1397,21 @@
 on(%22
-clean bedroom, study and kitchen
+finish report
 %22).b
@@ -1470,25 +1470,24 @@
 me(%22
-Design the poster
+Report submition
 %22).w
@@ -1678,18 +1678,14 @@
 int 
-the poster
+report
 , su
@@ -1763,27 +1763,24 @@
 me(%22
-Ensure code quality
+Fix bugs in code
 %22).w
@@ -1960,23 +1960,34 @@
 on(%22
-check with Jack
+bugs in: part A and part D
 %22).b
@@ -2042,32 +2042,31 @@
 thName(%22
-Fix bugs in code
+Product testing
 %22).withP
@@ -2242,34 +2242,30 @@
 on(%22
-bugs in: part A and part D
+Do it with Jack's team
 %22).b
@@ -2947,22 +2947,14 @@
 me(%22
-Invite friends
+Dating
 %22).w
@@ -3206,27 +3206,20 @@
 me(%22
-Join the LeaderTeam
+Buy a laptop
 %22).w
@@ -3462,13 +3462,22 @@
 me(%22
-Kelly
+Attend Alice's
  wed

Revert "make task name consistent with A,B,C.."