Fixed assignment manager to pass some tests, scanner is not yet implemented fully
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2
.idea/gradle.xml
generated
2
.idea/gradle.xml
generated
@@ -5,6 +5,8 @@
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleHome" value="C:\Gradle\gradle-9.0.0" />
|
||||
<option name="gradleJvm" value="17" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
|
||||
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -4,7 +4,7 @@
|
||||
<component name="FrameworkDetectionExcludesConfiguration">
|
||||
<file type="web" url="file://$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="homebrew-17" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
8
.idea/modules.xml
generated
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/Template.test.iml" filepath="$PROJECT_DIR$/.idea/modules/Template.test.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -650,7 +650,7 @@ code + .copy-button {
|
||||
<script type="text/javascript">
|
||||
function configurationCacheProblems() { return (
|
||||
// begin-report-data
|
||||
{"diagnostics":[{"locations":[{}],"problem":[{"text":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This is scheduled to be removed in Gradle 10.0."}],"contextualLabel":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated.","documentationLink":"https://docs.gradle.org/8.14/userguide/upgrading_version_8.html#groovy_space_assignment_syntax","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"properties-should-be-assigned-using-the-propname-value-syntax-setting-a-property-via-the-gradle-generated-propname-value-or-propname-value-syntax-in-groovy-dsl","displayName":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated."}],"solutions":[[{"text":"Use assignment ('exceptionFormat = <value>') instead."}]]}],"problemsReport":{"totalProblemCount":1,"buildName":"Template","requestedTasks":"","documentationLink":"https://docs.gradle.org/8.14/userguide/reporting_problems.html","documentationLinkCaption":"Problem report","summaries":[]}}
|
||||
{"diagnostics":[{"locations":[{}],"problem":[{"text":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This is scheduled to be removed in Gradle 10.0."}],"contextualLabel":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated.","documentationLink":"https://docs.gradle.org/8.14/userguide/upgrading_version_8.html#groovy_space_assignment_syntax","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"properties-should-be-assigned-using-the-propname-value-syntax-setting-a-property-via-the-gradle-generated-propname-value-or-propname-value-syntax-in-groovy-dsl","displayName":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated."}],"solutions":[[{"text":"Use assignment ('exceptionFormat = <value>') instead."}]]}],"problemsReport":{"totalProblemCount":1,"buildName":"Template","requestedTasks":"test","documentationLink":"https://docs.gradle.org/8.14/userguide/reporting_problems.html","documentationLinkCaption":"Problem report","summaries":[]}}
|
||||
// end-report-data
|
||||
);}
|
||||
</script>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<div class="infoBox" id="tests">
|
||||
<div class="counter">6</div>
|
||||
<div class="counter">8</div>
|
||||
<p>tests</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -41,7 +41,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<div class="infoBox" id="duration">
|
||||
<div class="counter">0.057s</div>
|
||||
<div class="counter">0.048s</div>
|
||||
<p>duration</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -78,7 +78,7 @@
|
||||
<tr>
|
||||
<td class="success">Assert Add Task is programmed defensively</td>
|
||||
<td class="success">assertAddTaskOnlyAcceptsValidParameters()</td>
|
||||
<td class="success">0.002s</td>
|
||||
<td class="success">0.003s</td>
|
||||
<td class="success">passed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -88,15 +88,21 @@
|
||||
<td class="success">passed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="success">Assert non-existent commands are recognized as such</td>
|
||||
<td class="success">assertInvalidCommandsDontCrash()</td>
|
||||
<td class="success">0.001s</td>
|
||||
<td class="success">passed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="success">Assert List isn't empty after adding a task</td>
|
||||
<td class="success">assertListNowEmptyAfterAdd()</td>
|
||||
<td class="success">0.046s</td>
|
||||
<td class="success">0.034s</td>
|
||||
<td class="success">passed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="success">Assert that added tasks can't be Null</td>
|
||||
<td class="success">assertNewTasksAreNotNull()</td>
|
||||
<td class="success">0.002s</td>
|
||||
<td class="success">0.001s</td>
|
||||
<td class="success">passed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -106,6 +112,12 @@
|
||||
<td class="success">passed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="success">Assert that removing a non-existent worker throws an Exception</td>
|
||||
<td class="success">assertRemovingNonExistentWorkerFails()</td>
|
||||
<td class="success">0.002s</td>
|
||||
<td class="success">passed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="success">Assert that un-/finishing a Task only works with valid parameters</td>
|
||||
<td class="success">assertTaskStateChangesOnlyAcceptsValidParameters()</td>
|
||||
<td class="success">0.002s</td>
|
||||
@@ -121,7 +133,7 @@
|
||||
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
|
||||
</label>
|
||||
</div>Generated by
|
||||
<a href="https://www.gradle.org">Gradle 8.14</a> at 03.12.2025, 19:35:34</p>
|
||||
<a href="https://www.gradle.org">Gradle 8.14</a> at 03.12.2025, 21:21:26</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -23,13 +23,13 @@
|
||||
<tr>
|
||||
<td>
|
||||
<div class="infoBox" id="tests">
|
||||
<div class="counter">7</div>
|
||||
<div class="counter">13</div>
|
||||
<p>tests</p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="infoBox" id="failures">
|
||||
<div class="counter">0</div>
|
||||
<div class="counter">2</div>
|
||||
<p>failures</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -41,7 +41,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<div class="infoBox" id="duration">
|
||||
<div class="counter">0.007s</div>
|
||||
<div class="counter">0.029s</div>
|
||||
<p>duration</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -50,8 +50,8 @@
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="infoBox success" id="successRate">
|
||||
<div class="percent">100%</div>
|
||||
<div class="infoBox failures" id="successRate">
|
||||
<div class="percent">84%</div>
|
||||
<p>successful</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -61,10 +61,50 @@
|
||||
<div class="tab-container">
|
||||
<ul class="tabLinks">
|
||||
<li>
|
||||
<a href="#">Failed tests</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">Tests</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab">
|
||||
<h2>Failed tests</h2>
|
||||
<div class="test">
|
||||
<a name="assertEditingTasksIsPossibleThroughUi()"></a>
|
||||
<h3 class="failures">Check that editing is possible through UI</h3>
|
||||
<span class="code">
|
||||
<pre>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.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)
|
||||
</pre>
|
||||
</span>
|
||||
</div>
|
||||
<div class="test">
|
||||
<a name="assertRemoveWorkerActuallyRemoves()"></a>
|
||||
<h3 class="failures">Assert that removing a worker removes the worker from the worker list</h3>
|
||||
<span class="code">
|
||||
<pre>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)
|
||||
</pre>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab">
|
||||
<h2>Tests</h2>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -76,15 +116,33 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td class="success">Check that every required surface command actually works</td>
|
||||
<td class="success">assertCommandsAreRecognized()</td>
|
||||
<td class="success">0.003s</td>
|
||||
<td class="success">passed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="success">Assert deleted Tasks no longer show up in the List</td>
|
||||
<td class="success">assertDeletedTasksDisappear()</td>
|
||||
<td class="success">0s</td>
|
||||
<td class="success">0.002s</td>
|
||||
<td class="success">passed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="failures">Check that editing is possible through UI</td>
|
||||
<td class="failures">assertEditingTasksIsPossibleThroughUi()</td>
|
||||
<td class="failures">0.005s</td>
|
||||
<td class="failures">failed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="success">Assert existing Tasks can be edited</td>
|
||||
<td class="success">assertExistingTasksCanBeEdited()</td>
|
||||
<td class="success">0s</td>
|
||||
<td class="success">0.001s</td>
|
||||
<td class="success">passed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="success">Check that every task command works</td>
|
||||
<td class="success">assertFinishingTasksIsPossibleThroughUi()</td>
|
||||
<td class="success">0.004s</td>
|
||||
<td class="success">passed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -94,6 +152,24 @@
|
||||
<td class="success">passed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="failures">Assert that removing a worker removes the worker from the worker list</td>
|
||||
<td class="failures">assertRemoveWorkerActuallyRemoves()</td>
|
||||
<td class="failures">0.004s</td>
|
||||
<td class="failures">failed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="success">Assert that removing Workers is possible through the UI</td>
|
||||
<td class="success">assertRemovingWorkersIsPossibleThroughUI()</td>
|
||||
<td class="success">0.002s</td>
|
||||
<td class="success">passed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="success">Assert that the Scanner is actually started when AM calls start</td>
|
||||
<td class="success">assertScannerExists()</td>
|
||||
<td class="success">0.001s</td>
|
||||
<td class="success">passed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="success">Assert that Task State is actually changed when submitted as finished</td>
|
||||
<td class="success">assertTaskStateChanges()</td>
|
||||
<td class="success">0.002s</td>
|
||||
@@ -127,7 +203,7 @@
|
||||
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
|
||||
</label>
|
||||
</div>Generated by
|
||||
<a href="https://www.gradle.org">Gradle 8.14</a> at 03.12.2025, 19:35:34</p>
|
||||
<a href="https://www.gradle.org">Gradle 8.14</a> at 03.12.2025, 21:21:26</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
<tr>
|
||||
<td>
|
||||
<div class="infoBox" id="tests">
|
||||
<div class="counter">13</div>
|
||||
<div class="counter">25</div>
|
||||
<p>tests</p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="infoBox" id="failures">
|
||||
<div class="counter">0</div>
|
||||
<div class="counter">3</div>
|
||||
<p>failures</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -38,7 +38,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<div class="infoBox" id="duration">
|
||||
<div class="counter">0.064s</div>
|
||||
<div class="counter">0.890s</div>
|
||||
<p>duration</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -47,8 +47,8 @@
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="infoBox success" id="successRate">
|
||||
<div class="percent">100%</div>
|
||||
<div class="infoBox failures" id="successRate">
|
||||
<div class="percent">88%</div>
|
||||
<p>successful</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -58,6 +58,9 @@
|
||||
<div class="tab-container">
|
||||
<ul class="tabLinks">
|
||||
<li>
|
||||
<a href="#">Failed tests</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">Packages</a>
|
||||
</li>
|
||||
<li>
|
||||
@@ -65,6 +68,23 @@
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab">
|
||||
<h2>Failed tests</h2>
|
||||
<ul class="linkList">
|
||||
<li>
|
||||
<a href="classes/hhn.temp.project.DatabaseBadCasesTest.html">DatabaseBadCasesTest</a>.
|
||||
<a href="classes/hhn.temp.project.DatabaseBadCasesTest.html#assertConnectionFailed()">Assert connection failed</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="classes/hhn.temp.project.GoodCasesTest.html">GoodCasesTest</a>.
|
||||
<a href="classes/hhn.temp.project.GoodCasesTest.html#assertEditingTasksIsPossibleThroughUi()">Check that editing is possible through UI</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="classes/hhn.temp.project.GoodCasesTest.html">GoodCasesTest</a>.
|
||||
<a href="classes/hhn.temp.project.GoodCasesTest.html#assertRemoveWorkerActuallyRemoves()">Assert that removing a worker removes the worker from the worker list</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tab">
|
||||
<h2>Packages</h2>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -79,14 +99,14 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="success">
|
||||
<td class="failures">
|
||||
<a href="packages/hhn.temp.project.html">hhn.temp.project</a>
|
||||
</td>
|
||||
<td>13</td>
|
||||
<td>25</td>
|
||||
<td>3</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0.064s</td>
|
||||
<td class="success">100%</td>
|
||||
<td>0.890s</td>
|
||||
<td class="failures">88%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -109,21 +129,41 @@
|
||||
<td class="success">
|
||||
<a href="classes/hhn.temp.project.BadCasesTest.html">hhn.temp.project.BadCasesTest</a>
|
||||
</td>
|
||||
<td>6</td>
|
||||
<td>8</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0.057s</td>
|
||||
<td>0.048s</td>
|
||||
<td class="success">100%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="failures">
|
||||
<a href="classes/hhn.temp.project.DatabaseBadCasesTest.html">hhn.temp.project.DatabaseBadCasesTest</a>
|
||||
</td>
|
||||
<td>1</td>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
<td>0.608s</td>
|
||||
<td class="failures">0%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="success">
|
||||
<a href="classes/hhn.temp.project.DatabaseGoodCasesTest.html">hhn.temp.project.DatabaseGoodCasesTest</a>
|
||||
</td>
|
||||
<td>3</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0.205s</td>
|
||||
<td class="success">100%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="failures">
|
||||
<a href="classes/hhn.temp.project.GoodCasesTest.html">hhn.temp.project.GoodCasesTest</a>
|
||||
</td>
|
||||
<td>7</td>
|
||||
<td>13</td>
|
||||
<td>2</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0.007s</td>
|
||||
<td class="success">100%</td>
|
||||
<td>0.029s</td>
|
||||
<td class="failures">84%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -136,7 +176,7 @@
|
||||
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
|
||||
</label>
|
||||
</div>Generated by
|
||||
<a href="https://www.gradle.org">Gradle 8.14</a> at 03.12.2025, 19:35:34</p>
|
||||
<a href="https://www.gradle.org">Gradle 8.14</a> at 03.12.2025, 21:21:26</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
<tr>
|
||||
<td>
|
||||
<div class="infoBox" id="tests">
|
||||
<div class="counter">13</div>
|
||||
<div class="counter">25</div>
|
||||
<p>tests</p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="infoBox" id="failures">
|
||||
<div class="counter">0</div>
|
||||
<div class="counter">3</div>
|
||||
<p>failures</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -40,7 +40,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<div class="infoBox" id="duration">
|
||||
<div class="counter">0.064s</div>
|
||||
<div class="counter">0.890s</div>
|
||||
<p>duration</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -49,8 +49,8 @@
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="infoBox success" id="successRate">
|
||||
<div class="percent">100%</div>
|
||||
<div class="infoBox failures" id="successRate">
|
||||
<div class="percent">88%</div>
|
||||
<p>successful</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -60,10 +60,30 @@
|
||||
<div class="tab-container">
|
||||
<ul class="tabLinks">
|
||||
<li>
|
||||
<a href="#">Failed tests</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">Classes</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab">
|
||||
<h2>Failed tests</h2>
|
||||
<ul class="linkList">
|
||||
<li>
|
||||
<a href="../classes/hhn.temp.project.DatabaseBadCasesTest.html">DatabaseBadCasesTest</a>.
|
||||
<a href="../classes/hhn.temp.project.DatabaseBadCasesTest.html#assertConnectionFailed()">Assert connection failed</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../classes/hhn.temp.project.GoodCasesTest.html">GoodCasesTest</a>.
|
||||
<a href="../classes/hhn.temp.project.GoodCasesTest.html#assertEditingTasksIsPossibleThroughUi()">Check that editing is possible through UI</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../classes/hhn.temp.project.GoodCasesTest.html">GoodCasesTest</a>.
|
||||
<a href="../classes/hhn.temp.project.GoodCasesTest.html#assertRemoveWorkerActuallyRemoves()">Assert that removing a worker removes the worker from the worker list</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tab">
|
||||
<h2>Classes</h2>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -80,21 +100,41 @@
|
||||
<td class="success">
|
||||
<a href="../classes/hhn.temp.project.BadCasesTest.html">BadCasesTest</a>
|
||||
</td>
|
||||
<td>6</td>
|
||||
<td>8</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0.057s</td>
|
||||
<td>0.048s</td>
|
||||
<td class="success">100%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="failures">
|
||||
<a href="../classes/hhn.temp.project.DatabaseBadCasesTest.html">DatabaseBadCasesTest</a>
|
||||
</td>
|
||||
<td>1</td>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
<td>0.608s</td>
|
||||
<td class="failures">0%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="success">
|
||||
<a href="../classes/hhn.temp.project.DatabaseGoodCasesTest.html">DatabaseGoodCasesTest</a>
|
||||
</td>
|
||||
<td>3</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0.205s</td>
|
||||
<td class="success">100%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="failures">
|
||||
<a href="../classes/hhn.temp.project.GoodCasesTest.html">GoodCasesTest</a>
|
||||
</td>
|
||||
<td>7</td>
|
||||
<td>13</td>
|
||||
<td>2</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0.007s</td>
|
||||
<td class="success">100%</td>
|
||||
<td>0.029s</td>
|
||||
<td class="failures">84%</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -106,7 +146,7 @@
|
||||
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
|
||||
</label>
|
||||
</div>Generated by
|
||||
<a href="https://www.gradle.org">Gradle 8.14</a> at 03.12.2025, 19:35:34</p>
|
||||
<a href="https://www.gradle.org">Gradle 8.14</a> at 03.12.2025, 21:21:26</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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: <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.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>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -27,6 +27,9 @@ public class AssignmentManager {
|
||||
return workerIdCounter;
|
||||
}
|
||||
public void removeWorker(int workerId) {
|
||||
if (!workerMap.containsKey(workerId)) {
|
||||
throw new IllegalArgumentException("WorkerId must exist in order to remove it");
|
||||
}
|
||||
workerMap.remove(workerId);
|
||||
}
|
||||
public int addTask(int workerId, String name, String description) {
|
||||
@@ -74,5 +77,8 @@ public class AssignmentManager {
|
||||
Task task = taskMap.get(taskId);
|
||||
task.setTaskState(TaskState.IN_PROGRESS);
|
||||
}
|
||||
public UserCommands getUserCommands() {
|
||||
return userInterface;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,18 +3,22 @@ package hhn.temp.project;
|
||||
import java.util.Scanner;
|
||||
|
||||
public class UserCommands {
|
||||
Scanner scanner;
|
||||
public void start() {
|
||||
boolean close = false;
|
||||
Scanner scanner = new Scanner(System.in);
|
||||
while (!close) {
|
||||
System.out.println("Type '?' or 'help' for a list of commands");
|
||||
System.out.println("Please enter a command:");
|
||||
String input = scanner.nextLine();
|
||||
handleInput(input);
|
||||
}
|
||||
scanner.close();
|
||||
// scanner = new Scanner(System.in);
|
||||
// while (!close) {
|
||||
// System.out.println("Type '?' or 'help' for a list of commands");
|
||||
// System.out.println("Please enter a command:");
|
||||
// String input = scanner.nextLine();
|
||||
// handleInput(input);
|
||||
// }
|
||||
// scanner.close();
|
||||
}
|
||||
public void handleInput(String input) {
|
||||
|
||||
}
|
||||
public Scanner getScanner() {
|
||||
return scanner;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
public class GoodCasesTest {
|
||||
@@ -90,7 +92,7 @@ public class GoodCasesTest {
|
||||
@DisplayName("Assert that the Scanner is actually started when AM calls start")
|
||||
public void assertScannerExists() {
|
||||
try {
|
||||
manager.getUserCommands().getScanner();
|
||||
Scanner scanner = manager.getUserCommands().getScanner();
|
||||
} catch (Exception e) {
|
||||
fail("Scanner does not exists or can't be gotten by getScanner()");
|
||||
}
|
||||
@@ -112,7 +114,7 @@ public class GoodCasesTest {
|
||||
int workerId = manager.createWorker("Alfred");
|
||||
int taskId = manager.addTask(workerId, "Run", "Jog 10 Miles");
|
||||
manager.getUserCommands().handleInput("selectTask");
|
||||
assertDoesNotThrow(() -> manager.getUserCommands().handleInput(taskId));
|
||||
assertDoesNotThrow(() -> manager.getUserCommands().handleInput(taskId + ""));
|
||||
assertDoesNotThrow(() -> manager.getUserCommands().handleInput("finish"));
|
||||
assertDoesNotThrow(() -> manager.getUserCommands().handleInput("unfinish"));
|
||||
assertDoesNotThrow(() -> manager.getUserCommands().handleInput("remove"));
|
||||
@@ -125,7 +127,7 @@ public class GoodCasesTest {
|
||||
int workerId = manager.createWorker("Alfred");
|
||||
int taskId = manager.addTask(workerId, "Run", "Jog 10 Miles");
|
||||
manager.getUserCommands().handleInput("selectTask");
|
||||
manager.getUserCommands().handleInput(taskId);
|
||||
manager.getUserCommands().handleInput(taskId + "");
|
||||
manager.getUserCommands().handleInput("edit");
|
||||
assertDoesNotThrow(() -> manager.getUserCommands().handleInput("Walk;Walk 3 Miles"));
|
||||
assertEquals("Walk", manager.getTask(taskId).getName());
|
||||
@@ -138,9 +140,9 @@ public class GoodCasesTest {
|
||||
int workerId = manager.createWorker("Alfred");
|
||||
int workerId2 = manager.createWorker("Balfred");
|
||||
manager.getUserCommands().handleInput("listWorkers");
|
||||
manager.getUserCommands().handleInput(workerId);
|
||||
manager.getUserCommands().handleInput(workerId + "");
|
||||
assertDoesNotThrow(() -> manager.getUserCommands().handleInput("remove"));
|
||||
manager.getUserCommands().handleInput(workerId2);
|
||||
manager.getUserCommands().handleInput(workerId2 + "");
|
||||
assertDoesNotThrow(() -> manager.getUserCommands().handleInput("back"));
|
||||
}
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user