package seedu.address.testutil;

import seedu.address.commons.exceptions.IllegalValueException;
import seedu.address.model.person.Deadline;
import seedu.address.model.person.Name;
import seedu.address.model.person.Notes;
import seedu.address.model.person.Priority;
import seedu.address.model.person.Start;
import seedu.address.model.tag.Tag;
import seedu.address.model.tag.UniqueTagList;

/**
 *
 */
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 withStart(String start) throws IllegalValueException {
        this.task.setStart(new Start(start));
        return this;
    }
    
    public TaskBuilder withDeadline(String deadline) throws IllegalValueException {
        this.task.setDeadline(new Deadline(deadline));
        return this;
    }
    
    public TaskBuilder withPriority(int priority) throws IllegalValueException {
        this.task.setPriority(new Priority(priority));
        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 TaskBuilder withNotes(String notes) throws IllegalValueException {
        this.task.setNotes(new Notes(notes));
        return this;
    }

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

}

@@ -996,37 +996,33 @@
 urn this;%0A    %7D%0A
-    
 %0A
+
     public TaskB
@@ -1163,37 +1163,33 @@
 urn this;%0A    %7D%0A
-    
 %0A
+
     public TaskB
@@ -1374,17 +1374,16 @@
 s(String
- 
 ... tags
@@ -1481,16 +1481,17 @@
 ring tag
+ 
 : tags) 
@@ -1575,20 +1575,16 @@
 ;%0A    %7D%0A
-    
 %0A    pub

Remove trailing whitespaces