Added Tests for TaskState Changes. Actually added functionality to pass that test.
This commit is contained in:
@@ -6,31 +6,39 @@ public class Task {
|
||||
int taskId;
|
||||
int workerId;
|
||||
AssignmentManager manager;
|
||||
<span class="fc" id="L9"> public Task(int taskId, int workerId, String name, String description, AssignmentManager manager) {</span>
|
||||
<span class="fc" id="L10"> this.manager = manager;</span>
|
||||
<span class="fc" id="L11"> this.name = name;</span>
|
||||
<span class="fc" id="L12"> this.description = description;</span>
|
||||
<span class="fc" id="L13"> this.taskId = taskId;</span>
|
||||
<span class="fc" id="L14"> this.workerId = workerId;</span>
|
||||
<span class="fc" id="L15"> }</span>
|
||||
TaskState state;
|
||||
<span class="fc" id="L10"> public Task(int taskId, int workerId, String name, String description, AssignmentManager manager) {</span>
|
||||
<span class="fc" id="L11"> this.manager = manager;</span>
|
||||
<span class="fc" id="L12"> this.name = name;</span>
|
||||
<span class="fc" id="L13"> this.description = description;</span>
|
||||
<span class="fc" id="L14"> this.taskId = taskId;</span>
|
||||
<span class="fc" id="L15"> this.workerId = workerId;</span>
|
||||
<span class="fc" id="L16"> this.state = TaskState.IN_PROGRESS;</span>
|
||||
<span class="fc" id="L17"> }</span>
|
||||
|
||||
public String getName() {
|
||||
<span class="fc" id="L18"> return name;</span>
|
||||
<span class="fc" id="L20"> return name;</span>
|
||||
}
|
||||
public void setName(String name) {
|
||||
<span class="fc" id="L21"> this.name = name;</span>
|
||||
<span class="fc" id="L22"> }</span>
|
||||
<span class="fc" id="L23"> this.name = name;</span>
|
||||
<span class="fc" id="L24"> }</span>
|
||||
public String getDescription() {
|
||||
<span class="fc" id="L24"> return description;</span>
|
||||
<span class="fc" id="L26"> return description;</span>
|
||||
}
|
||||
public void setDescription(String description) {
|
||||
<span class="fc" id="L27"> this.description = description;</span>
|
||||
<span class="fc" id="L28"> }</span>
|
||||
<span class="fc" id="L29"> this.description = description;</span>
|
||||
<span class="fc" id="L30"> }</span>
|
||||
public int getTaskId() {
|
||||
<span class="nc" id="L30"> return taskId;</span>
|
||||
<span class="nc" id="L32"> return taskId;</span>
|
||||
}
|
||||
public int getWorkerId() {
|
||||
<span class="nc" id="L33"> return workerId;</span>
|
||||
<span class="nc" id="L35"> return workerId;</span>
|
||||
}
|
||||
public void setTaskState(TaskState state) {
|
||||
<span class="fc" id="L38"> this.state = state;</span>
|
||||
<span class="fc" id="L39"> }</span>
|
||||
public TaskState getTaskState() {
|
||||
<span class="fc" id="L41"> return state;</span>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user