Small fix for listing tasks

This commit is contained in:
2026-01-06 20:05:43 +01:00
parent a390509f87
commit 654305f2cd
27 changed files with 175 additions and 160 deletions

View File

@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="hhn.temp.project.BadCasesTest" tests="8" skipped="0" failures="0" errors="0" timestamp="2026-01-06T18:34:44.742Z" hostname="KEVIN-THINKPAD" time="0.026">
<testsuite name="hhn.temp.project.BadCasesTest" tests="8" skipped="0" failures="0" errors="0" timestamp="2026-01-06T19:04:07.051Z" hostname="KEVIN-THINKPAD" time="0.047">
<properties/>
<testcase name="Assert List isn't empty after adding a task" classname="hhn.temp.project.BadCasesTest" time="0.002"/>
<testcase name="Assert non-existent commands are recognized as such" classname="hhn.temp.project.BadCasesTest" time="0.001"/>
<testcase name="Assert that Remove Task is programmed defensively" classname="hhn.temp.project.BadCasesTest" time="0.001"/>
<testcase name="Assert that removing a non-existent worker throws an Exception" classname="hhn.temp.project.BadCasesTest" time="0.002"/>
<testcase name="Assert Add Task is programmed defensively" classname="hhn.temp.project.BadCasesTest" time="0.002"/>
<testcase name="Assert List isn't empty after adding a task" classname="hhn.temp.project.BadCasesTest" time="0.015"/>
<testcase name="Assert non-existent commands are recognized as such" classname="hhn.temp.project.BadCasesTest" time="0.004"/>
<testcase name="Assert that Remove Task is programmed defensively" classname="hhn.temp.project.BadCasesTest" time="0.006"/>
<testcase name="Assert that removing a non-existent worker throws an Exception" classname="hhn.temp.project.BadCasesTest" time="0.001"/>
<testcase name="Assert Add Task is programmed defensively" classname="hhn.temp.project.BadCasesTest" time="0.003"/>
<testcase name="Assert only existing tasks can be edited" classname="hhn.temp.project.BadCasesTest" time="0.003"/>
<testcase name="Assert that un-/finishing a Task only works with valid parameters" classname="hhn.temp.project.BadCasesTest" time="0.003"/>
<testcase name="Assert that added tasks can't be Null" classname="hhn.temp.project.BadCasesTest" time="0.002"/>
<testcase name="Assert that added tasks can't be Null" classname="hhn.temp.project.BadCasesTest" time="0.001"/>
<system-out><![CDATA[Unknown command. Type 'help' for available commands.
]]></system-out>
<system-err><![CDATA[]]></system-err>

View File

