package seedu.unburden.testutil;

import seedu.unburden.commons.exceptions.IllegalValueException;
import seedu.unburden.model.tag.Tag;
import seedu.unburden.model.task.*;

/**
 *
 */
public class TaskBuilder {

    private TestTask person;

    public TaskBuilder() {
        this.person = new TestTask();
    }

    public TaskBuilder withName(String name) throws IllegalValueException {
        this.person.setName(new Name(name));
        return this;
    }

    public TaskBuilder withTags(String ... tags) throws IllegalValueException {
        for (String tag: tags) {
            person.getTags().add(new Tag(tag));
        }
        return this;
    }

    public TestTask build() {
        return this.person;
    }

}

@@ -171,16 +171,76 @@
 %0A%0A/**%0A *
+A class that builds sample Task testcases%0A *Author A0147986H
 %0A */%0Apub
@@ -285,22 +285,20 @@
 estTask 
-person
+task
 ;%0A%0A    p
@@ -332,22 +332,20 @@
    this.
-person
+task
  = new T
@@ -455,66 +455,736 @@
 his.
-person.setName(new Name(name));%0A        return this;%0A    %7D
+task.setName(new Name(name));%0A        return this;%0A    %7D%0A    %0A    public TaskBuilder withDate(String date) throws IllegalValueException %7B%0A        this.task.setDate(new Date(date));%0A        return this;%0A    %7D%0A%0A    public TaskBuilder withStartTime(String startTime) throws IllegalValueException %7B%0A        this.task.setStartTime(new Time(startTime));%0A        return this;%0A    %7D%0A    %0A    public TaskBuilder withEndTime(String endTime) throws IllegalValueException %7B%0A        this.task.setEndTime(new Time(endTime));%0A        return this;%0A    %7D%0A    %0A    public TaskBuilder withTaskDescription(String taskD) throws IllegalValueException %7B%0A        this.task.setTaskDescription(new TaskDescription(taskD));%0A        return this;%0A    %7D%0A    
 %0A%0A  
@@ -1306,22 +1306,20 @@
         
-person
+task
 .getTags
@@ -1432,14 +1432,12 @@
 his.
-person
+task
 ;%0A  

add more methods in TaskBuilder