package seedu.ezdo.testutil;

import seedu.ezdo.commons.exceptions.IllegalValueException;
import seedu.ezdo.model.EzDo;
import seedu.ezdo.model.todo.Task;
import seedu.ezdo.model.todo.UniqueTaskList;

/**
 *
 */
public class TypicalTestTasks {

    public TestTask alice, benson, carl, daniel, elle, fiona, george, hoon, ida;

    public TypicalTestTasks() {
        try {
            alice = new TaskBuilder().withName("Alice Pauline")
                    .withStartDate("123, Jurong West Ave 6, #08-111").withEmail("alice@gmail.com")
                    .withPriority("1")
                    .withTags("friends").build();
            benson = new TaskBuilder().withName("Benson Meier").withStartDate("311, Clementi Ave 2, #02-25")
                    .withEmail("johnd@gmail.com").withPriority("1")
                    .withTags("owesMoney", "friends").build();
            carl = new TaskBuilder().withName("Carl Kurz").withPriority("2")
                    .withEmail("heinz@yahoo.com").withStartDate("wall street").build();
            daniel = new TaskBuilder().withName("Daniel Meier").withPriority("2")
                    .withEmail("cornelia@google.com").withStartDate("10th street").build();
            elle = new TaskBuilder().withName("Elle Meyer").withPriority("3")
                    .withEmail("werner@gmail.com").withStartDate("michegan ave").build();
            fiona = new TaskBuilder().withName("Fiona Kunz").withPriority("2")
                    .withEmail("lydia@gmail.com").withStartDate("little tokyo").build();
            george = new TaskBuilder().withName("George Best").withPriority("3")
                    .withEmail("anna@google.com").withStartDate("4th street").build();

            // Manually added
            hoon = new TaskBuilder().withName("Hoon Meier").withPriority("1")
                    .withEmail("stefan@mail.com").withStartDate("little india").build();
            ida = new TaskBuilder().withName("Ida Mueller").withPriority("2")
                    .withEmail("hans@google.com").withStartDate("chicago ave").build();
        } catch (IllegalValueException e) {
            e.printStackTrace();
            assert false : "not possible";
        }
    }

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

    public TestTask[] getTypicalTasks() {
        return new TestTask[]{alice, benson, carl, daniel, elle, fiona, george};
    }

    public EzDo getTypicalEzDo() {
        EzDo ez = new EzDo();
        loadEzDoWithSampleData(ez);
        return ez;
    }
}

@@ -496,17 +496,17 @@
 , #08-11
-1
+3
 %22).withE
@@ -559,32 +559,58 @@
 ithPriority(%221%22)
+.withDueDate(%2214/03/2015%22)
 %0A               
@@ -799,24 +799,50 @@
 gmail.com%22).
+withDueDate(%2212/02/2015%22).
 withPriority
@@ -978,32 +978,58 @@
 ithPriority(%222%22)
+.withDueDate(%2213/03/2015%22)
 %0A               
@@ -1174,32 +1174,58 @@
 ithPriority(%222%22)
+.withDueDate(%2214/04/2015%22)
 %0A               
@@ -1370,32 +1370,58 @@
 ithPriority(%223%22)
+.withDueDate(%2215/05/2015%22)
 %0A               
@@ -1565,32 +1565,58 @@
 ithPriority(%222%22)
+.withDueDate(%2216/06/2015%22)
 %0A               
@@ -1769,16 +1769,42 @@
 ity(%223%22)
+.withDueDate(%2217/07/2015%22)
 %0A       
@@ -1983,32 +1983,58 @@
 ithPriority(%221%22)
+.withDueDate(%2218/08/2015%22)
 %0A               
@@ -2184,16 +2184,42 @@
 ity(%222%22)
+.withDueDate(%2219/09/2015%22)
 %0A       

Add due dates in all test tasks