@@ -1,30 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="hhn.temp.project.GoodCasesTest" tests="13" skipped="0" failures="1" errors="0" timestamp="2026-01-06T18:34:44.633Z" hostname="KEVIN-THINKPAD" time="0.105">
<testsuite name="hhn.temp.project.GoodCasesTest" tests="13" skipped="0" failures="0" errors="0" timestamp="2026-01-06T19:04:07.158Z" hostname="KEVIN-THINKPAD" time="0.062">
<properties/>
<testcase name="Check Getters" classname="hhn.temp.project.GoodCasesTest" time="0.019"/>
<testcase name="Check that editing is possible through UI" classname="hhn.temp.project.GoodCasesTest" time="0.014"/>
<testcase name="Check that every required surface command actually works" classname="hhn.temp.project.GoodCasesTest" time="0.017"/>
<testcase name="Check Getters" classname="hhn.temp.project.GoodCasesTest" time="0.004"/>
<testcase name="Check that editing is possible through UI" classname="hhn.temp.project.GoodCasesTest" time="0.008"/>
<testcase name="Check that every required surface command actually works" classname="hhn.temp.project.GoodCasesTest" time="0.015"/>
<testcase name="Assert that added Tasks are added to the List" classname="hhn.temp.project.GoodCasesTest" time="0.001"/>
<testcase name="Assert that Worker can remove Task" classname="hhn.temp.project.GoodCasesTest" time="0.001"/>
<testcase name="Check that every task command works" classname="hhn.temp.project.GoodCasesTest" time="0.008"/>
<testcase name="Assert that Worker can remove Task" classname="hhn.temp.project.GoodCasesTest" time="0.0"/>
<testcase name="Check that every task command works" classname="hhn.temp.project.GoodCasesTest" time="0.004"/>
<testcase name="Assert that a Worker can add a Task" classname="hhn.temp.project.GoodCasesTest" time="0.003"/>
<testcase name="Assert that removing Workers is possible through the UI" classname="hhn.temp.project.GoodCasesTest" time="0.005"/>
<testcase name="Assert that removing Workers is possible through the UI" classname="hhn.temp.project.GoodCasesTest" time="0.003"/>
<testcase name="Assert existing Tasks can be edited" classname="hhn.temp.project.GoodCasesTest" time="0.001"/>
<testcase name="Assert that removing a worker removes the worker from the worker list" classname="hhn.temp.project.GoodCasesTest" time="0.012">
<failure message="org.opentest4j.AssertionFailedError: Expected java.lang.IllegalArgumentException to be thrown, but nothing was thrown." type="org.opentest4j.AssertionFailedError">org.opentest4j.AssertionFailedError: Expected java.lang.IllegalArgumentException to be thrown, but nothing was thrown.
at app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:152)
at app//org.junit.jupiter.api.AssertThrows.assertThrows(AssertThrows.java:73)
at app//org.junit.jupiter.api.AssertThrows.assertThrows(AssertThrows.java:35)
at app//org.junit.jupiter.api.Assertions.assertThrows(Assertions.java:3111)
at app//hhn.temp.project.GoodCasesTest.assertRemoveWorkerActuallyRemoves(GoodCasesTest.java:153)
at java.base@17.0.2/java.lang.reflect.Method.invoke(Method.java:568)
at java.base@17.0.2/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.2/java.util.ArrayList.forEach(ArrayList.java:1511)
</failure>
</testcase>
<testcase name="Assert that removing a worker removes the worker from the worker list" classname="hhn.temp.project.GoodCasesTest" time="0.002"/>
<testcase name="Assert that the Scanner is actually started when AM calls start" classname="hhn.temp.project.GoodCasesTest" time="0.001"/>
<testcase name="Assert that Task State is actually changed when submitted as finished" classname="hhn.temp.project.GoodCasesTest" time="0.002"/>
<testcase name="Assert deleted Tasks no longer show up in the List" classname="hhn.temp.project.GoodCasesTest" time="0.001"/>
<testcase name="Assert deleted Tasks no longer show up in the List" classname="hhn.temp.project.GoodCasesTest" time="0.003"/>
<system-out><![CDATA[Enter task ID:
Task 1 (Run) selected
Commands: finish, unfinish, remove, edit, back
@@ -34,13 +23,13 @@ Task edited
General:
help, ? - Show this help
exit - Exit the program
listworkers - List all workers and select one
selecttask - Select a task by ID
createtask - Create a new task
createworker - Create a new worker
listtasks - List all tasks
listunfinished - List unfinished tasks
listfinished - List finished tasks
createtask - Create a new task
selecttask - Select a task to work with
listworkers - List all workers
listtasks - List all tasks with status
listfinished - List only finished tasks
listunfinished - List only unfinished tasks
When a task is selected:
finish - Mark task as finished
@@ -56,13 +45,13 @@ When a worker is selected:
General:
help, ? - Show this help
exit - Exit the program
listworkers - List all workers and select one
selecttask - Select a task by ID
createtask - Create a new task
createworker - Create a new worker
listtasks - List all tasks
listunfinished - List unfinished tasks
listfinished - List finished tasks
createtask - Create a new task
selecttask - Select a task to work with
listworkers - List all workers
listtasks - List all tasks with status
listfinished - List only finished tasks
listunfinished - List only unfinished tasks
When a task is selected:
finish - Mark task as finished
@@ -75,7 +64,7 @@ When a worker is selected:
remove - Remove the worker
back - Return to main menu
Enter worker name:
Created worker with ID: 1
Created worker with ID: 1001
Enter task ID:
Invalid input. Please enter a task ID or 'back':
Invalid input. Please enter a task ID or 'back':
@@ -87,13 +76,13 @@ Task marked as unfinished
Task removed
Unknown command. Type 'help' for available commands.
Unknown command. Type 'help' for available commands.
Available workers:
1: Alfred
2: Balfred
Enter worker ID to select (or 'back'):
Worker 1 (Alfred) selected
Commands: remove, back
Worker removed
1001: Alfred
1002: Balfred
Unknown command. Type 'help' for available commands.
Unknown command. Type 'help' for available commands.
Unknown command. Type 'help' for available commands.
Unknown command. Type 'help' for available commands.
]]></system-out>