Fixed assignment manager to pass some tests, scanner is not yet implemented fully

This commit is contained in:
2025-12-18 19:58:03 +01:00
parent 2af4f4b7a4
commit bb71c7e329
29 changed files with 279 additions and 73 deletions

View File

@@ -1,12 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="hhn.temp.project.BadCasesTest" tests="6" skipped="0" failures="0" errors="0" timestamp="2025-12-03T18:35:34.515Z" hostname="KEVIN-THINKPAD" time="0.067">
<testsuite name="hhn.temp.project.BadCasesTest" tests="8" skipped="0" failures="0" errors="0" timestamp="2025-12-03T20:21:25.805Z" hostname="KEVIN-THINKPAD" time="0.059">
<properties/>
<testcase name="Assert List isn't empty after adding a task" classname="hhn.temp.project.BadCasesTest" time="0.046"/>
<testcase name="Assert List isn't empty after adding a task" classname="hhn.temp.project.BadCasesTest" time="0.034"/>
<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.003"/>
<testcase name="Assert Add Task is programmed defensively" classname="hhn.temp.project.BadCasesTest" time="0.002"/>
<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.003"/>
<testcase name="Assert only existing tasks can be edited" classname="hhn.temp.project.BadCasesTest" time="0.002"/>
<testcase name="Assert that un-/finishing a Task only works with valid parameters" 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.002"/>
<testcase name="Assert that added tasks can't be Null" classname="hhn.temp.project.BadCasesTest" time="0.001"/>
<system-out><![CDATA[]]></system-out>
<system-err><![CDATA[]]></system-err>
</testsuite>

View File

@@ -1,13 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="hhn.temp.project.GoodCasesTest" tests="7" skipped="0" failures="0" errors="0" timestamp="2025-12-03T18:35:34.587Z" hostname="KEVIN-THINKPAD" time="0.013">
<testsuite name="hhn.temp.project.GoodCasesTest" tests="13" skipped="0" failures="2" errors="0" timestamp="2025-12-03T20:21:26.480Z" hostname="KEVIN-THINKPAD" time="0.043">
<properties/>
<testcase name="Check Getters" classname="hhn.temp.project.GoodCasesTest" time="0.003"/>
<testcase name="Check that editing is possible through UI" classname="hhn.temp.project.GoodCasesTest" time="0.005">
<failure message="org.opentest4j.AssertionFailedError: expected: &lt;Walk&gt; but was: &lt;Run&gt;" type="org.opentest4j.AssertionFailedError">org.opentest4j.AssertionFailedError: expected: &lt;Walk&gt; but was: &lt;Run&gt;
at app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
at app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
at app//org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:177)
at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1141)
at app//hhn.temp.project.GoodCasesTest.assertEditingTasksIsPossibleThroughUi(GoodCasesTest.java:133)
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="Check that every required surface command actually works" classname="hhn.temp.project.GoodCasesTest" time="0.003"/>
<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.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.001"/>
<testcase name="Assert existing Tasks can be edited" classname="hhn.temp.project.GoodCasesTest" time="0.0"/>
<testcase name="Assert that removing Workers is possible through the UI" classname="hhn.temp.project.GoodCasesTest" time="0.002"/>
<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.004">
<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 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.0"/>
<testcase name="Assert deleted Tasks no longer show up in the List" classname="hhn.temp.project.GoodCasesTest" time="0.002"/>
<system-out><![CDATA[]]></system-out>
<system-err><![CDATA[]]></system-err>
</testsuite>