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, jack, kappa, leroy, megan;

    public TypicalTestTasks() {
        try {
            alice = new TaskBuilder().withName("Alice Pauline")
                    .withPriority("1")
                    .withStartDate("12/12/2016 11:22")
                    .withDueDate("14/03/2017 22:33")
                    .withTags("friends").build();
            benson = new TaskBuilder().withName("Benson Meier")
                    .withPriority("1")
                    .withStartDate("11/11/2015 14:33")
                    .withDueDate("12/02/2017 23:22")
                    .withTags("owesMoney", "friends").build();
            carl = new TaskBuilder().withName("Carl Kurz")
                    .withPriority("2")
                    .withStartDate("12/12/2013 05:32")
                    .withDueDate("13/03/2014 00:34")
                    .build();
            daniel = new TaskBuilder().withName("Daniel Meier")
                    .withPriority("2")
                    .withStartDate("12/12/2012 18:22")
                    .withDueDate("14/04/2016 15:17")
                    .build();
            elle = new TaskBuilder().withName("Elle Meyer")
                    .withPriority("3")
                    .withStartDate("01/03/2010 00:33")
                    .withDueDate("15/05/2015 20:20")
                    .build();
            fiona = new TaskBuilder().withName("Fiona Kunz")
                    .withPriority("2")
                    .withStartDate("12/12/2015 14:15")
                    .withDueDate("16/06/2016 17:17")
                    .build();
            george = new TaskBuilder().withName("George Best")
                    .withPriority("3")
                    .withStartDate("02/07/2012 04:55")
                    .withDueDate("17/07/2015 22:22")
                    .build();

            // Manually added
            hoon = new TaskBuilder().withName("Hoon Meier")
                    .withPriority("1")
                    .withStartDate("12/01/2017 11:12")
                    .withDueDate("18/08/2017 17:44")
                    .build();
            ida = new TaskBuilder().withName("Ida Mueller")
                    .withPriority("2")
                    .withStartDate("12/12/2016 13:31")
                    .withDueDate("19/09/2017 02:00")
                    .build();
            jack = new TaskBuilder().withName("Jack Bauer")
                    .withPriority("2")
                    .withStartDate("12/1/2013 00:00")
                    .withDueDate("12/09/2015 15:15")
                    .build();
            kappa = new TaskBuilder().withName("Kappa Sushi")
                    .withPriority("")
                    .withStartDate("")
                    .withDueDate("")
                    .build();
            leroy = new TaskBuilder().withName("Leroy Jenkins")
                    .withPriority("")
                    .withStartDate("")
                    .withDueDate("")
                    .build();
            megan = new TaskBuilder().withName("Megan Fox")
                    .withPriority("")
                    .withStartDate("")
                    .withDueDate("")
                    .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 TestTask[] getTypicalDoneTasks() {
        return new TestTask[]{};
    }

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

}

@@ -600,24 +600,59 @@
 017 22:33%22)%0A
+                    .withRecur(%22%22)%0A
             
@@ -681,32 +681,32 @@
 ends%22).build();%0A
-
             bens
@@ -896,24 +896,59 @@
 017 23:22%22)%0A
+                    .withRecur(%22%22)%0A
             
@@ -1200,24 +1200,59 @@
 014 00:34%22)%0A
+                    .withRecur(%22%22)%0A
             
@@ -1476,24 +1476,59 @@
 016 15:17%22)%0A
+                    .withRecur(%22%22)%0A
             
@@ -1748,24 +1748,59 @@
 015 20:20%22)%0A
+                    .withRecur(%22%22)%0A
             
@@ -2021,24 +2021,59 @@
 016 17:17%22)%0A
+                    .withRecur(%22%22)%0A
             
@@ -2296,24 +2296,59 @@
 015 22:22%22)%0A
+                    .withRecur(%22%22)%0A
             
@@ -2599,24 +2599,59 @@
 017 17:44%22)%0A
+                    .withRecur(%22%22)%0A
             
@@ -2871,24 +2871,59 @@
 017 02:00%22)%0A
+                    .withRecur(%22%22)%0A
             
@@ -3142,24 +3142,59 @@
 015 15:15%22)%0A
+                    .withRecur(%22%22)%0A
             
@@ -3379,32 +3379,67 @@
 withDueDate(%22%22)%0A
+                    .withRecur(%22%22)%0A
                 
@@ -3622,32 +3622,67 @@
 withDueDate(%22%22)%0A
+                    .withRecur(%22%22)%0A
                 
@@ -3824,32 +3824,32 @@
 thStartDate(%22%22)%0A
-
                 
@@ -3861,32 +3861,67 @@
 withDueDate(%22%22)%0A
+                    .withRecur(%22%22)%0A
                 

Update TypicalTestTasks with recur field