package seedu.jimi.testutil;

import seedu.jimi.commons.exceptions.IllegalValueException;
import seedu.jimi.model.TaskBook;
import seedu.jimi.model.tag.Tag;
import seedu.jimi.model.task.FloatingTask;
import seedu.jimi.model.task.UniqueTaskList;

/**
 * A utility class to help with building Taskbook objects.
 * Example usage: <br>
 *     {@code TaskBook ab = new TaskBookBuilder().withTask("John", "Doe").withTag("Friend").build();}
 */
public class TaskBookBuilder {

    private TaskBook taskBook;

    public TaskBookBuilder(TaskBook taskBook){
        this.taskBook = taskBook;
    }

    public TaskBookBuilder withFloatingTask(FloatingTask floatingTask) throws UniqueTaskList.DuplicateTaskException {
        taskBook.addTask(floatingTask);
        return this;
    }

    public TaskBookBuilder withTag(String tagName) throws IllegalValueException {
        taskBook.addTag(new Tag(tagName));
        return this;
    }

    public TaskBook build(){
        return taskBook;
    }
}

@@ -145,15 +145,95 @@
 del.
-tag.Tag
+event.Event;%0Aimport seedu.jimi.model.tag.Tag;%0Aimport seedu.jimi.model.task.DeadlineTask
 ;%0Aim
@@ -840,32 +840,384 @@
 urn this;%0A    %7D%0A
+    %0A    public TaskBookBuilder withDeadlineTask(DeadlineTask deadlineTask) throws UniqueTaskList.DuplicateTaskException %7B%0A        taskBook.addTask(deadlineTask);%0A        return this;%0A    %7D%0A%0A    public TaskBookBuilder withEvent(Event event) throws UniqueTaskList.DuplicateTaskException %7B%0A        taskBook.addTask(event);%0A        return this;%0A    %7D%0A    
 %0A    public Task

Add support for deadline tasks and events on TaskBookBuilder