ScannerImplementation #5
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -41,7 +41,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="infoBox" id="duration">
|
<div class="infoBox" id="duration">
|
||||||
<div class="counter">0.096s</div>
|
<div class="counter">0.021s</div>
|
||||||
<p>duration</p>
|
<p>duration</p>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -81,25 +81,25 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="success">Assert Add Task is programmed defensively</td>
|
<td class="success">Assert Add Task is programmed defensively</td>
|
||||||
<td class="success">assertAddTaskOnlyAcceptsValidParameters()</td>
|
<td class="success">assertAddTaskOnlyAcceptsValidParameters()</td>
|
||||||
<td class="success">0.007s</td>
|
<td class="success">0.002s</td>
|
||||||
<td class="success">passed</td>
|
<td class="success">passed</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="success">Assert only existing tasks can be edited</td>
|
<td class="success">Assert only existing tasks can be edited</td>
|
||||||
<td class="success">assertEditOnlyExistingTasks()</td>
|
<td class="success">assertEditOnlyExistingTasks()</td>
|
||||||
<td class="success">0.003s</td>
|
<td class="success">0.004s</td>
|
||||||
<td class="success">passed</td>
|
<td class="success">passed</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="success">Assert non-existent commands are recognized as such</td>
|
<td class="success">Assert non-existent commands are recognized as such</td>
|
||||||
<td class="success">assertInvalidCommandsDontCrash()</td>
|
<td class="success">assertInvalidCommandsDontCrash()</td>
|
||||||
<td class="success">0.015s</td>
|
<td class="success">0.001s</td>
|
||||||
<td class="success">passed</td>
|
<td class="success">passed</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="success">Assert List isn't empty after adding a task</td>
|
<td class="success">Assert List isn't empty after adding a task</td>
|
||||||
<td class="success">assertListNowEmptyAfterAdd()</td>
|
<td class="success">assertListNowEmptyAfterAdd()</td>
|
||||||
<td class="success">0.045s</td>
|
<td class="success">0.004s</td>
|
||||||
<td class="success">passed</td>
|
<td class="success">passed</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -111,13 +111,13 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="success">Assert that Remove Task is programmed defensively</td>
|
<td class="success">Assert that Remove Task is programmed defensively</td>
|
||||||
<td class="success">assertRemoveTaskOnlyAcceptsValidParameters()</td>
|
<td class="success">assertRemoveTaskOnlyAcceptsValidParameters()</td>
|
||||||
<td class="success">0.014s</td>
|
<td class="success">0.002s</td>
|
||||||
<td class="success">passed</td>
|
<td class="success">passed</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="success">Assert that removing a non-existent worker throws an Exception</td>
|
<td class="success">Assert that removing a non-existent worker throws an Exception</td>
|
||||||
<td class="success">assertRemovingNonExistentWorkerFails()</td>
|
<td class="success">assertRemovingNonExistentWorkerFails()</td>
|
||||||
<td class="success">0.006s</td>
|
<td class="success">0.002s</td>
|
||||||
<td class="success">passed</td>
|
<td class="success">passed</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -143,7 +143,7 @@
|
|||||||
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
|
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
|
||||||
</label>
|
</label>
|
||||||
</div>Generated by
|
</div>Generated by
|
||||||
<a href="https://www.gradle.org">Gradle 8.14</a> at 04.01.2026, 16:08:46</p>
|
<a href="https://www.gradle.org">Gradle 8.14</a> at 04.01.2026, 16:32:20</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="infoBox" id="duration">
|
<div class="infoBox" id="duration">
|
||||||
<div class="counter">0.083s</div>
|
<div class="counter">0.051s</div>
|
||||||
<p>duration</p>
|
<p>duration</p>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -121,49 +121,49 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="success">Check that every required surface command actually works</td>
|
<td class="success">Check that every required surface command actually works</td>
|
||||||
<td class="success">assertCommandsAreRecognized()</td>
|
<td class="success">assertCommandsAreRecognized()</td>
|
||||||
<td class="success">0.012s</td>
|
<td class="success">0.004s</td>
|
||||||
<td class="success">passed</td>
|
<td class="success">passed</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="success">Assert deleted Tasks no longer show up in the List</td>
|
<td class="success">Assert deleted Tasks no longer show up in the List</td>
|
||||||
<td class="success">assertDeletedTasksDisappear()</td>
|
<td class="success">assertDeletedTasksDisappear()</td>
|
||||||
<td class="success">0.003s</td>
|
<td class="success">0.001s</td>
|
||||||
<td class="success">passed</td>
|
<td class="success">passed</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="failures">Check that editing is possible through UI</td>
|
<td class="failures">Check that editing is possible through UI</td>
|
||||||
<td class="failures">assertEditingTasksIsPossibleThroughUi()</td>
|
<td class="failures">assertEditingTasksIsPossibleThroughUi()</td>
|
||||||
<td class="failures">0.026s</td>
|
<td class="failures">0.008s</td>
|
||||||
<td class="failures">failed</td>
|
<td class="failures">failed</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="success">Assert existing Tasks can be edited</td>
|
<td class="success">Assert existing Tasks can be edited</td>
|
||||||
<td class="success">assertExistingTasksCanBeEdited()</td>
|
<td class="success">assertExistingTasksCanBeEdited()</td>
|
||||||
<td class="success">0.001s</td>
|
<td class="success">0.003s</td>
|
||||||
<td class="success">passed</td>
|
<td class="success">passed</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="success">Check that every task command works</td>
|
<td class="success">Check that every task command works</td>
|
||||||
<td class="success">assertFinishingTasksIsPossibleThroughUi()</td>
|
<td class="success">assertFinishingTasksIsPossibleThroughUi()</td>
|
||||||
<td class="success">0.006s</td>
|
<td class="success">0.005s</td>
|
||||||
<td class="success">passed</td>
|
<td class="success">passed</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="success">Check Getters</td>
|
<td class="success">Check Getters</td>
|
||||||
<td class="success">assertGettersWorkCorrectly()</td>
|
<td class="success">assertGettersWorkCorrectly()</td>
|
||||||
<td class="success">0.007s</td>
|
<td class="success">0.014s</td>
|
||||||
<td class="success">passed</td>
|
<td class="success">passed</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="failures">Assert that removing a worker removes the worker from the worker list</td>
|
<td class="failures">Assert that removing a worker removes the worker from the worker list</td>
|
||||||
<td class="failures">assertRemoveWorkerActuallyRemoves()</td>
|
<td class="failures">assertRemoveWorkerActuallyRemoves()</td>
|
||||||
<td class="failures">0.003s</td>
|
<td class="failures">0.005s</td>
|
||||||
<td class="failures">failed</td>
|
<td class="failures">failed</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="success">Assert that removing Workers is possible through the UI</td>
|
<td class="success">Assert that removing Workers is possible through the UI</td>
|
||||||
<td class="success">assertRemovingWorkersIsPossibleThroughUI()</td>
|
<td class="success">assertRemovingWorkersIsPossibleThroughUI()</td>
|
||||||
<td class="success">0.005s</td>
|
<td class="success">0.002s</td>
|
||||||
<td class="success">passed</td>
|
<td class="success">passed</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -175,25 +175,25 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="success">Assert that Task State is actually changed when submitted as finished</td>
|
<td class="success">Assert that Task State is actually changed when submitted as finished</td>
|
||||||
<td class="success">assertTaskStateChanges()</td>
|
<td class="success">assertTaskStateChanges()</td>
|
||||||
<td class="success">0.011s</td>
|
<td class="success">0.004s</td>
|
||||||
<td class="success">passed</td>
|
<td class="success">passed</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="success">Assert that added Tasks are added to the List</td>
|
<td class="success">Assert that added Tasks are added to the List</td>
|
||||||
<td class="success">assertTasksShowInList()</td>
|
<td class="success">assertTasksShowInList()</td>
|
||||||
<td class="success">0.002s</td>
|
<td class="success">0.001s</td>
|
||||||
<td class="success">passed</td>
|
<td class="success">passed</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="success">Assert that a Worker can add a Task</td>
|
<td class="success">Assert that a Worker can add a Task</td>
|
||||||
<td class="success">assertWorkerCanAddTask()</td>
|
<td class="success">assertWorkerCanAddTask()</td>
|
||||||
<td class="success">0.003s</td>
|
<td class="success">0.001s</td>
|
||||||
<td class="success">passed</td>
|
<td class="success">passed</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="success">Assert that Worker can remove Task</td>
|
<td class="success">Assert that Worker can remove Task</td>
|
||||||
<td class="success">assertWorkerCanRemoveOwnTask()</td>
|
<td class="success">assertWorkerCanRemoveOwnTask()</td>
|
||||||
<td class="success">0.002s</td>
|
<td class="success">0.001s</td>
|
||||||
<td class="success">passed</td>
|
<td class="success">passed</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -244,7 +244,7 @@ Unknown command. Type 'help' for available commands.
|
|||||||
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
|
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
|
||||||
</label>
|
</label>
|
||||||
</div>Generated by
|
</div>Generated by
|
||||||
<a href="https://www.gradle.org">Gradle 8.14</a> at 04.01.2026, 16:08:46</p>
|
<a href="https://www.gradle.org">Gradle 8.14</a> at 04.01.2026, 16:32:20</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="infoBox" id="duration">
|
<div class="infoBox" id="duration">
|
||||||
<div class="counter">0.911s</div>
|
<div class="counter">1.810s</div>
|
||||||
<p>duration</p>
|
<p>duration</p>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
<td>25</td>
|
<td>25</td>
|
||||||
<td>5</td>
|
<td>5</td>
|
||||||
<td>0</td>
|
<td>0</td>
|
||||||
<td>0.911s</td>
|
<td>1.810s</td>
|
||||||
<td class="failures">80%</td>
|
<td class="failures">80%</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
<td>8</td>
|
<td>8</td>
|
||||||
<td>0</td>
|
<td>0</td>
|
||||||
<td>0</td>
|
<td>0</td>
|
||||||
<td>0.096s</td>
|
<td>0.021s</td>
|
||||||
<td class="success">100%</td>
|
<td class="success">100%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -150,7 +150,7 @@
|
|||||||
<td>1</td>
|
<td>1</td>
|
||||||
<td>0</td>
|
<td>0</td>
|
||||||
<td>0</td>
|
<td>0</td>
|
||||||
<td>0.037s</td>
|
<td>0.027s</td>
|
||||||
<td class="success">100%</td>
|
<td class="success">100%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
<td>3</td>
|
<td>3</td>
|
||||||
<td>3</td>
|
<td>3</td>
|
||||||
<td>0</td>
|
<td>0</td>
|
||||||
<td>0.695s</td>
|
<td>1.711s</td>
|
||||||
<td class="failures">0%</td>
|
<td class="failures">0%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -170,7 +170,7 @@
|
|||||||
<td>13</td>
|
<td>13</td>
|
||||||
<td>2</td>
|
<td>2</td>
|
||||||
<td>0</td>
|
<td>0</td>
|
||||||
<td>0.083s</td>
|
<td>0.051s</td>
|
||||||
<td class="failures">84%</td>
|
<td class="failures">84%</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -184,7 +184,7 @@
|
|||||||
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
|
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
|
||||||
</label>
|
</label>
|
||||||
</div>Generated by
|
</div>Generated by
|
||||||
<a href="https://www.gradle.org">Gradle 8.14</a> at 04.01.2026, 16:08:46</p>
|
<a href="https://www.gradle.org">Gradle 8.14</a> at 04.01.2026, 16:32:20</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="infoBox" id="duration">
|
<div class="infoBox" id="duration">
|
||||||
<div class="counter">0.911s</div>
|
<div class="counter">1.810s</div>
|
||||||
<p>duration</p>
|
<p>duration</p>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
<td>8</td>
|
<td>8</td>
|
||||||
<td>0</td>
|
<td>0</td>
|
||||||
<td>0</td>
|
<td>0</td>
|
||||||
<td>0.096s</td>
|
<td>0.021s</td>
|
||||||
<td class="success">100%</td>
|
<td class="success">100%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
<td>1</td>
|
<td>1</td>
|
||||||
<td>0</td>
|
<td>0</td>
|
||||||
<td>0</td>
|
<td>0</td>
|
||||||
<td>0.037s</td>
|
<td>0.027s</td>
|
||||||
<td class="success">100%</td>
|
<td class="success">100%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
<td>3</td>
|
<td>3</td>
|
||||||
<td>3</td>
|
<td>3</td>
|
||||||
<td>0</td>
|
<td>0</td>
|
||||||
<td>0.695s</td>
|
<td>1.711s</td>
|
||||||
<td class="failures">0%</td>
|
<td class="failures">0%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -141,7 +141,7 @@
|
|||||||
<td>13</td>
|
<td>13</td>
|
||||||
<td>2</td>
|
<td>2</td>
|
||||||
<td>0</td>
|
<td>0</td>
|
||||||
<td>0.083s</td>
|
<td>0.051s</td>
|
||||||
<td class="failures">84%</td>
|
<td class="failures">84%</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -154,7 +154,7 @@
|
|||||||
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
|
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
|
||||||
</label>
|
</label>
|
||||||
</div>Generated by
|
</div>Generated by
|
||||||
<a href="https://www.gradle.org">Gradle 8.14</a> at 04.01.2026, 16:08:46</p>
|
<a href="https://www.gradle.org">Gradle 8.14</a> at 04.01.2026, 16:32:20</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<testsuite name="hhn.temp.project.BadCasesTest" tests="8" skipped="0" failures="0" errors="0" timestamp="2026-01-04T15:08:44.985Z" hostname="KEVIN-THINKPAD" time="0.121">
|
<testsuite name="hhn.temp.project.BadCasesTest" tests="8" skipped="0" failures="0" errors="0" timestamp="2026-01-04T15:32:20.146Z" hostname="KEVIN-THINKPAD" time="0.035">
|
||||||
<properties/>
|
<properties/>
|
||||||
<testcase name="Assert List isn't empty after adding a task" classname="hhn.temp.project.BadCasesTest" time="0.045"/>
|
<testcase name="Assert List isn't empty after adding a task" classname="hhn.temp.project.BadCasesTest" time="0.004"/>
|
||||||
<testcase name="Assert non-existent commands are recognized as such" 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.001"/>
|
||||||
<testcase name="Assert that Remove Task is programmed defensively" classname="hhn.temp.project.BadCasesTest" time="0.014"/>
|
<testcase name="Assert that Remove 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.006"/>
|
<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.007"/>
|
<testcase name="Assert Add Task is programmed defensively" classname="hhn.temp.project.BadCasesTest" time="0.002"/>
|
||||||
<testcase name="Assert only existing tasks can be edited" classname="hhn.temp.project.BadCasesTest" time="0.003"/>
|
<testcase name="Assert only existing tasks can be edited" classname="hhn.temp.project.BadCasesTest" time="0.004"/>
|
||||||
<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 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.003"/>
|
<testcase name="Assert that added tasks can't be Null" classname="hhn.temp.project.BadCasesTest" time="0.003"/>
|
||||||
<system-out><![CDATA[Unknown command. Type 'help' for available commands.
|
<system-out><![CDATA[Unknown command. Type 'help' for available commands.
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<testsuite name="hhn.temp.project.GoodCasesTest" tests="13" skipped="0" failures="2" errors="0" timestamp="2026-01-04T15:08:45.821Z" hostname="KEVIN-THINKPAD" time="0.107">
|
<testsuite name="hhn.temp.project.GoodCasesTest" tests="13" skipped="0" failures="2" errors="0" timestamp="2026-01-04T15:32:20.071Z" hostname="KEVIN-THINKPAD" time="0.067">
|
||||||
<properties/>
|
<properties/>
|
||||||
<testcase name="Check Getters" classname="hhn.temp.project.GoodCasesTest" time="0.007"/>
|
<testcase name="Check Getters" classname="hhn.temp.project.GoodCasesTest" time="0.014"/>
|
||||||
<testcase name="Check that editing is possible through UI" classname="hhn.temp.project.GoodCasesTest" time="0.026">
|
<testcase name="Check that editing is possible through UI" classname="hhn.temp.project.GoodCasesTest" time="0.008">
|
||||||
<failure message="org.opentest4j.AssertionFailedError: expected: <Walk> but was: <Run>" type="org.opentest4j.AssertionFailedError">org.opentest4j.AssertionFailedError: expected: <Walk> but was: <Run>
|
<failure message="org.opentest4j.AssertionFailedError: expected: <Walk> but was: <Run>" type="org.opentest4j.AssertionFailedError">org.opentest4j.AssertionFailedError: expected: <Walk> but was: <Run>
|
||||||
at app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
|
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.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
|
||||||
@@ -16,14 +16,14 @@
|
|||||||
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>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase name="Check that every required surface command actually works" classname="hhn.temp.project.GoodCasesTest" time="0.012"/>
|
<testcase name="Check that every required surface command actually works" classname="hhn.temp.project.GoodCasesTest" time="0.004"/>
|
||||||
<testcase name="Assert that added Tasks are added to the List" classname="hhn.temp.project.GoodCasesTest" time="0.002"/>
|
<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.002"/>
|
<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.006"/>
|
<testcase name="Check that every task command works" classname="hhn.temp.project.GoodCasesTest" time="0.005"/>
|
||||||
<testcase name="Assert that a Worker can add a Task" classname="hhn.temp.project.GoodCasesTest" time="0.003"/>
|
<testcase name="Assert that a Worker can add a Task" classname="hhn.temp.project.GoodCasesTest" time="0.001"/>
|
||||||
<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.002"/>
|
||||||
<testcase name="Assert existing Tasks can be edited" classname="hhn.temp.project.GoodCasesTest" time="0.001"/>
|
<testcase name="Assert existing Tasks can be edited" classname="hhn.temp.project.GoodCasesTest" time="0.003"/>
|
||||||
<testcase name="Assert that removing a worker removes the worker from the worker list" classname="hhn.temp.project.GoodCasesTest" time="0.003">
|
<testcase name="Assert that removing a worker removes the worker from the worker list" classname="hhn.temp.project.GoodCasesTest" time="0.005">
|
||||||
<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.
|
<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.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:73)
|
||||||
@@ -36,8 +36,8 @@
|
|||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase name="Assert that the Scanner is actually started when AM calls start" 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.002"/>
|
||||||
<testcase name="Assert that Task State is actually changed when submitted as finished" classname="hhn.temp.project.GoodCasesTest" time="0.011"/>
|
<testcase name="Assert that Task State is actually changed when submitted as finished" classname="hhn.temp.project.GoodCasesTest" time="0.004"/>
|
||||||
<testcase name="Assert deleted Tasks no longer show up in the List" classname="hhn.temp.project.GoodCasesTest" time="0.003"/>
|
<testcase name="Assert deleted Tasks no longer show up in the List" classname="hhn.temp.project.GoodCasesTest" time="0.001"/>
|
||||||
<system-out><![CDATA[Enter task ID: Error: Cannot invoke "java.util.Scanner.nextLine()" because "this.scanner" is null
|
<system-out><![CDATA[Enter task ID: Error: Cannot invoke "java.util.Scanner.nextLine()" because "this.scanner" is null
|
||||||
Enter new name;description: Error: Cannot invoke "java.util.Scanner.nextLine()" because "this.scanner" is null
|
Enter new name;description: Error: Cannot invoke "java.util.Scanner.nextLine()" because "this.scanner" is null
|
||||||
Unknown command. Type 'help' for available commands.
|
Unknown command. Type 'help' for available commands.
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -6,11 +6,11 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class AssignmentManager {
|
public class AssignmentManager {
|
||||||
Map<Integer, Worker> workerMap;
|
private Map<Integer, Worker> workerMap;
|
||||||
Map<Integer, Task> taskMap;
|
private Map<Integer, Task> taskMap;
|
||||||
int workerIdCounter;
|
private int workerIdCounter;
|
||||||
int taskIdCounter;
|
private int taskIdCounter;
|
||||||
UserCommands userInterface;
|
private UserCommands userInterface;
|
||||||
|
|
||||||
public AssignmentManager() {
|
public AssignmentManager() {
|
||||||
workerMap = new HashMap<>();
|
workerMap = new HashMap<>();
|
||||||
@@ -19,6 +19,10 @@ public class AssignmentManager {
|
|||||||
int taskIdCounter = 0;
|
int taskIdCounter = 0;
|
||||||
userInterface = new UserCommands(this);
|
userInterface = new UserCommands(this);
|
||||||
}
|
}
|
||||||
|
public Map<Integer, Task> getTaskMap() {
|
||||||
|
return taskMap;
|
||||||
|
}
|
||||||
|
public Map<Integer, Worker> getWorkerMap() {return workerMap;}
|
||||||
|
|
||||||
public int createWorker(String name) {
|
public int createWorker(String name) {
|
||||||
Worker worker = new Worker(name, ++workerIdCounter);
|
Worker worker = new Worker(name, ++workerIdCounter);
|
||||||
@@ -45,9 +49,6 @@ public class AssignmentManager {
|
|||||||
}
|
}
|
||||||
return taskMap.get(taskId);
|
return taskMap.get(taskId);
|
||||||
}
|
}
|
||||||
public Map<Integer, Task> getTaskMap() {
|
|
||||||
return taskMap;
|
|
||||||
}
|
|
||||||
public void editTask(int workerId, int taskId, String name, String description) {
|
public void editTask(int workerId, int taskId, String name, String description) {
|
||||||
if (!workerMap.containsKey(workerId) || !taskMap.containsKey(taskId)) {
|
if (!workerMap.containsKey(workerId) || !taskMap.containsKey(taskId)) {
|
||||||
throw new IllegalArgumentException("Task Id or Worker Id does not exist");
|
throw new IllegalArgumentException("Task Id or Worker Id does not exist");
|
||||||
@@ -79,6 +80,7 @@ public class AssignmentManager {
|
|||||||
public UserCommands getUserCommands() {
|
public UserCommands getUserCommands() {
|
||||||
return userInterface;
|
return userInterface;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startCLI() {
|
public void startCLI() {
|
||||||
userInterface.start();
|
userInterface.start();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package hhn.temp.project;
|
package hhn.temp.project;
|
||||||
|
|
||||||
public class Task {
|
public class Task {
|
||||||
String name;
|
private String name;
|
||||||
String description;
|
private String description;
|
||||||
int taskId;
|
private int taskId;
|
||||||
int workerId;
|
private int workerId;
|
||||||
TaskState state;
|
private TaskState state;
|
||||||
public Task(int taskId, int workerId, String name, String description) {
|
public Task(int taskId, int workerId, String name, String description) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.description = description;
|
this.description = description;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package hhn.temp.project;
|
package hhn.temp.project;
|
||||||
|
|
||||||
public class Worker {
|
public class Worker {
|
||||||
String name;
|
private String name;
|
||||||
int workerId;
|
private int workerId;
|
||||||
public Worker(String name, int workerId) {
|
public Worker(String name, int workerId) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.workerId = workerId;
|
this.workerId = workerId;
|
||||||
|
|||||||
@@ -69,9 +69,9 @@ public class GoodCasesTest {
|
|||||||
public void assertGettersWorkCorrectly() {
|
public void assertGettersWorkCorrectly() {
|
||||||
int workerId = manager.createWorker("Alfred");
|
int workerId = manager.createWorker("Alfred");
|
||||||
int taskId = manager.addTask(workerId, "Run", "Jog 10 Miles");
|
int taskId = manager.addTask(workerId, "Run", "Jog 10 Miles");
|
||||||
assertEquals("Alfred", manager.workerMap.get(workerId).getName());
|
assertEquals("Alfred", manager.getWorkerMap().get(workerId).getName());
|
||||||
//This one may be somewhat nonsensical, but it ensures the getId works so one may iterate over the workerMap
|
//This one may be somewhat nonsensical, but it ensures the getId works so one may iterate over the workerMap
|
||||||
assertEquals(manager.workerMap.get(workerId).getId(), workerId);
|
assertEquals(manager.getWorkerMap().get(workerId).getId(), workerId);
|
||||||
assertEquals(manager.getTask(taskId).getTaskId(), taskId);
|
assertEquals(manager.getTask(taskId).getTaskId(), taskId);
|
||||||
assertEquals(manager.getTask(taskId).getWorkerId(), workerId);
|
assertEquals(manager.getTask(taskId).getWorkerId(), workerId);
|
||||||
|
|
||||||
@@ -150,6 +150,6 @@ public class GoodCasesTest {
|
|||||||
public void assertRemoveWorkerActuallyRemoves() {
|
public void assertRemoveWorkerActuallyRemoves() {
|
||||||
int workerId = manager.createWorker("Alfred");
|
int workerId = manager.createWorker("Alfred");
|
||||||
manager.removeWorker(workerId);
|
manager.removeWorker(workerId);
|
||||||
assertThrows(IllegalArgumentException.class, () -> manager.workerMap.containsKey(workerId));
|
assertThrows(IllegalArgumentException.class, () -> manager.getWorkerMap().containsKey(workerId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user