package tars.testutil;

import tars.model.task.*;
import tars.model.tag.UniqueTagList;

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

    private Name name;
    private Address address;
    private Email email;
    private Phone phone;
    private UniqueTagList tags;

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

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

    public void setAddress(Address address) {
        this.address = address;
    }

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

    public void setPhone(Phone phone) {
        this.phone = phone;
    }

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

    @Override
    public Phone getPhone() {
        return phone;
    }

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

    @Override
    public Address getAddress() {
        return address;
    }

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

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

    public String getAddCommand() {
        StringBuilder sb = new StringBuilder();
        sb.append("add " + this.getName().taskName + " ");
        sb.append("p/" + this.getPhone().value + " ");
        sb.append("e/" + this.getEmail().value + " ");
        sb.append("a/" + this.getAddress().value + " ");
        this.getTags().getInternalList().stream().forEach(s -> sb.append("t/" + s.tagName + " "));
        return sb.toString();
    }
}

@@ -315,16 +315,105 @@
 st tags;
+%0A    private DateTime dateTime;%0A    private Status status;%0A    private Priority priority;
 %0A%0A    pu
@@ -1063,32 +1063,276 @@
 n address;%0A    %7D
+%0A    %0A    @Override%0A    public DateTime getDateTime() %7B%0A        return dateTime;%0A    %7D%0A%0A    @Override%0A    public Status getStatus() %7B%0A        return status;%0A    %7D%0A%0A    @Override%0A    public Priority getPriority() %7B%0A        return priority;%0A    %7D
 %0A%0A    @Override%0A

Modify TestTask