Fixing repository test failure

revert-70aa11f8
Madawa Soysa 7 years ago
parent ca6c9f1ec7
commit fcc6dd1564

@ -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);

Loading…
Cancel
Save