package seedu.address.testutil;

import seedu.address.model.tag.UniqueTagList;
import seedu.address.model.task.Description;
import seedu.address.model.task.Email;
import seedu.address.model.task.Priority;
import seedu.address.model.task.ReadOnlyTask;

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


    private Description description;
    private Priority priority;
    private Email date;

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

    /**
     * Creates a copy of {@code TaskToCopy}.
     */
    public TestTask(TestTask TaskToCopy) {
        this.description = TaskToCopy.getDescription();
        this.priority = TaskToCopy.getPriority();
        this.date = TaskToCopy.getDate();
        this.tags = TaskToCopy.getTags();
    }

    public void setDescription(Description description) {
        this.description = description;
    }

    public void setDate(Email date) {
        this.date = date;
    }

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

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

    @Override
    public Description getDescription() {
        return description;
    }

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

    @Override
    public Email getDate() {
        return date;
    }

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

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

    public String getAddCommand() {
        StringBuilder sb = new StringBuilder();
        sb.append("add " + this.getDescription().description + " ");
        sb.append("p/" + this.getPriority().value + " ");
        sb.append("e/" + this.getDate().value + " ");
        this.getTags().asObservableList().stream().forEach(s -> sb.append("t/" + s.tagName + " "));
        return sb.toString();
    }
}

@@ -149,21 +149,24 @@
 el.task.
-Email
+TaskDate
 ;%0Aimport
@@ -349,17 +349,16 @@
 Task %7B%0A%0A
-%0A
     priv
@@ -429,23 +429,61 @@
 private 
-Email d
+TaskDate startDate;%0A    private TaskDate endD
 ate;%0A%0A  
@@ -803,25 +803,80 @@
        this.
-d
+startDate = TaskToCopy.getStartDate();%0A        this.endD
 ate = TaskTo
@@ -879,24 +879,27 @@
 skToCopy.get
+End
 Date();%0A    
@@ -1071,20 +1071,127 @@
  set
-Date(Email d
+StartDate(TaskDate startDate) %7B%0A        this.startDate = startDate;%0A    %7D%0A    %0A    public void setEndDate(TaskDate endD
 ate)
@@ -1210,16 +1210,22 @@
 his.
-d
+endD
 ate = 
-d
+endD
 ate;
@@ -1603,17 +1603,111 @@
 lic 
-Email
+TaskDate getStartDate() %7B%0A        return startDate;%0A    %7D%0A    %0A    @Override%0A    public TaskDate
  get
+End
 Date
@@ -1726,17 +1726,20 @@
  return 
-d
+endD
 ate;%0A   
@@ -1733,33 +1733,37 @@
  endDate;%0A    %7D%0A
+    
 %0A
-
     @Override%0A  
@@ -2135,17 +2135,78 @@
 append(%22
-e
+sd/%22 + this.getStartDate().value + %22 %22);%0A        sb.append(%22ed
 /%22 + thi
@@ -2210,16 +2210,19 @@
 this.get
+End
 Date().v
@@ -2364,16 +2364,17 @@
 ring();%0A
-
     %7D%0A
+%0A
 %7D%0A

Add TestTask.java