package seedu.address.testutil;

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

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

    private Description description;
    private Priority priority;
    private TaskDate startDate;
    private TaskDate endDate;

    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.startDate = taskToCopy.getStartDate();
        this.endDate = taskToCopy.getEndDate();
        this.tags = taskToCopy.getTags();
    }

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

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

    public void setEndDate(TaskDate endDate) {
        this.endDate = endDate;
    }

    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 TaskDate getStartDate() {
        return startDate;
    }

    @Override
    public TaskDate getEndDate() {
        return endDate;
    }

    @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("sd/" + this.getStartDate().value + " ");
        sb.append("ed/" + this.getEndDate().value + " ");
        this.getTags().asObservableList().stream().forEach(s -> sb.append("t/" + s.tagName + " "));
        return sb.toString();
    }

}

@@ -478,16 +478,46 @@
 endDate;
+%0A    private boolean complete;
 %0A%0A    pr
@@ -912,32 +912,81 @@
 y.getEndDate();%0A
+        this.complete = taskToCopy.isComplete();%0A
         this.tag
@@ -1387,24 +1387,117 @@
 ority;%0A    %7D
+%0A    %0A    public void setComplete(boolean complete) %7B%0A        this.complete = complete;%0A    %7D
 %0A%0A    public
@@ -1892,32 +1892,113 @@
 n endDate;%0A    %7D
+%0A %0A    @Override%0A    public boolean isComplete() %7B%0A        return complete;%0A    %7D
 %0A%0A    @Override%0A
@@ -2134,32 +2134,75 @@
 sText();%0A    %7D%0A%0A
+    //TODO add complete instance variable?%0A
     public Strin

include 'complete' instance variable in TestTask.java