|
|
@ -31,9 +31,6 @@ public class TestTaskManagerImpl implements TaskManager {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean deleteTask(String taskName) throws TaskException {
|
|
|
|
public boolean deleteTask(String taskName) throws TaskException {
|
|
|
|
if(this.registeredTasks.size() <= 0) {
|
|
|
|
|
|
|
|
throw new TaskException("Cannot delete task.", TaskException.Code.NO_TASK_EXISTS);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (TaskInfo task : this.registeredTasks) {
|
|
|
|
for (TaskInfo task : this.registeredTasks) {
|
|
|
|
if (task.getName().contains(taskName)) {
|
|
|
|
if (task.getName().contains(taskName)) {
|
|
|
|
this.registeredTasks.remove(task);
|
|
|
|
this.registeredTasks.remove(task);
|
|
|
|