package seedu.doist.testutil;

import seedu.doist.model.tag.UniqueTagList;
import seedu.doist.model.task.Description;
import seedu.doist.model.task.FinishedStatus;
import seedu.doist.model.task.Priority;
import seedu.doist.model.task.ReadOnlyTask;

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

    private Description desc;
    private Priority priority;
    private FinishedStatus finishedStatus;
    private UniqueTagList tags;

    public TestTask() {
        tags = new UniqueTagList();
        finishedStatus = new FinishedStatus();
        priority = new Priority();
    }

    /**
     * Creates a copy of {@code taskToCopy}.
     */
    public TestTask(TestTask taskToCopy) {
        this.desc = taskToCopy.getDescription();
        this.priority = taskToCopy.getPriority();
        this.finishedStatus = taskToCopy.getFinishedStatus();
        this.tags = taskToCopy.getTags();
    }

    public void setName(Description desc) {
        this.desc = desc;
    }

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

    public void setFinishedStatus(boolean isFinished) {
        this.finishedStatus.setIsFinished(isFinished);
    }

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

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

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

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

    @Override
    public FinishedStatus getFinishedStatus() {
        return finishedStatus;
    }

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

    public String getAddCommand() {
        StringBuilder sb = new StringBuilder();
        sb.append("add " + this.getDescription().desc + " ");
        sb.append("\\as " + this.getPriority().toString());
        if (!this.getTags().isEmpty()) {
            sb.append("\\under");
            this.getTags().asObservableList().stream().forEach(s -> sb.append(" " + s.tagName));
        }
        return sb.toString();
    }
}

@@ -24,16 +24,40 @@
 tutil;%0A%0A
+import java.util.Date;%0A%0A
 import s
@@ -504,16 +504,70 @@
 st tags;
+%0A    private Date startDate;%0A    private Date endDate;
 %0A%0A    pu
@@ -698,24 +698,60 @@
 Priority();%0A
+        startDate = endDate = null;%0A
     %7D%0A%0A    /
@@ -1760,32 +1760,188 @@
 dStatus;%0A    %7D%0A%0A
+    @Override%0A    public Date getStartDate() %7B%0A        return startDate;%0A    %7D%0A%0A    @Override%0A    public Date getEndDate() %7B%0A        return endDate;%0A    %7D%0A%0A
     @Override%0A  

Modify TestTask to implement ReadOnlyTask