package seedu.doist.testutil;

import seedu.doist.commons.exceptions.IllegalValueException;
import seedu.doist.model.TodoList;
import seedu.doist.model.task.Task;
import seedu.doist.model.task.UniqueTaskList;

/**
 *
 */
public class TypicalTestPersons {

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

    public TypicalTestPersons() {
        try {
            alice = new TaskBuilder().withName("Alice Pauline").build();  //.withTags("friends").build();
            benson = new TaskBuilder().withName("Benson Meier").withTags("owesMoney", "friends").build();
            carl = new TaskBuilder().withName("Carl Kurz").withPriority("VERYIMPORTANT").build();
            daniel = new TaskBuilder().withName("Daniel Meier").withPriority("IMPORTANT").build();
            elle = new TaskBuilder().withName("Elle Meyer").build();
            fiona = new TaskBuilder().withName("Fiona Kunz").build();
            george = new TaskBuilder().withName("George Best").build();

            // Manually added
            hoon = new TaskBuilder().withName("Hoon Meier").build();
            ida = new TaskBuilder().withName("Ida Mueller").build();
        } catch (IllegalValueException e) {
            e.printStackTrace();
            assert false : "not possible";
        }
    }

    public static void loadAddressBookWithSampleData(TodoList ab) {
        for (TestPerson person : new TypicalTestPersons().getTypicalTasks()) {
            try {
                ab.addTask(new Task(person));
            } catch (UniqueTaskList.DuplicateTaskException e) {
                assert false : "not possible";
            }
        }
    }

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

    public TodoList getTypicalAddressBook() {
        TodoList ab = new TodoList();
        loadAddressBookWithSampleData(ab);
        return ab;
    }
}

@@ -238,22 +238,20 @@
 icalTest
-Person
+Task
 s %7B%0A%0A   
@@ -266,74 +266,90 @@
 Test
-Person alice, benson, carl, daniel, elle, fiona, george
+Task laundry, homework, chores, work, school, groceries
 , 
+s
 ho
-on, ida
+pping, email, exercise
 ;%0A%0A 
@@ -369,22 +369,20 @@
 icalTest
-Person
+Task
 s() %7B%0A  
@@ -405,21 +405,23 @@
         
-alice
+laundry
  = new T
@@ -447,54 +447,18 @@
 me(%22
-Alice Pauline%22).build();  //.withTags(%22friends
+Do laundry
 %22).b
@@ -477,22 +477,24 @@
         
-benson
+homework
  = new T
@@ -520,53 +520,57 @@
 me(%22
-Benson Meier%22).withTags(%22owesMoney%22, %22friends
+Complete math homework%22).withTags(%22school%22, %22math
 %22).b
@@ -590,19 +590,21 @@
        c
-arl
+hores
  = new T
@@ -631,16 +631,21 @@
 e(%22C
-arl Kurz
+lean up house
 %22).w
@@ -694,22 +694,20 @@
         
-daniel
+work
  = new T
@@ -733,20 +733,34 @@
 me(%22
-Daniel Meier
+Schedule meeting with boss
 %22).w
@@ -805,20 +805,22 @@
         
-elle
+school
  = new T
@@ -846,18 +846,35 @@
 me(%22
-Elle Meyer
+Submit chemistry assignment
 %22).b
@@ -893,21 +893,25 @@
         
-fiona
+groceries
  = new T
@@ -937,18 +937,20 @@
 me(%22
-Fiona Kunz
+Pick up milk
 %22).b
@@ -969,22 +969,24 @@
         
-george
+shopping
  = new T
@@ -1012,19 +1012,21 @@
 me(%22
-George Best
+Buy new clock
 %22).b
@@ -1080,12 +1080,13 @@
     
-hoon
+email
  = n
@@ -1116,18 +1116,29 @@
 me(%22
-Hoon Meier
+Send emails to client
 %22).b
@@ -1161,11 +1161,16 @@
     
-ida
+exercise
  = n
@@ -1200,19 +1200,20 @@
 me(%22
-Ida Mueller
+Go for a run
 %22).b
@@ -1380,35 +1380,29 @@
 ic void load
-AddressBook
+Doist
 WithSampleDa
@@ -1436,22 +1436,20 @@
 or (Test
-Person
+Task
  person 
@@ -1465,22 +1465,20 @@
 icalTest
-Person
+Task
 s().getT
@@ -1715,22 +1715,20 @@
 lic Test
-Person
+Task
 %5B%5D getTy
@@ -1769,65 +1769,75 @@
 Test
-Person%5B%5D%7Balice, benson, carl, daniel, elle, fiona, george
+Task%5B%5D%7Blaundry, homework, chores, work, school, groceries, shopping
 %7D;%0A 
@@ -1938,27 +1938,21 @@
     load
-AddressBook
+Doist
 WithSamp

Refactor typical test tasks