package seedu.taskboss.model.util;

import seedu.taskboss.commons.exceptions.IllegalValueException;
import seedu.taskboss.model.ReadOnlyTaskBoss;
import seedu.taskboss.model.TaskBoss;
import seedu.taskboss.model.category.UniqueCategoryList;
import seedu.taskboss.model.task.DateTime;
import seedu.taskboss.model.task.Information;
import seedu.taskboss.model.task.Name;
import seedu.taskboss.model.task.PriorityLevel;
import seedu.taskboss.model.task.Recurrence;
import seedu.taskboss.model.task.Recurrence.Frequency;
import seedu.taskboss.model.task.Task;
import seedu.taskboss.model.task.UniqueTaskList.DuplicateTaskException;

public class SampleDataUtil {
    public static Task[] getSampleTasks() {
        try {
            return new Task[] {
                new Task(new Name("Attend wedding"), new PriorityLevel("Yes"),
                        new DateTime("Feb 19, 2017"), new DateTime("Feb 20, 2017"),
                    new Information("@Blk 30 Geylang Street 29, #06-40"),
                    new Recurrence(Frequency.NONE),
                    new UniqueCategoryList("Personal", "Alltasks")),
                new Task(new Name("Birthday party"), new PriorityLevel("No"),
                    new DateTime("Feb 19, 2017"), new DateTime("Feb 20, 2017"),
                    new Information(""),
                    new Recurrence(Frequency.NONE),
                    new UniqueCategoryList("Personal", "Party", "Alltasks")),
                new Task(new Name("Clean house"), new PriorityLevel("No"),
                    new DateTime("Feb 19, 2017"), new DateTime("Feb 20, 2017"),
                    new Information("Clean kitchen, living room, main bedroom"),
                    new Recurrence(Frequency.DAILY),
                    new UniqueCategoryList("Personal", "Alltasks")),
                new Task(new Name("Debug code"), new PriorityLevel("Yes"),
                    new DateTime("Feb 19, 2017"), new DateTime("Feb 20, 2017"),
                    new Information("line 45 47 135 in test.java"),
                    new Recurrence(Frequency.NONE),
                    new UniqueCategoryList("Work", "Alltasks")),
                new Task(new Name("Fix errors in report"), new PriorityLevel("Yes"),
                    new DateTime("Feb 19, 2017"), new DateTime("Feb 20, 2017"),
                    new Information("paragraph 3 top discuusion"),
                    new Recurrence(Frequency.NONE),
                    new UniqueCategoryList("Project", "Work",  "Alltasks")),
                new Task(new Name("Having dinner with Hoon Meier"), new PriorityLevel("No"),
                    new DateTime("Feb 19, 2017"), new DateTime("Feb 20, 2017"),
                    new Information(""),
                    new Recurrence(Frequency.NONE),
                    new UniqueCategoryList("Personal", "Alltasks"))
            };
        } catch (IllegalValueException e) {
            throw new AssertionError("sample data cannot be invalid", e);
        }
    }

    public static ReadOnlyTaskBoss getSampleTaskBoss() {
        try {
            TaskBoss sampleTB = new TaskBoss();
            for (Task sampleTask : getSampleTasks()) {
                sampleTB.addTask(sampleTask);
            }
            return sampleTB;
        } catch (DuplicateTaskException e) {
            throw new AssertionError("sample data cannot contain duplicate tasks", e);
        }
    }
}

@@ -1016,36 +1016,38 @@
 rence(Frequency.
-NONE
+WEEKLY
 ),%0A             
@@ -1072,36 +1072,24 @@
 ategoryList(
-%22Personal%22, 
 %22Alltasks%22))
@@ -1326,36 +1326,38 @@
 rence(Frequency.
-NONE
+WEEKLY
 ),%0A             
@@ -1390,29 +1390,8 @@
 ist(
-%22Personal%22, %22Party%22, 
 %22All
@@ -1728,36 +1728,24 @@
 ategoryList(
-%22Personal%22, 
 %22Alltasks%22))
@@ -2006,36 +2006,38 @@
 rence(Frequency.
-NONE
+WEEKLY
 ),%0A             
@@ -2066,24 +2066,16 @@
 oryList(
-%22Work%22, 
 %22Alltask
@@ -2349,36 +2349,38 @@
 rence(Frequency.
-NONE
+WEEKLY
 ),%0A             
@@ -2413,28 +2413,8 @@
 ist(
-%22Project%22, %22Work%22,  
 %22All
@@ -2686,12 +2686,14 @@
 ncy.
-NONE
+WEEKLY
 ),%0A 
@@ -2738,20 +2738,8 @@
 ist(
-%22Personal%22, 
 %22All

fix sample data test errors