Added Tests for TaskState Changes. Actually added functionality to pass that test.
This commit is contained in:
@@ -6,12 +6,14 @@ public class Task {
|
||||
int taskId;
|
||||
int workerId;
|
||||
AssignmentManager manager;
|
||||
TaskState state;
|
||||
public Task(int taskId, int workerId, String name, String description, AssignmentManager manager) {
|
||||
this.manager = manager;
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.taskId = taskId;
|
||||
this.workerId = workerId;
|
||||
this.state = TaskState.IN_PROGRESS;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
@@ -32,5 +34,11 @@ public class Task {
|
||||
public int getWorkerId() {
|
||||
return workerId;
|
||||
}
|
||||
public void setTaskState(TaskState state) {
|
||||
this.state = state;
|
||||
}
|
||||
public TaskState getTaskState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user