package seedu.address.testutil;

import seedu.address.commons.exceptions.IllegalValueException;
import seedu.address.model.tag.Tag;
import seedu.address.model.tag.UniqueTagList;
import seedu.address.model.task.Name;

/**
 * TODO
 */
public class TaskBuilder {

    private TestTask task;

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

    /**
     * Initializes the TaskBuilder with the data of {@code taskToCopy}.
     */
    public TaskBuilder(TestTask taskToCopy) {
        this.task = new TestTask(taskToCopy);
    }

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

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

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

}

@@ -207,30 +207,250 @@
 ask.
-Name;%0A%0A/**%0A * TODO%0A */
+Deadline;%0Aimport seedu.address.model.task.Name;%0Aimport seedu.address.model.task.StartEndDateTime;%0A%0A//@@author A0140023E%0A/**%0A * A Task Builder class that allow us to construct a Task by chaining calls for convenience in testing.%0A */%0A//@@author
 %0Apub
@@ -529,37 +529,32 @@
 der() %7B%0A        
-this.
 task = new TestT
@@ -705,29 +705,24 @@
 ) %7B%0A        
-this.
 task = new T
@@ -833,21 +833,16 @@
         
-this.
 task.set
@@ -883,32 +883,412 @@
 rn this;%0A    %7D%0A%0A
+    //@@author A0140023E%0A    public TaskBuilder withDeadline(Deadline deadline) throws IllegalValueException %7B%0A        task.setDeadline(deadline);%0A        return this;%0A    %7D%0A%0A    public TaskBuilder withStartEndDateTime(StartEndDateTime startEndDateTime) throws IllegalValueException %7B%0A        task.setStartEndDateTime(startEndDateTime);%0A        return this;%0A    %7D%0A%0A    //@@author%0A
     public TaskB
@@ -1560,13 +1560,8 @@
 urn 
-this.
 task

Support deadlines and start/end dates in TaskBuilder