package seedu.ezdo.testutil;

import seedu.ezdo.model.tag.UniqueTagList;
import seedu.ezdo.model.todo.Email;
import seedu.ezdo.model.todo.Name;
import seedu.ezdo.model.todo.Priority;
import seedu.ezdo.model.todo.ReadOnlyTask;
import seedu.ezdo.model.todo.StartDate;

/**
 * A mutable task object. For testing only.
 */
public class TestTask implements ReadOnlyTask {

    private static final String PREFIX_EMAIL = "e/";
    private static final String PREFIX_PRIORITY = "p/";
    private static final String PREFIX_STARTDATE = "s/";

    private Name name;
    private StartDate startDate;
    private Email email;
    private Priority priority;
    private UniqueTagList tags;

    public TestTask() {
        tags = new UniqueTagList();
    }

    /**
     * Creates a copy of {@code taskToCopy}.
     */
    public TestTask(TestTask taskToCopy) {
        this.name = taskToCopy.getName();
        this.priority = taskToCopy.getPriority();
        this.email = taskToCopy.getEmail();
        this.startDate = taskToCopy.getStartDate();
        this.tags = taskToCopy.getTags();
    }

    public void setName(Name name) {
        this.name = name;
    }

    public void setStartDate(StartDate startDate) {
        this.startDate = startDate;
    }

    public void setEmail(Email email) {
        this.email = email;
    }

    public void setPriority(Priority priority) {
        this.priority = priority;
    }

    public void setTags(UniqueTagList tags) {
        this.tags = tags;
    }

    @Override
    public Name getName() {
        return name;
    }

    @Override
    public Priority getPriority() {
        return priority;
    }

    @Override
    public Email getEmail() {
        return email;
    }

    @Override
    public StartDate getStartDate() {
        return startDate;
    }

    @Override
    public UniqueTagList getTags() {
        return tags;
    }

    @Override
    public String toString() {
        return getAsText();
    }

    public String getAddCommand() {
        StringBuilder sb = new StringBuilder();
        sb.append("add " + this.getName().fullName + " ");
        sb.append(PREFIX_STARTDATE + this.getStartDate().value + " ");
        sb.append(PREFIX_PRIORITY + this.getPriority().value + " ");
        sb.append(PREFIX_EMAIL + this.getEmail().value + " ");
        this.getTags().asObservableList().stream().forEach(s -> sb.append("t/" + s.tagName + " "));
        return sb.toString();
    }
}

@@ -66,16 +66,54 @@
 agList;%0A
+import seedu.ezdo.model.todo.DueDate;%0A
 import s
@@ -140,16 +140,16 @@
 .Email;%0A
-
 import s
@@ -564,16 +564,71 @@
  = %22s/%22;
+%0A    private static final String PREFIX_DUEDATE = %22d/%22;
 %0A%0A    pr
@@ -673,24 +673,53 @@
  startDate;%0A
+    private DueDate dueDate;%0A
     private 
@@ -1150,24 +1150,72 @@
 tartDate();%0A
+        this.dueDate = taskToCopy.getDueDate();%0A
         this
@@ -1406,32 +1406,121 @@
 startDate;%0A    %7D
+%0A    %0A    public void setDueDate(DueDate dueDate) %7B%0A        this.dueDate = dueDate;%0A    %7D
 %0A%0A    public voi
@@ -2049,32 +2049,115 @@
 startDate;%0A    %7D
+%0A    %0A    @Override%0A    public DueDate getDueDate() %7B%0A        return dueDate;%0A    %7D
 %0A%0A    @Override%0A
@@ -2381,24 +2381,24 @@
 gBuilder();%0A
-
         sb.a
@@ -2436,32 +2436,99 @@
 ullName + %22 %22);%0A
+        sb.append(PREFIX_DUEDATE + this.getDueDate().value + %22 %22);%0A
         sb.appen

Add DueDate object in TestTask; Add dueDate accessor and mutator; Add PREFIX_DUEDATE; Update getAddCommand() with DueDate