Fixed CLI to allow for full testing by using State Machines for everything, test for editing passes now

This commit is contained in:
2026-01-06 19:35:52 +01:00
parent 85446bc230
commit a390509f87
24 changed files with 436 additions and 251 deletions

View File

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