package seedu.task.testutil;

import seedu.task.commons.exceptions.IllegalValueException;
import seedu.task.model.tag.UniqueTagList;
import seedu.task.model.task.TaskDate;
import seedu.task.model.task.TaskName;
import seedu.task.model.task.TaskPath;
import seedu.task.model.task.TaskStatus;
import seedu.task.model.task.ReadOnlyTask;
import seedu.task.model.task.TaskTime;

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

    private UniqueTagList tags;
    private TaskName taskName;
    private TaskDate taskDate;
    private TaskTime taskStartTime;
    private TaskTime taskEndTime;
    private String taskDescription;
    private TaskStatus taskStatus;
    private TaskPath taskPath;
    
    public TestTask() {
	tags = new UniqueTagList();
    }

    /**
     * Creates a copy of {@code taskToCopy}.
     */
    public TestTask(TestTask taskToCopy) {
	this.taskName = taskToCopy.getTaskName();
	this.taskDate = taskToCopy.getTaskDate();
	this.taskStartTime = taskToCopy.getTaskStartTime();
	this.taskEndTime = taskToCopy.getTaskEndTime();
	this.taskDescription = taskToCopy.getTaskDescription();
	this.taskStatus = taskToCopy.getTaskStatus();
	this.tags = taskToCopy.getTags();
    }

    @Override
    public TaskName getTaskName() {
	return taskName;
    }

    public void setTaskName(TaskName name) {
	this.taskName = name;
    }

    @Override
    public TaskDate getTaskDate() {
	return taskDate;
    }

    public void setTaskDate(TaskDate taskDate) {
	this.taskDate = taskDate;
    }

    @Override
    public TaskTime getTaskStartTime() {
	return taskStartTime;
    }

    public void setTaskStartTime(TaskTime taskStartTime) {
	this.taskStartTime = taskStartTime;
    }

    @Override
    public TaskTime getTaskEndTime() {
	return taskEndTime;
    }

    public void setTaskEndTime(TaskTime taskEndTime) {
	this.taskEndTime = taskEndTime;
    }

    @Override
    public String getTaskDescription() {
	return taskDescription;
    }

    public void setTaskDescription(String taskDescription) {
	this.taskDescription = taskDescription;
    }

    @Override
    public TaskStatus getTaskStatus() {
	return taskStatus;
    }

    public void setTaskStatus(TaskStatus taskStatus) {
	this.taskStatus = taskStatus;
    }

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

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

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

    public String getAddCommand() {
	StringBuilder sb = new StringBuilder();
	sb.append("add " + this.getTaskName().fullTaskName + " ");
	sb.append("d/" + this.getTaskDate().value + " ");
	sb.append("s/" + this.getTaskStartTime().value + " ");
	sb.append("e/" + this.getTaskEndTime().value + " ");
	sb.append("m/" + this.getTaskDescription() + " ");
	sb.append(this.getTaskStatus() + " ");
	this.getTags().asObservableList().stream().forEach(s -> sb.append("t/" + s.tagName + " "));
	return sb.toString();
    }

    public String getTaskPath() {
	// TODO Auto-generated method stub
	return null;
    }

}
//@@author

@@ -23,16 +23,73 @@
 tutil;%0A%0A
+import java.time.LocalDate;%0Aimport java.time.LocalTime;%0A%0A
 import s
@@ -797,27 +797,67 @@
 ate 
-TaskPath taskPath
+LocalDate localDate
 ;%0A
+    private LocalTime localTime;%0A    %0A
     
@@ -906,24 +906,26 @@
 eTagList();%0A
+%09%0A
     %7D%0A%0A    /
@@ -3220,16 +3220,577 @@
 %0A    %7D%0A%0A
+    public void setCreationTime() %7B%0A    %09localDate = LocalDate.now();%0A    %09localTime = LocalTime.now();%0A    %7D%0A    %0A    public LocalDate getLocalDate() %7B%0A    %09if (localDate == null) %7B%0A    %09%09setCreationTime();%0A    %09%7D%0A    %09return localDate;%0A    %7D%0A%0A    public LocalTime getLocalTime() %7B%0A    %09if (localTime == null) %7B%0A    %09%09setCreationTime();%0A    %09%7D%0A    %09return localTime;%0A    %7D%0A%0A    private void setLocalDate(LocalDate localDate) %7B%0A    %09this.localDate = localDate;%0A    %7D%0A%0A    private void setLocalTime(LocalTime localTime) %7B%0A    %09this.localTime = localTime;%0A    %7D%0A%0A
 %7D%0A//@@au

fix testtask