Fixed CLI to allow for full testing by using State Machines for everything, test for editing passes now
This commit is contained in:
@@ -49,6 +49,12 @@ public class AssignmentManager {
|
||||
}
|
||||
return taskMap.get(taskId);
|
||||
}
|
||||
public Worker getWorker(int workerId) {
|
||||
if (!workerMap.containsKey(workerId)) {
|
||||
throw new IllegalArgumentException("Worker Id does not exist");
|
||||
}
|
||||
return workerMap.get(workerId);
|
||||
}
|
||||
public void editTask(int workerId, int taskId, String name, String description) {
|
||||
if (!workerMap.containsKey(workerId) || !taskMap.containsKey(taskId)) {
|
||||
throw new IllegalArgumentException("Task Id or Worker Id does not exist");
|
||||
|
||||
Reference in New Issue
Block a user