Compare commits

..

15 Commits

Author SHA1 Message Date
Jan
0ccc9122a6 .gitea/workflows/gradle-ci.yml aktualisiert
Some checks failed
Gradle CI with Full Reports / build (push) Failing after 49m3s
2025-12-07 16:48:15 +01:00
Jan-Philipp Luithardt
dce190b0a4 fix actions
All checks were successful
Gradle CI with Full Reports / build (push) Successful in 41m56s
2025-12-07 15:33:08 +01:00
Jan
7e9b4e1c2b .gitea/workflows/gradle-ci.yml aktualisiert
Some checks are pending
Gradle CI with Full Reports / build (push) Has started running
2025-12-07 15:11:40 +01:00
Jan-Philipp Luithardt
6c5dfa3170 fix actions
All checks were successful
Gradle CI with Jacoco and Problems Report / build (push) Successful in 22m7s
2025-12-07 14:43:12 +01:00
Jan
8b022fa5b1 .gitea/workflows/gradle-ci.yml aktualisiert
All checks were successful
Gradle CI with Jacoco and Problems Report / build (push) Successful in 22m1s
2025-12-07 14:15:29 +01:00
Jan-Philipp Luithardt
0adaaa04a3 fix actions
Some checks are pending
Gradle CI with Jacoco and Error Logs / build (push) Has started running
2025-12-07 13:53:21 +01:00
Jan
9f06c9f566 .gitea/workflows/gradle-ci.yml aktualisiert
Some checks are pending
Gradle CI with Jacoco and Error Logs / build (push) Has started running
2025-12-07 13:34:05 +01:00
Jan-Philipp Luithardt
954a28f678 fix actions
Some checks failed
Gradle CI with Jacoco / build (push) Failing after 16m8s
2025-12-07 12:55:46 +01:00
Jan
702c4c8525 .gitea/workflows/gradle-ci.yml aktualisiert
Some checks failed
Gradle CI with Jacoco / build (push) Failing after 16m49s
2025-12-07 12:28:40 +01:00
Jan
aae7db2ad0 schema.sql hinzugefügt
Some checks failed
Gradle CI with MySQL and Jacoco / build (push) Failing after 1m44s
2025-12-07 11:16:28 +01:00
Jan
fc67c11981 .gitea/workflows/gradle-ci.yml aktualisiert
Some checks are pending
Gradle CI with MySQL and Jacoco / build (push) Has started running
2025-12-07 11:16:06 +01:00
Jan-Philipp Luithardt
59d00796d7 fix actions
Some checks failed
Gradle CI with Jacoco / build (push) Failing after 43m9s
2025-12-06 21:14:54 +01:00
Jan-Philipp Luithardt
680f4d74a9 fix actions
Some checks failed
Gradle CI with Jacoco / build (push) Has been cancelled
2025-12-06 20:51:01 +01:00
Jan-Philipp Luithardt
c55494901b fix actions
Some checks failed
Gradle CI with Jacoco / build (push) Failing after 15m35s
2025-12-06 20:30:36 +01:00
Jan-Philipp Luithardt
c775b4ab96 add db
Some checks are pending
Gradle CI with Jacoco / build (push) Has started running
2025-12-06 20:08:03 +01:00
70 changed files with 1394 additions and 236 deletions

View File

@@ -1,41 +1,69 @@
name: Gradle CI with Jacoco name: Gradle CI with Full Reports
on: on:
push: push:
branches: branches: [ main ]
- main
pull_request: pull_request:
branches: branches: [ main ]
- main
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# -----------------------
# 1. Checkout Repository
# -----------------------
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Set up JDK 17 # -----------------------
# 2. Set up Java 17
# -----------------------
- name: Set up Java 17
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:
distribution: temurin distribution: temurin
java-version: 17 java-version: 17
cache: gradle cache: gradle
- name: Cache Gradle # -----------------------
# 3. Cache Gradle Wrapper
# -----------------------
- name: Cache Gradle Wrapper
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: | path: ~/.gradle/wrapper/dists
~/.gradle/caches key: gradle-wrapper-${{ runner.os }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
# -----------------------
# 4. Build & Test mit Logging
# -----------------------
- name: Build & Test with Jacoco - name: Build & Test with Jacoco
run: ./gradlew clean test jacocoTestReport run: ./gradlew --daemon test jacocoTestReport --stacktrace --warning-mode all
# -----------------------
# 5. Build Error HTML aus Log erzeugen
# -----------------------
- name: Convert Build Log to HTML
run: |
mkdir -p build/reports/build-errors
echo "<html><body><pre>" > build/reports/build-errors/build-error-report.html
cat build/logs/build.log >> build/reports/build-errors/build-error-report.html
echo "</pre></body></html>" >> build/reports/build-errors/build-error-report.html
# -----------------------
# 6. Upload Test Report (HTML + XML) automatisch
# -----------------------
- name: Upload Test HTML Report
uses: actions/upload-artifact@v3
with:
name: test-html-report
path: build/reports/tests/test
# -----------------------
# 7. Upload Jacoco Reports
# -----------------------
- name: Upload Jacoco HTML Report - name: Upload Jacoco HTML Report
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
@@ -53,3 +81,23 @@ jobs:
with: with:
name: jacoco-csv-report name: jacoco-csv-report
path: build/reports/jacoco/jacoco.csv path: build/reports/jacoco/jacoco.csv
# -----------------------
# 8. Upload Problems Report
# -----------------------
- name: Upload Gradle Problems Report
if: always()
uses: actions/upload-artifact@v3
with:
name: problems-report
path: build/reports/problems/problems-report.html
# -----------------------
# 9. Upload Build Error HTML Report
# -----------------------
- name: Upload Build Error HTML Report
if: always()
uses: actions/upload-artifact@v3
with:
name: build-error-report
path: build/reports/build-errors/build-error-report.html

Binary file not shown.

17
.idea/dataSources.xml generated Normal file
View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="hhn@localhost" uuid="8fe5d3a7-f78e-4566-93c0-8524dcbfd286">
<driver-ref>mariadb</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.mariadb.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mariadb://localhost:3306/hhn</jdbc-url>
<jdbc-additional-properties>
<property name="com.intellij.clouds.kubernetes.db.host.port" />
<property name="com.intellij.clouds.kubernetes.db.enabled" value="false" />
<property name="com.intellij.clouds.kubernetes.db.container.port" />
</jdbc-additional-properties>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component>
</project>

6
.idea/sqldialects.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="SqlDialectMappings">
<file url="file://$PROJECT_DIR$/src/main/java/hhn/temp/project/provider/MySql.java" dialect="GenericSQL" />
</component>
</project>

View File

@@ -10,6 +10,7 @@ repositories {
} }
dependencies { dependencies {
implementation 'com.mysql:mysql-connector-j:8.4.0'
testImplementation platform('org.junit:junit-bom:5.10.0') testImplementation platform('org.junit:junit-bom:5.10.0')
testImplementation 'org.junit.jupiter:junit-jupiter' testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher' testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="de"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>SQLNoConectionException</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">GSE2TaskTracker</a> &gt; <a href="index.html" class="el_package">hhn.temp.project.expections</a> &gt; <span class="el_class">SQLNoConectionException</span></div><h1>SQLNoConectionException</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">0 of 4</td><td class="ctr2">100 %</td><td class="bar">0 of 0</td><td class="ctr2">n/a</td><td class="ctr1">0</td><td class="ctr2">1</td><td class="ctr1">0</td><td class="ctr2">2</td><td class="ctr1">0</td><td class="ctr2">1</td></tr></tfoot><tbody><tr><td id="a0"><a href="SQLNoConectionException.java.html#L6" class="el_method">SQLNoConectionException(String)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="4" alt="4"/></td><td class="ctr2" id="c0">100 %</td><td class="bar" id="d0"/><td class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">0</td><td class="ctr2" id="g0">1</td><td class="ctr1" id="h0">0</td><td class="ctr2" id="i0">2</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.13.202504020838</span></div></body></html>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="de"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>SQLNoConectionException.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">GSE2TaskTracker</a> &gt; <a href="index.source.html" class="el_package">hhn.temp.project.expections</a> &gt; <span class="el_source">SQLNoConectionException.java</span></div><h1>SQLNoConectionException.java</h1><pre class="source lang-java linenums">package hhn.temp.project.expections;
public class SQLNoConectionException extends RuntimeException {
public SQLNoConectionException(String message) {
<span class="fc" id="L6"> super(message);</span>
<span class="fc" id="L7"> }</span>
}
</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.13.202504020838</span></div></body></html>

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="de"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>SQLStatmentException</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">GSE2TaskTracker</a> &gt; <a href="index.html" class="el_package">hhn.temp.project.expections</a> &gt; <span class="el_class">SQLStatmentException</span></div><h1>SQLStatmentException</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">4 of 4</td><td class="ctr2">0 %</td><td class="bar">0 of 0</td><td class="ctr2">n/a</td><td class="ctr1">1</td><td class="ctr2">1</td><td class="ctr1">2</td><td class="ctr2">2</td><td class="ctr1">1</td><td class="ctr2">1</td></tr></tfoot><tbody><tr><td id="a0"><a href="SQLStatmentException.java.html#L6" class="el_method">SQLStatmentException(String)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="120" height="10" title="4" alt="4"/></td><td class="ctr2" id="c0">0 %</td><td class="bar" id="d0"/><td class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">1</td><td class="ctr2" id="g0">1</td><td class="ctr1" id="h0">2</td><td class="ctr2" id="i0">2</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k0">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.13.202504020838</span></div></body></html>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="de"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>SQLStatmentException.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">GSE2TaskTracker</a> &gt; <a href="index.source.html" class="el_package">hhn.temp.project.expections</a> &gt; <span class="el_source">SQLStatmentException.java</span></div><h1>SQLStatmentException.java</h1><pre class="source lang-java linenums">package hhn.temp.project.expections;
public class SQLStatmentException extends RuntimeException {
public SQLStatmentException(String message) {
<span class="nc" id="L6"> super(message);</span>
<span class="nc" id="L7"> }</span>
}
</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.13.202504020838</span></div></body></html>

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="de"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>TaskNotExistsException</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">GSE2TaskTracker</a> &gt; <a href="index.html" class="el_package">hhn.temp.project.expections</a> &gt; <span class="el_class">TaskNotExistsException</span></div><h1>TaskNotExistsException</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">4 of 4</td><td class="ctr2">0 %</td><td class="bar">0 of 0</td><td class="ctr2">n/a</td><td class="ctr1">1</td><td class="ctr2">1</td><td class="ctr1">2</td><td class="ctr2">2</td><td class="ctr1">1</td><td class="ctr2">1</td></tr></tfoot><tbody><tr><td id="a0"><a href="TaskNotExistsException.java.html#L6" class="el_method">TaskNotExistsException(String)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="120" height="10" title="4" alt="4"/></td><td class="ctr2" id="c0">0 %</td><td class="bar" id="d0"/><td class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">1</td><td class="ctr2" id="g0">1</td><td class="ctr1" id="h0">2</td><td class="ctr2" id="i0">2</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k0">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.13.202504020838</span></div></body></html>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="de"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>TaskNotExistsException.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">GSE2TaskTracker</a> &gt; <a href="index.source.html" class="el_package">hhn.temp.project.expections</a> &gt; <span class="el_source">TaskNotExistsException.java</span></div><h1>TaskNotExistsException.java</h1><pre class="source lang-java linenums">package hhn.temp.project.expections;
public class TaskNotExistsException extends RuntimeException {
public TaskNotExistsException(String message) {
<span class="nc" id="L6"> super(message);</span>
<span class="nc" id="L7"> }</span>
}
</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.13.202504020838</span></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,227 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="de"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>MySql.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">GSE2TaskTracker</a> &gt; <a href="index.source.html" class="el_package">hhn.temp.project.provider</a> &gt; <span class="el_source">MySql.java</span></div><h1>MySql.java</h1><pre class="source lang-java linenums">package hhn.temp.project.provider;
import hhn.temp.project.Task;
import hhn.temp.project.TaskStatus;
import hhn.temp.project.expections.SQLNoConectionException;
import hhn.temp.project.expections.SQLStatmentException;
import hhn.temp.project.expections.TaskNotExistsException;
import java.sql.*;
import java.util.ArrayList;
import java.util.List;
public class MySql {
private String user;
private String password;
private String db;
private String host;
private Connection connection;
<span class="fc" id="L21"> public MySql(String user, String password, String db, String host) {</span>
<span class="fc" id="L22"> this.user = user;</span>
<span class="fc" id="L23"> this.password = password;</span>
<span class="fc" id="L24"> this.db = db;</span>
<span class="fc" id="L25"> this.host = host;</span>
<span class="fc" id="L26"> }</span>
public void connect() {
<span class="fc" id="L29"> String url = &quot;jdbc:mysql://&quot; + host + &quot;:3306/&quot; + db + &quot;?autoReconnect=true&amp;useSSL=false&quot;;</span>
try {
<span class="fc" id="L32"> Class.forName(&quot;com.mysql.cj.jdbc.Driver&quot;);</span>
<span class="fc" id="L33"> connection = DriverManager.getConnection(url, user, password);</span>
<span class="fc" id="L34"> } catch (SQLException e) {</span>
<span class="fc" id="L35"> throw new SQLNoConectionException(&quot;Cant connect to the database&quot;);</span>
<span class="nc" id="L36"> } catch (ClassNotFoundException e) {</span>
<span class="nc" id="L37"> throw new SQLNoConectionException(&quot;Cant connect to the database: Driver class not found!&quot;);</span>
<span class="fc" id="L38"> }</span>
<span class="fc" id="L39"> }</span>
public void reset() {
try {
<span class="fc" id="L43"> PreparedStatement stmt = connection.prepareStatement(&quot;TRUNCATE task&quot;);</span>
<span class="fc" id="L44"> stmt.executeUpdate();</span>
<span class="nc" id="L45"> } catch (SQLException e) {</span>
<span class="nc" id="L46"> throw new SQLStatmentException(&quot;Cant insert data in database&quot;);</span>
<span class="fc" id="L47"> }</span>
<span class="fc" id="L48"> }</span>
public int createTask(String name, String description) {
try {
<span class="fc" id="L52"> PreparedStatement stmt = connection.prepareStatement(&quot;INSERT INTO task ( taskName, taskDescription) VALUES ( ? , ? )&quot;, Statement.RETURN_GENERATED_KEYS);</span>
<span class="fc" id="L53"> stmt.setString(1, name);</span>
<span class="fc" id="L54"> stmt.setString(2, description);</span>
<span class="fc" id="L55"> stmt.executeUpdate();</span>
<span class="fc" id="L56"> ResultSet rs = stmt.getGeneratedKeys();</span>
<span class="pc bpc" id="L57" title="1 of 2 branches missed."> if(rs.next()) {</span>
<span class="fc" id="L58"> return rs.getInt(1);</span>
}else{
<span class="nc" id="L60"> throw new SQLStatmentException(&quot;Can insert data but not select&quot;);</span>
}
<span class="nc" id="L62"> } catch (SQLException e) {</span>
<span class="nc" id="L63"> throw new SQLStatmentException(&quot;Cant insert data in database&quot;);</span>
}
}
// public void deleteTask(int id) {
// try {
// PreparedStatement stmt = connection.prepareStatement(&quot;DELETE task WHERE taskID=?&quot;);
// stmt.setString(1, &quot;&quot;+id);
// stmt.executeUpdate();
// } catch (SQLException e) {
// throw new SQLStatmentException(&quot;Cant delete data in database&quot;);
// }
// }
public boolean existTask(String name) {
try {
<span class="fc" id="L79"> PreparedStatement stmt = connection.prepareStatement(&quot;Select * FROM task WHERE taskName=?&quot;);</span>
<span class="fc" id="L80"> stmt.setString(1, name);</span>
<span class="fc" id="L81"> ResultSet rs = stmt.executeQuery();</span>
<span class="fc" id="L82"> return rs.next();</span>
<span class="nc" id="L83"> } catch (SQLException e) {</span>
<span class="nc" id="L84"> throw new SQLStatmentException(&quot;Cant select data from database&quot;);</span>
}
}
public boolean existTask(int id) {
try {
<span class="fc" id="L90"> PreparedStatement stmt = connection.prepareStatement(&quot;Select * FROM task WHERE taskID=?&quot;);</span>
<span class="fc" id="L91"> stmt.setString(1, &quot;&quot;+id);</span>
<span class="fc" id="L92"> ResultSet rs = stmt.executeQuery();</span>
<span class="fc" id="L93"> return rs.next();</span>
<span class="nc" id="L94"> } catch (SQLException e) {</span>
<span class="nc" id="L95"> throw new SQLStatmentException(&quot;Cant select data from database&quot;);</span>
}
}
public void deleteTask(String name) {
try {
<span class="fc" id="L101"> PreparedStatement stmt = connection.prepareStatement(&quot;DELETE FROM task WHERE taskName=?&quot;);</span>
<span class="fc" id="L102"> stmt.setString(1, name);</span>
<span class="fc" id="L103"> stmt.executeUpdate();</span>
<span class="nc" id="L104"> } catch (SQLException e) {</span>
<span class="nc" id="L105"> throw new SQLStatmentException(&quot;Cant delete data in database&quot;);</span>
<span class="fc" id="L106"> }</span>
<span class="fc" id="L107"> }</span>
public void updateDescription(int id, String description) {
try {
<span class="fc" id="L111"> PreparedStatement stmt = connection.prepareStatement(&quot;UPDATE task SET taskDescription=? WHERE taskID=?&quot;);</span>
<span class="fc" id="L112"> stmt.setString(1, description);</span>
<span class="fc" id="L113"> stmt.setString(2, &quot;&quot;+id);</span>
<span class="fc" id="L114"> stmt.executeUpdate();</span>
<span class="nc" id="L116"> } catch (SQLException e) {</span>
<span class="nc" id="L117"> throw new SQLStatmentException(&quot;Cant update data in database&quot;);</span>
<span class="fc" id="L118"> }</span>
<span class="fc" id="L119"> }</span>
// public void updateDescription(String name, String description) {
// try {
// PreparedStatement stmt = connection.prepareStatement(&quot;UPDATE task SET taskDescription=? WHERE taskName=?&quot;);
// stmt.setString(1, description);
// stmt.setString(2, name);
// stmt.executeUpdate();
//
// } catch (SQLException e) {
// throw new SQLStatmentException(&quot;Cant update data in database&quot;);
// }
// }
public void updateStatus(int id, TaskStatus status) {
try {
<span class="fc" id="L133"> PreparedStatement stmt = connection.prepareStatement(&quot;UPDATE task SET taskStatus=? WHERE taskID=?&quot;);</span>
<span class="fc" id="L134"> stmt.setString(1, status.name());</span>
<span class="fc" id="L135"> stmt.setString(2, &quot;&quot;+id);</span>
<span class="fc" id="L136"> stmt.executeUpdate();</span>
<span class="nc" id="L138"> } catch (SQLException e) {</span>
<span class="nc" id="L139"> throw new SQLStatmentException(&quot;Cant update data in database&quot;);</span>
<span class="fc" id="L140"> }</span>
<span class="fc" id="L141"> }</span>
// public void updateStatus(String name, TaskStatus status) {
// try {
// PreparedStatement stmt = connection.prepareStatement(&quot;UPDATE task SET taskStatus=? WHERE taskName=?&quot;);
// stmt.setString(1, status.name());
// stmt.setString(2, name);
// stmt.executeUpdate();
//
// } catch (SQLException e) {
// throw new SQLStatmentException(&quot;Cant update data in database&quot;);
// }
// }
public void updateWorker(int id, String worker) {
try {
<span class="fc" id="L156"> PreparedStatement stmt = connection.prepareStatement(&quot;UPDATE task SET taskWorker=? WHERE taskID=?&quot;);</span>
<span class="fc" id="L157"> stmt.setString(1, worker);</span>
<span class="fc" id="L158"> stmt.setString(2, &quot;&quot;+id);</span>
<span class="fc" id="L159"> stmt.executeUpdate();</span>
<span class="nc" id="L161"> } catch (SQLException e) {</span>
<span class="nc" id="L162"> throw new SQLStatmentException(&quot;Cant update data in database&quot;);</span>
<span class="fc" id="L163"> }</span>
<span class="fc" id="L164"> }</span>
// public void updateWorker(String name, String worker) {
// try {
// PreparedStatement stmt = connection.prepareStatement(&quot;UPDATE task SET taskWorker=? WHERE taskName=?&quot;);
// stmt.setString(1, worker);
// stmt.setString(2, name);
// stmt.executeUpdate();
//
// } catch (SQLException e) {
// throw new SQLStatmentException(&quot;Cant update data in database&quot;);
// }
// }
public Task getTask(int id) {
try {
<span class="fc" id="L180"> PreparedStatement stmt = connection.prepareStatement(&quot;SELECT * FROM task WHERE taskID=?&quot;);</span>
<span class="fc" id="L181"> stmt.setString(1, &quot;&quot;+id);</span>
<span class="fc" id="L182"> ResultSet rs = stmt.executeQuery();</span>
<span class="pc bpc" id="L183" title="1 of 2 branches missed."> if(rs.next()) {</span>
<span class="fc" id="L184"> return getTaskFromDatabase(rs);</span>
} else {
<span class="nc" id="L186"> throw new TaskNotExistsException(&quot;No Task found in databse with id: &quot; + id);</span>
}
<span class="nc" id="L188"> } catch (SQLException e) {</span>
<span class="nc" id="L189"> throw new SQLStatmentException(&quot;Cant select data from database&quot;);</span>
}
}
public Task getTask(String name) {
try {
<span class="fc" id="L194"> PreparedStatement stmt = connection.prepareStatement(&quot;SELECT * FROM task WHERE taskName=?&quot;);</span>
<span class="fc" id="L195"> stmt.setString(1, name);</span>
<span class="fc" id="L196"> ResultSet rs = stmt.executeQuery();</span>
<span class="pc bpc" id="L197" title="1 of 2 branches missed."> if(rs.next()) {</span>
<span class="fc" id="L198"> return getTaskFromDatabase(rs);</span>
}else{
<span class="nc" id="L200"> throw new TaskNotExistsException(&quot;No Task found in databse with name: &quot; + name);</span>
}
<span class="nc" id="L203"> } catch (SQLException e) {</span>
<span class="nc" id="L204"> throw new SQLStatmentException(&quot;Cant select data from database&quot;);</span>
}
}
public List&lt;Task&gt; getTaskList() {
try {
<span class="fc" id="L210"> PreparedStatement stmt = connection.prepareStatement(&quot;SELECT * FROM task&quot;);</span>
<span class="fc" id="L211"> ResultSet rs = stmt.executeQuery();</span>
<span class="fc" id="L212"> List&lt;Task&gt; taskList = new ArrayList&lt;&gt;();</span>
<span class="fc bfc" id="L213" title="All 2 branches covered."> while(rs.next()) {</span>
<span class="fc" id="L214"> taskList.add(getTaskFromDatabase(rs));</span>
}
<span class="fc" id="L216"> return taskList;</span>
<span class="nc" id="L217"> } catch (SQLException e) {</span>
<span class="nc" id="L218"> throw new SQLStatmentException(&quot;Cant select data from database&quot;);</span>
}
}
private Task getTaskFromDatabase(ResultSet rs) throws SQLException {
<span class="fc" id="L223"> Task task = new Task(rs.getInt(&quot;taskID&quot;), rs.getString(&quot;taskName&quot;), rs.getString(&quot;taskDescription&quot;), rs.getString(&quot;taskWorker&quot;),TaskStatus.valueOf(rs.getString(&quot;taskStatus&quot;)), this);</span>
<span class="fc" id="L224"> return task;</span>
}
}
</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.13.202504020838</span></div></body></html>

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="de"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>hhn.temp.project.provider</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="index.source.html" class="el_source">Source Files</a><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">GSE2TaskTracker</a> &gt; <span class="el_package">hhn.temp.project.provider</span></div><h1>hhn.temp.project.provider</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="m" onclick="toggleSort(this)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">89 of 355</td><td class="ctr2">74 %</td><td class="bar">3 of 8</td><td class="ctr2">62 %</td><td class="ctr1">3</td><td class="ctr2">18</td><td class="ctr1">27</td><td class="ctr2">100</td><td class="ctr1">0</td><td class="ctr2">14</td><td class="ctr1">0</td><td class="ctr2">1</td></tr></tfoot><tbody><tr><td id="a0"><a href="MySql.html" class="el_class">MySql</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="30" height="10" title="89" alt="89"/><img src="../jacoco-resources/greenbar.gif" width="89" height="10" title="266" alt="266"/></td><td class="ctr2" id="c0">74 %</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="45" height="10" title="3" alt="3"/><img src="../jacoco-resources/greenbar.gif" width="75" height="10" title="5" alt="5"/></td><td class="ctr2" id="e0">62 %</td><td class="ctr1" id="f0">3</td><td class="ctr2" id="g0">18</td><td class="ctr1" id="h0">27</td><td class="ctr2" id="i0">100</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">14</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.13.202504020838</span></div></body></html>

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="de"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>hhn.temp.project.provider</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="index.html" class="el_class">Classes</a><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">GSE2TaskTracker</a> &gt; <span class="el_package">hhn.temp.project.provider</span></div><h1>hhn.temp.project.provider</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="m" onclick="toggleSort(this)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">89 of 355</td><td class="ctr2">74 %</td><td class="bar">3 of 8</td><td class="ctr2">62 %</td><td class="ctr1">3</td><td class="ctr2">18</td><td class="ctr1">27</td><td class="ctr2">100</td><td class="ctr1">0</td><td class="ctr2">14</td><td class="ctr1">0</td><td class="ctr2">1</td></tr></tfoot><tbody><tr><td id="a0"><a href="MySql.java.html" class="el_source">MySql.java</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="30" height="10" title="89" alt="89"/><img src="../jacoco-resources/greenbar.gif" width="89" height="10" title="266" alt="266"/></td><td class="ctr2" id="c0">74 %</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="45" height="10" title="3" alt="3"/><img src="../jacoco-resources/greenbar.gif" width="75" height="10" title="5" alt="5"/></td><td class="ctr2" id="e0">62 %</td><td class="ctr1" id="f0">3</td><td class="ctr2" id="g0">18</td><td class="ctr1" id="h0">27</td><td class="ctr2" id="i0">100</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">14</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.13.202504020838</span></div></body></html>

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="de"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>Task.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">GSE2TaskTracker</a> &gt; <a href="index.source.html" class="el_package">hhn.temp.project</a> &gt; <span class="el_source">Task.java</span></div><h1>Task.java</h1><pre class="source lang-java linenums">package hhn.temp.project; <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="de"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>Task.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">GSE2TaskTracker</a> &gt; <a href="index.source.html" class="el_package">hhn.temp.project</a> &gt; <span class="el_source">Task.java</span></div><h1>Task.java</h1><pre class="source lang-java linenums">package hhn.temp.project;
import hhn.temp.project.expections.TaskHasNoWorkerException; import hhn.temp.project.expections.TaskHasNoWorkerException;
import hhn.temp.project.provider.MySql;
public class Task { public class Task {
@@ -8,82 +9,87 @@ public class Task {
private String description; private String description;
private TaskStatus taskStatus; private TaskStatus taskStatus;
private int taskID; private int taskID;
<span class="fc" id="L11"> private static int idCounter = 0;</span>
private String workername; private String workername;
private MySql mySql;
<span class="fc" id="L14"> public Task(String name, String description) {</span> <span class="fc" id="L15"> public Task(int id, String name, String description, String workername, TaskStatus status, MySql mySql) {</span>
<span class="fc" id="L17"> this.taskID = id;</span>
<span class="fc" id="L17"> this.name = name;</span> <span class="fc" id="L18"> this.name = name;</span>
<span class="fc" id="L18"> this.description = description;</span> <span class="fc" id="L19"> this.description = description;</span>
<span class="fc" id="L19"> this.taskStatus = TaskStatus.OPEN;</span> <span class="fc" id="L20"> this.taskStatus = status;</span>
//TODO when DB then auto IDs <span class="fc" id="L21"> this.workername = workername;</span>
<span class="fc" id="L21"> this.taskID = idCounter++;</span> <span class="fc" id="L22"> this.mySql = mySql;</span>
<span class="fc" id="L22"> }</span> <span class="fc" id="L23"> }</span>
public int getTaskID() { public int getTaskID() {
<span class="fc" id="L25"> return this.taskID;</span> <span class="fc" id="L26"> return this.taskID;</span>
} }
public String getName() { public String getName() {
<span class="fc" id="L29"> return this.name;</span> <span class="fc" id="L30"> return this.name;</span>
} }
public String getDescription() { public String getDescription() {
<span class="fc" id="L33"> return description;</span> <span class="fc" id="L34"> return description;</span>
} }
public TaskStatus getStatus() { public TaskStatus getStatus() {
<span class="fc" id="L37"> return taskStatus;</span> <span class="fc" id="L38"> return taskStatus;</span>
} }
public void setDescription(String description) { public void setDescription(String description) {
<span class="fc bfc" id="L41" title="All 2 branches covered."> if (description == null ) {</span> <span class="fc bfc" id="L42" title="All 2 branches covered."> if (description == null ) {</span>
<span class="fc" id="L43"> throw new IllegalArgumentException(&quot;Description is null!&quot;);</span> <span class="fc" id="L44"> throw new IllegalArgumentException(&quot;Description is null!&quot;);</span>
} }
<span class="fc" id="L46"> this.description = description;</span> <span class="fc" id="L47"> this.mySql.updateDescription(taskID, description);</span>
<span class="fc" id="L47"> }</span> <span class="fc" id="L48"> this.description = description;</span>
<span class="fc" id="L49"> }</span>
public void setStatus(TaskStatus taskStatus) { public void setStatus(TaskStatus taskStatus) {
<span class="fc bfc" id="L50" title="All 2 branches covered."> if (taskStatus == null ) {</span> <span class="fc bfc" id="L52" title="All 2 branches covered."> if (taskStatus == null ) {</span>
<span class="fc" id="L52"> throw new IllegalArgumentException(&quot;TaskStatus is null!&quot;);</span> <span class="fc" id="L54"> throw new IllegalArgumentException(&quot;TaskStatus is null!&quot;);</span>
} }
<span class="fc" id="L55"> this.taskStatus = taskStatus;</span> <span class="fc" id="L57"> this.mySql.updateStatus(taskID, taskStatus);</span>
<span class="fc" id="L56"> }</span> <span class="fc" id="L58"> this.taskStatus = taskStatus;</span>
<span class="fc" id="L59"> }</span>
public void setWorker(String workerName) { public void setWorker(String workerName) {
<span class="fc bfc" id="L59" title="All 4 branches covered."> if(workerName == null || workerName.isEmpty()) {</span> <span class="fc bfc" id="L62" title="All 4 branches covered."> if(workerName == null || workerName.isEmpty()) {</span>
<span class="fc" id="L60"> throw new IllegalArgumentException(&quot;There is nothing in this variable.&quot;);</span> <span class="fc" id="L63"> throw new IllegalArgumentException(&quot;There is nothing in this variable.&quot;);</span>
} }
<span class="fc bfc" id="L62" title="All 2 branches covered."> if(!checkOnlyLetter(workerName)){</span> <span class="fc bfc" id="L65" title="All 2 branches covered."> if(!checkOnlyLetter(workerName)){</span>
<span class="fc" id="L63"> throw new IllegalArgumentException(&quot;Only Lettery as Worker Name!&quot;);</span> <span class="fc" id="L66"> throw new IllegalArgumentException(&quot;Only Lettery as Worker Name!&quot;);</span>
} }
<span class="fc" id="L65"> this.workername = workerName;</span>
<span class="fc" id="L66"> this.setStatus(TaskStatus.INPROCESS);</span> <span class="fc" id="L69"> this.mySql.updateStatus(taskID, TaskStatus.INPROCESS);</span>
<span class="fc" id="L67"> }</span> <span class="fc" id="L70"> this.mySql.updateWorker(taskID, workerName);</span>
<span class="fc" id="L71"> this.workername = workerName;</span>
<span class="fc" id="L72"> this.setStatus(TaskStatus.INPROCESS);</span>
<span class="fc" id="L73"> }</span>
public String getWorker() { public String getWorker() {
<span class="fc bfc" id="L70" title="All 2 branches covered."> if(this.workername == null) {</span> <span class="fc bfc" id="L76" title="All 2 branches covered."> if(this.workername == null) {</span>
<span class="fc" id="L71"> throw new TaskHasNoWorkerException(&quot;Please set first a Worker&quot;);</span> <span class="fc" id="L77"> throw new TaskHasNoWorkerException(&quot;Please set first a Worker&quot;);</span>
} }
<span class="fc" id="L73"> return this.workername;</span> <span class="fc" id="L79"> return this.workername;</span>
} }
private boolean checkOnlyLetter(String text) { private boolean checkOnlyLetter(String text) {
<span class="fc" id="L77"> boolean result = true;</span> <span class="fc" id="L83"> boolean result = true;</span>
<span class="fc bfc" id="L79" title="All 2 branches covered."> for(int i = 0; i &lt; text.length(); i++) {</span> <span class="fc bfc" id="L85" title="All 2 branches covered."> for(int i = 0; i &lt; text.length(); i++) {</span>
<span class="fc" id="L80"> char c = text.charAt(i);</span> <span class="fc" id="L86"> char c = text.charAt(i);</span>
<span class="fc bfc" id="L81" title="All 2 branches covered."> if(!Character.isLetter(c)) {</span> <span class="fc bfc" id="L87" title="All 2 branches covered."> if(!Character.isLetter(c)) {</span>
<span class="fc" id="L82"> result = false;</span> <span class="fc" id="L88"> result = false;</span>
<span class="fc" id="L83"> break;</span> <span class="fc" id="L89"> break;</span>
} }
} }
<span class="fc" id="L86"> return result;</span> <span class="fc" id="L92"> return result;</span>
} }
} }
</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.13.202504020838</span></div></body></html> </pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.13.202504020838</span></div></body></html>

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="de"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>TaskManager.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">GSE2TaskTracker</a> &gt; <a href="index.source.html" class="el_package">hhn.temp.project</a> &gt; <span class="el_source">TaskManager.java</span></div><h1>TaskManager.java</h1><pre class="source lang-java linenums">package hhn.temp.project; <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="de"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>TaskManager.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">GSE2TaskTracker</a> &gt; <a href="index.source.html" class="el_package">hhn.temp.project</a> &gt; <span class="el_source">TaskManager.java</span></div><h1>TaskManager.java</h1><pre class="source lang-java linenums">package hhn.temp.project;
import hhn.temp.project.expections.TaskAlreadyExistsException; import hhn.temp.project.expections.TaskAlreadyExistsException;
import hhn.temp.project.provider.MySql;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@@ -10,76 +11,88 @@ import java.util.Map;
public class TaskManager { public class TaskManager {
private Map&lt;Integer, Task&gt; taskMap; private Map&lt;Integer, Task&gt; taskMap;
private MySql mysql;
<span class="fc" id="L14"> public TaskManager() {</span> <span class="fc" id="L16"> public TaskManager(String user, String password, String port, String host) {</span>
<span class="fc" id="L15"> taskMap = new HashMap&lt;&gt;();</span> <span class="fc" id="L17"> taskMap = new HashMap&lt;&gt;();</span>
<span class="fc" id="L16"> }</span> <span class="fc" id="L18"> this.mysql = new MySql(user, password, port, host);</span>
<span class="fc" id="L19"> this.mysql.connect();</span>
<span class="fc" id="L20"> }</span>
/**
* only for Testing
*/
public void resetTest() {
<span class="fc" id="L25"> this.mysql.reset();</span>
<span class="fc" id="L26"> }</span>
public Task createTask(String name, String description) { public Task createTask(String name, String description) {
<span class="fc bfc" id="L19" title="All 4 branches covered."> if (name == null || description == null ) {</span> <span class="fc bfc" id="L29" title="All 4 branches covered."> if (name == null || description == null ) {</span>
<span class="fc" id="L21"> throw new IllegalArgumentException(&quot;Name/Description is null!&quot;);</span> <span class="fc" id="L31"> throw new IllegalArgumentException(&quot;Name/Description is null!&quot;);</span>
} }
<span class="fc bfc" id="L23" title="All 2 branches covered."> if(name.isEmpty()) {</span> <span class="fc bfc" id="L33" title="All 2 branches covered."> if(name.isEmpty()) {</span>
<span class="fc" id="L24"> throw new IllegalArgumentException(&quot;Name is empty!&quot;);</span> <span class="fc" id="L34"> throw new IllegalArgumentException(&quot;Name is empty!&quot;);</span>
} }
<span class="fc bfc" id="L27" title="All 2 branches covered."> if(!checkOnlyLetterOrDigit(name)) {</span> <span class="fc bfc" id="L37" title="All 2 branches covered."> if(!checkOnlyLetterOrDigit(name)) {</span>
<span class="fc" id="L28"> throw new IllegalArgumentException(&quot;Only Letters or Digit are allowed in the name: &quot; + name);</span> <span class="fc" id="L38"> throw new IllegalArgumentException(&quot;Only Letters or Digit are allowed in the name: &quot; + name);</span>
} }
<span class="fc" id="L41"> boolean taskExited = this.mysql.existTask(name);</span>
<span class="fc" id="L32"> boolean taskExited = this.taskMap.values().stream().anyMatch(task -&gt; task.getName().equals(name));</span> <span class="fc bfc" id="L42" title="All 2 branches covered."> if(taskExited) {</span>
<span class="fc bfc" id="L33" title="All 2 branches covered."> if(taskExited) {</span> <span class="fc" id="L43"> throw new TaskAlreadyExistsException(&quot;Task already exits, with the name: &quot; + name);</span>
<span class="fc" id="L34"> throw new TaskAlreadyExistsException(&quot;Task already exits, with the name: &quot; + name);</span>
} }
<span class="fc" id="L46"> int taskId = this.mysql.createTask(name, description);</span>
<span class="fc" id="L47"> Task task = this.mysql.getTask(taskId);</span>
<span class="fc" id="L38"> Task task = new Task(name, description);</span> //taskMap.put(task.getTaskID(), task);
<span class="fc" id="L39"> taskMap.put(task.getTaskID(), task);</span> <span class="fc" id="L50"> return task;</span>
<span class="fc" id="L40"> return task;</span>
} }
public List&lt;Task&gt; getTaskList() { public List&lt;Task&gt; getTaskList() {
<span class="fc" id="L44"> return new ArrayList&lt;&gt;(this.taskMap.values());</span>
<span class="fc" id="L55"> return this.mysql.getTaskList();</span>
} }
public Task getTask(String name) { public Task getTask(String name) {
<span class="fc" id="L48"> return taskMap.values().stream().filter(t -&gt; t.getName().equals(name)).findFirst()</span> <span class="fc bfc" id="L59" title="All 2 branches covered."> if(!this.mysql.existTask(name)) {</span>
<span class="fc" id="L49"> .orElseThrow(() -&gt; new IllegalArgumentException(&quot;Wrong name&quot;));</span> <span class="fc" id="L60"> throw new IllegalArgumentException(&quot;Wrong name&quot;);</span>
}
<span class="fc" id="L63"> return this.mysql.getTask(name);</span>
} }
public Task getTask(int taskID) { public Task getTask(int taskID) {
<span class="fc bfc" id="L52" title="All 2 branches covered."> if(!this.taskMap.containsKey(taskID)) {</span> <span class="fc bfc" id="L66" title="All 2 branches covered."> if(!this.mysql.existTask(taskID)) {</span>
<span class="fc" id="L53"> throw new IllegalArgumentException(&quot;Wrong id&quot;);</span> <span class="fc" id="L67"> throw new IllegalArgumentException(&quot;Wrong id&quot;);</span>
} }
<span class="fc" id="L55"> return this.taskMap.get(taskID);</span> <span class="fc" id="L69"> return this.mysql.getTask(taskID);</span>
} }
public void deleteTask(String name) { public void deleteTask(String name) {
<span class="fc bfc" id="L59" title="All 2 branches covered."> if (name == null ) {</span> <span class="fc bfc" id="L73" title="All 2 branches covered."> if (name == null ) {</span>
<span class="fc" id="L61"> throw new IllegalArgumentException(&quot;Name is null!&quot;);</span> <span class="fc" id="L75"> throw new IllegalArgumentException(&quot;Name is null!&quot;);</span>
} }
<span class="fc bfc" id="L63" title="All 4 branches covered."> if(name.isEmpty() || this.taskMap.values().stream().noneMatch(t -&gt; t.getName().equals(name))) {</span> <span class="fc bfc" id="L77" title="All 4 branches covered."> if(name.isEmpty() || !this.mysql.existTask(name)) {</span>
<span class="fc" id="L64"> throw new IllegalArgumentException(&quot;Wrong name!&quot;);</span> <span class="fc" id="L78"> throw new IllegalArgumentException(&quot;Wrong name!&quot;);</span>
} }
<span class="fc" id="L67"> this.taskMap.remove(this.taskMap.values().stream().filter(t -&gt; t.getName().equals(name)).findFirst()</span> <span class="fc" id="L81"> this.mysql.deleteTask(name);</span>
<span class="fc" id="L68"> .orElseThrow().getTaskID());</span>
<span class="fc" id="L70"> }</span> <span class="fc" id="L83"> }</span>
private boolean checkOnlyLetterOrDigit(String text) { private boolean checkOnlyLetterOrDigit(String text) {
<span class="fc" id="L73"> boolean result = true;</span> <span class="fc" id="L86"> boolean result = true;</span>
<span class="fc bfc" id="L75" title="All 2 branches covered."> for(int i = 0; i &lt; text.length(); i++) {</span> <span class="fc bfc" id="L88" title="All 2 branches covered."> for(int i = 0; i &lt; text.length(); i++) {</span>
<span class="fc" id="L76"> char c = text.charAt(i);</span> <span class="fc" id="L89"> char c = text.charAt(i);</span>
<span class="fc bfc" id="L77" title="All 2 branches covered."> if(!Character.isLetterOrDigit(c)) {</span> <span class="fc bfc" id="L90" title="All 2 branches covered."> if(!Character.isLetterOrDigit(c)) {</span>
<span class="fc" id="L78"> result = false;</span> <span class="fc" id="L91"> result = false;</span>
<span class="fc" id="L79"> break;</span> <span class="fc" id="L92"> break;</span>
} }
} }
<span class="fc" id="L82"> return result;</span> <span class="fc" id="L95"> return result;</span>
} }
// private boolean checkOnlyLetter(String text) { // private boolean checkOnlyLetter(String text) {
// boolean result = true; // boolean result = true;

View File

@@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="de"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>hhn.temp.project</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="index.source.html" class="el_source">Source Files</a><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">GSE2TaskTracker</a> &gt; <span class="el_package">hhn.temp.project</span></div><h1>hhn.temp.project</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="m" onclick="toggleSort(this)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">0 of 330</td><td class="ctr2">100 %</td><td class="bar">0 of 38</td><td class="ctr2">100 %</td><td class="ctr1">0</td><td class="ctr2">44</td><td class="ctr1">0</td><td class="ctr2">74</td><td class="ctr1">0</td><td class="ctr2">25</td><td class="ctr1">0</td><td class="ctr2">4</td></tr></tfoot><tbody><tr><td id="a2"><a href="TaskManager.html" class="el_class">TaskManager</a></td><td class="bar" id="b0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="191" alt="191"/></td><td class="ctr2" id="c0">100 %</td><td class="bar" id="d0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="22" alt="22"/></td><td class="ctr2" id="e0">100 %</td><td class="ctr1" id="f0">0</td><td class="ctr2" id="g0">23</td><td class="ctr1" id="h0">0</td><td class="ctr2" id="i1">35</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">12</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr><tr><td id="a1"><a href="Task.html" class="el_class">Task</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="72" height="10" title="115" alt="115"/></td><td class="ctr2" id="c1">100 %</td><td class="bar" id="d1"><img src="../jacoco-resources/greenbar.gif" width="87" height="10" title="16" alt="16"/></td><td class="ctr2" id="e1">100 %</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g1">19</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i0">36</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">11</td><td class="ctr1" id="l1">0</td><td class="ctr2" id="m1">1</td></tr><tr><td id="a3"><a href="TaskStatus.html" class="el_class">TaskStatus</a></td><td class="bar" id="b2"><img src="../jacoco-resources/greenbar.gif" width="13" height="10" title="21" alt="21"/></td><td class="ctr2" id="c2">100 %</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">0</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">0</td><td class="ctr2" id="i2">2</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td><td class="ctr1" id="l2">0</td><td class="ctr2" id="m2">1</td></tr><tr><td id="a0"><a href="Main.html" class="el_class">Main</a></td><td class="bar" id="b3"><img src="../jacoco-resources/greenbar.gif" width="1" height="10" title="3" alt="3"/></td><td class="ctr2" id="c3">100 %</td><td class="bar" id="d3"/><td class="ctr2" id="e3">n/a</td><td class="ctr1" id="f3">0</td><td class="ctr2" id="g3">1</td><td class="ctr1" id="h3">0</td><td class="ctr2" id="i3">1</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td><td class="ctr1" id="l3">0</td><td class="ctr2" id="m3">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.13.202504020838</span></div></body></html> <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="de"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>hhn.temp.project</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="index.source.html" class="el_source">Source Files</a><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">GSE2TaskTracker</a> &gt; <span class="el_package">hhn.temp.project</span></div><h1>hhn.temp.project</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="m" onclick="toggleSort(this)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">0 of 320</td><td class="ctr2">100 %</td><td class="bar">0 of 40</td><td class="ctr2">100 %</td><td class="ctr1">0</td><td class="ctr2">40</td><td class="ctr1">0</td><td class="ctr2">83</td><td class="ctr1">0</td><td class="ctr2">20</td><td class="ctr1">0</td><td class="ctr2">4</td></tr></tfoot><tbody><tr><td id="a2"><a href="TaskManager.html" class="el_class">TaskManager</a></td><td class="bar" id="b0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="158" alt="158"/></td><td class="ctr2" id="c0">100 %</td><td class="bar" id="d0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="24" alt="24"/></td><td class="ctr2" id="e0">100 %</td><td class="ctr1" id="f0">0</td><td class="ctr2" id="g0">20</td><td class="ctr1" id="h0">0</td><td class="ctr2" id="i1">39</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k1">8</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr><tr><td id="a1"><a href="Task.html" class="el_class">Task</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="104" height="10" title="138" alt="138"/></td><td class="ctr2" id="c1">100 %</td><td class="bar" id="d1"><img src="../jacoco-resources/greenbar.gif" width="80" height="10" title="16" alt="16"/></td><td class="ctr2" id="e1">100 %</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g1">18</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i0">41</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k0">10</td><td class="ctr1" id="l1">0</td><td class="ctr2" id="m1">1</td></tr><tr><td id="a3"><a href="TaskStatus.html" class="el_class">TaskStatus</a></td><td class="bar" id="b2"><img src="../jacoco-resources/greenbar.gif" width="15" height="10" title="21" alt="21"/></td><td class="ctr2" id="c2">100 %</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">0</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">0</td><td class="ctr2" id="i2">2</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td><td class="ctr1" id="l2">0</td><td class="ctr2" id="m2">1</td></tr><tr><td id="a0"><a href="Main.html" class="el_class">Main</a></td><td class="bar" id="b3"><img src="../jacoco-resources/greenbar.gif" width="2" height="10" title="3" alt="3"/></td><td class="ctr2" id="c3">100 %</td><td class="bar" id="d3"/><td class="ctr2" id="e3">n/a</td><td class="ctr1" id="f3">0</td><td class="ctr2" id="g3">1</td><td class="ctr1" id="h3">0</td><td class="ctr2" id="i3">1</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td><td class="ctr1" id="l3">0</td><td class="ctr2" id="m3">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.13.202504020838</span></div></body></html>

View File

@@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="de"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>hhn.temp.project</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="index.html" class="el_class">Classes</a><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">GSE2TaskTracker</a> &gt; <span class="el_package">hhn.temp.project</span></div><h1>hhn.temp.project</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="m" onclick="toggleSort(this)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">0 of 330</td><td class="ctr2">100 %</td><td class="bar">0 of 38</td><td class="ctr2">100 %</td><td class="ctr1">0</td><td class="ctr2">44</td><td class="ctr1">0</td><td class="ctr2">74</td><td class="ctr1">0</td><td class="ctr2">25</td><td class="ctr1">0</td><td class="ctr2">4</td></tr></tfoot><tbody><tr><td id="a2"><a href="TaskManager.java.html" class="el_source">TaskManager.java</a></td><td class="bar" id="b0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="191" alt="191"/></td><td class="ctr2" id="c0">100 %</td><td class="bar" id="d0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="22" alt="22"/></td><td class="ctr2" id="e0">100 %</td><td class="ctr1" id="f0">0</td><td class="ctr2" id="g0">23</td><td class="ctr1" id="h0">0</td><td class="ctr2" id="i1">35</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">12</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr><tr><td id="a1"><a href="Task.java.html" class="el_source">Task.java</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="72" height="10" title="115" alt="115"/></td><td class="ctr2" id="c1">100 %</td><td class="bar" id="d1"><img src="../jacoco-resources/greenbar.gif" width="87" height="10" title="16" alt="16"/></td><td class="ctr2" id="e1">100 %</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g1">19</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i0">36</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">11</td><td class="ctr1" id="l1">0</td><td class="ctr2" id="m1">1</td></tr><tr><td id="a3"><a href="TaskStatus.java.html" class="el_source">TaskStatus.java</a></td><td class="bar" id="b2"><img src="../jacoco-resources/greenbar.gif" width="13" height="10" title="21" alt="21"/></td><td class="ctr2" id="c2">100 %</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">0</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">0</td><td class="ctr2" id="i2">2</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td><td class="ctr1" id="l2">0</td><td class="ctr2" id="m2">1</td></tr><tr><td id="a0"><a href="Main.java.html" class="el_source">Main.java</a></td><td class="bar" id="b3"><img src="../jacoco-resources/greenbar.gif" width="1" height="10" title="3" alt="3"/></td><td class="ctr2" id="c3">100 %</td><td class="bar" id="d3"/><td class="ctr2" id="e3">n/a</td><td class="ctr1" id="f3">0</td><td class="ctr2" id="g3">1</td><td class="ctr1" id="h3">0</td><td class="ctr2" id="i3">1</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td><td class="ctr1" id="l3">0</td><td class="ctr2" id="m3">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.13.202504020838</span></div></body></html> <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="de"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>hhn.temp.project</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="index.html" class="el_class">Classes</a><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">GSE2TaskTracker</a> &gt; <span class="el_package">hhn.temp.project</span></div><h1>hhn.temp.project</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="m" onclick="toggleSort(this)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">0 of 320</td><td class="ctr2">100 %</td><td class="bar">0 of 40</td><td class="ctr2">100 %</td><td class="ctr1">0</td><td class="ctr2">40</td><td class="ctr1">0</td><td class="ctr2">83</td><td class="ctr1">0</td><td class="ctr2">20</td><td class="ctr1">0</td><td class="ctr2">4</td></tr></tfoot><tbody><tr><td id="a2"><a href="TaskManager.java.html" class="el_source">TaskManager.java</a></td><td class="bar" id="b0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="158" alt="158"/></td><td class="ctr2" id="c0">100 %</td><td class="bar" id="d0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="24" alt="24"/></td><td class="ctr2" id="e0">100 %</td><td class="ctr1" id="f0">0</td><td class="ctr2" id="g0">20</td><td class="ctr1" id="h0">0</td><td class="ctr2" id="i1">39</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k1">8</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr><tr><td id="a1"><a href="Task.java.html" class="el_source">Task.java</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="104" height="10" title="138" alt="138"/></td><td class="ctr2" id="c1">100 %</td><td class="bar" id="d1"><img src="../jacoco-resources/greenbar.gif" width="80" height="10" title="16" alt="16"/></td><td class="ctr2" id="e1">100 %</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g1">18</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i0">41</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k0">10</td><td class="ctr1" id="l1">0</td><td class="ctr2" id="m1">1</td></tr><tr><td id="a3"><a href="TaskStatus.java.html" class="el_source">TaskStatus.java</a></td><td class="bar" id="b2"><img src="../jacoco-resources/greenbar.gif" width="15" height="10" title="21" alt="21"/></td><td class="ctr2" id="c2">100 %</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">0</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">0</td><td class="ctr2" id="i2">2</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td><td class="ctr1" id="l2">0</td><td class="ctr2" id="m2">1</td></tr><tr><td id="a0"><a href="Main.java.html" class="el_source">Main.java</a></td><td class="bar" id="b3"><img src="../jacoco-resources/greenbar.gif" width="2" height="10" title="3" alt="3"/></td><td class="ctr2" id="c3">100 %</td><td class="bar" id="d3"/><td class="ctr2" id="e3">n/a</td><td class="ctr1" id="f3">0</td><td class="ctr2" id="g3">1</td><td class="ctr1" id="h3">0</td><td class="ctr2" id="i3">1</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td><td class="ctr1" id="l3">0</td><td class="ctr2" id="m3">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.13.202504020838</span></div></body></html>

View File

@@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="de"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="jacoco-resources/report.gif" type="image/gif"/><title>GSE2TaskTracker</title><script type="text/javascript" src="jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="jacoco-sessions.html" class="el_session">Sessions</a></span><span class="el_report">GSE2TaskTracker</span></div><h1>GSE2TaskTracker</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="m" onclick="toggleSort(this)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">0 of 338</td><td class="ctr2">100 %</td><td class="bar">0 of 38</td><td class="ctr2">100 %</td><td class="ctr1">0</td><td class="ctr2">46</td><td class="ctr1">0</td><td class="ctr2">78</td><td class="ctr1">0</td><td class="ctr2">27</td><td class="ctr1">0</td><td class="ctr2">6</td></tr></tfoot><tbody><tr><td id="a0"><a href="hhn.temp.project/index.html" class="el_package">hhn.temp.project</a></td><td class="bar" id="b0"><img src="jacoco-resources/greenbar.gif" width="120" height="10" title="330" alt="330"/></td><td class="ctr2" id="c0">100 %</td><td class="bar" id="d0"><img src="jacoco-resources/greenbar.gif" width="120" height="10" title="38" alt="38"/></td><td class="ctr2" id="e0">100 %</td><td class="ctr1" id="f0">0</td><td class="ctr2" id="g0">44</td><td class="ctr1" id="h0">0</td><td class="ctr2" id="i0">74</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">25</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">4</td></tr><tr><td id="a1"><a href="hhn.temp.project.expections/index.html" class="el_package">hhn.temp.project.expections</a></td><td class="bar" id="b1"><img src="jacoco-resources/greenbar.gif" width="2" height="10" title="8" alt="8"/></td><td class="ctr2" id="c1">100 %</td><td class="bar" id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g1">2</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i1">4</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">2</td><td class="ctr1" id="l1">0</td><td class="ctr2" id="m1">2</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.13.202504020838</span></div></body></html> <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="de"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="jacoco-resources/report.gif" type="image/gif"/><title>GSE2TaskTracker</title><script type="text/javascript" src="jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="jacoco-sessions.html" class="el_session">Sessions</a></span><span class="el_report">GSE2TaskTracker</span></div><h1>GSE2TaskTracker</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="m" onclick="toggleSort(this)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">97 of 695</td><td class="ctr2">86 %</td><td class="bar">3 of 48</td><td class="ctr2">93 %</td><td class="ctr1">5</td><td class="ctr2">63</td><td class="ctr1">31</td><td class="ctr2">193</td><td class="ctr1">2</td><td class="ctr2">39</td><td class="ctr1">2</td><td class="ctr2">10</td></tr></tfoot><tbody><tr><td id="a2"><a href="hhn.temp.project.provider/index.html" class="el_package">hhn.temp.project.provider</a></td><td class="bar" id="b0"><img src="jacoco-resources/redbar.gif" width="30" height="10" title="89" alt="89"/><img src="jacoco-resources/greenbar.gif" width="89" height="10" title="266" alt="266"/></td><td class="ctr2" id="c1">74 %</td><td class="bar" id="d0"><img src="jacoco-resources/redbar.gif" width="9" height="10" title="3" alt="3"/><img src="jacoco-resources/greenbar.gif" width="15" height="10" title="5" alt="5"/></td><td class="ctr2" id="e1">62 %</td><td class="ctr1" id="f0">3</td><td class="ctr2" id="g1">18</td><td class="ctr1" id="h0">27</td><td class="ctr2" id="i0">100</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">14</td><td class="ctr1" id="l1">0</td><td class="ctr2" id="m2">1</td></tr><tr><td id="a1"><a href="hhn.temp.project.expections/index.html" class="el_package">hhn.temp.project.expections</a></td><td class="bar" id="b1"><img src="jacoco-resources/redbar.gif" width="2" height="10" title="8" alt="8"/><img src="jacoco-resources/greenbar.gif" width="4" height="10" title="12" alt="12"/></td><td class="ctr2" id="c2">60 %</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f1">2</td><td class="ctr2" id="g2">5</td><td class="ctr1" id="h1">4</td><td class="ctr2" id="i2">10</td><td class="ctr1" id="j0">2</td><td class="ctr2" id="k2">5</td><td class="ctr1" id="l0">2</td><td class="ctr2" id="m0">5</td></tr><tr><td id="a0"><a href="hhn.temp.project/index.html" class="el_package">hhn.temp.project</a></td><td class="bar" id="b2"><img src="jacoco-resources/greenbar.gif" width="108" height="10" title="320" alt="320"/></td><td class="ctr2" id="c0">100 %</td><td class="bar" id="d1"><img src="jacoco-resources/greenbar.gif" width="120" height="10" title="40" alt="40"/></td><td class="ctr2" id="e0">100 %</td><td class="ctr1" id="f2">0</td><td class="ctr2" id="g0">40</td><td class="ctr1" id="h2">0</td><td class="ctr2" id="i1">83</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k0">20</td><td class="ctr1" id="l2">0</td><td class="ctr2" id="m1">4</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.13.202504020838</span></div></body></html>

File diff suppressed because one or more lines are too long

View File

@@ -650,7 +650,7 @@ code + .copy-button {
<script type="text/javascript"> <script type="text/javascript">
function configurationCacheProblems() { return ( function configurationCacheProblems() { return (
// begin-report-data // 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 ('destination = <value>') instead."}]]},{"locations":[{}],"problem":[{"text":"The Report.destination property has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This is scheduled to be removed in Gradle 9.0."}],"contextualLabel":"The Report.destination property has been deprecated.","documentationLink":"https://docs.gradle.org/8.14/dsl/org.gradle.api.reporting.Report.html#org.gradle.api.reporting.Report:destination","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"the-report-destination-property-has-been-deprecated","displayName":"The Report.destination property has been deprecated."}],"solutions":[[{"text":"Please use the outputLocation property instead."}]]}],"problemsReport":{"totalProblemCount":2,"buildName":"GSE2TaskTracker","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 ('destination = <value>') instead."}]]},{"locations":[{}],"problem":[{"text":"The Report.destination property has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This is scheduled to be removed in Gradle 9.0."}],"contextualLabel":"The Report.destination property has been deprecated.","documentationLink":"https://docs.gradle.org/8.14/dsl/org.gradle.api.reporting.Report.html#org.gradle.api.reporting.Report:destination","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"the-report-destination-property-has-been-deprecated","displayName":"The Report.destination property has been deprecated."}],"solutions":[[{"text":"Please use the outputLocation property instead."}]]}],"problemsReport":{"totalProblemCount":2,"buildName":"GSE2TaskTracker","requestedTasks":":test","documentationLink":"https://docs.gradle.org/8.14/userguide/reporting_problems.html","documentationLinkCaption":"Problem report","summaries":[]}}
// end-report-data // end-report-data
);} );}
</script> </script>

View File

@@ -23,13 +23,13 @@
<tr> <tr>
<td> <td>
<div class="infoBox" id="tests"> <div class="infoBox" id="tests">
<div class="counter">6</div> <div class="counter">7</div>
<p>tests</p> <p>tests</p>
</div> </div>
</td> </td>
<td> <td>
<div class="infoBox" id="failures"> <div class="infoBox" id="failures">
<div class="counter">0</div> <div class="counter">6</div>
<p>failures</p> <p>failures</p>
</div> </div>
</td> </td>
@@ -41,7 +41,7 @@
</td> </td>
<td> <td>
<div class="infoBox" id="duration"> <div class="infoBox" id="duration">
<div class="counter">0.011s</div> <div class="counter">30.989s</div>
<p>duration</p> <p>duration</p>
</div> </div>
</td> </td>
@@ -50,8 +50,8 @@
</div> </div>
</td> </td>
<td> <td>
<div class="infoBox success" id="successRate"> <div class="infoBox failures" id="successRate">
<div class="percent">100%</div> <div class="percent">14%</div>
<p>successful</p> <p>successful</p>
</div> </div>
</td> </td>
@@ -61,10 +61,100 @@
<div class="tab-container"> <div class="tab-container">
<ul class="tabLinks"> <ul class="tabLinks">
<li> <li>
<a href="#">Failed tests</a>
</li>
<li>
<a href="#">Tests</a> <a href="#">Tests</a>
</li> </li>
</ul> </ul>
<div class="tab"> <div class="tab">
<h2>Failed tests</h2>
<div class="test">
<a name="assertExceptionOnCallingANonextistingTask()"></a>
<h3 class="failures">Assert an IllegalArgumentException when calling a non-Existing Task</h3>
<span class="code">
<pre>hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
at app//project.BadCaseTaskTest.assertExceptionOnCallingANonextistingTask(BadCaseTaskTest.java:85)
at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
</pre>
</span>
</div>
<div class="test">
<a name="assertExceptionOnCreateNewTask()"></a>
<h3 class="failures">Assert an IllegalArgumentException when you create a new Task with no or wrong Name, Description</h3>
<span class="code">
<pre>hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
at app//project.BadCaseTaskTest.assertExceptionOnCreateNewTask(BadCaseTaskTest.java:41)
at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
</pre>
</span>
</div>
<div class="test">
<a name="assertExceptionOnCreateNewTaskWithExitsName()"></a>
<h3 class="failures">Assert an IllegalArgumentException when you create a new Task with the same Name of a exits Task</h3>
<span class="code">
<pre>hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
at app//project.BadCaseTaskTest.assertExceptionOnCreateNewTaskWithExitsName(BadCaseTaskTest.java:56)
at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
</pre>
</span>
</div>
<div class="test">
<a name="assertExceptionOnDeletingTask()"></a>
<h3 class="failures">Assert an IllegalArgumentException when delete a existing Task with wrong arguments</h3>
<span class="code">
<pre>hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
at app//project.BadCaseTaskTest.assertExceptionOnDeletingTask(BadCaseTaskTest.java:101)
at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
</pre>
</span>
</div>
<div class="test">
<a name="assertExceptionOnEditATask()"></a>
<h3 class="failures">Assert an IllegalArgumentException when you edit a exits Task</h3>
<span class="code">
<pre>hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
at app//project.BadCaseTaskTest.assertExceptionOnEditATask(BadCaseTaskTest.java:69)
at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
</pre>
</span>
</div>
<div class="test">
<a name="assertExeptionBySetAndGetAuthorOfATask()"></a>
<h3 class="failures">Get a Exeption by setWorker and getWorker</h3>
<span class="code">
<pre>hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
at app//project.BadCaseTaskTest.assertExeptionBySetAndGetAuthorOfATask(BadCaseTaskTest.java:118)
at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
</pre>
</span>
</div>
</div>
<div class="tab">
<h2>Tests</h2> <h2>Tests</h2>
<table> <table>
<thead> <thead>
@@ -76,40 +166,46 @@
</tr> </tr>
</thead> </thead>
<tr> <tr>
<td class="success">Assert an IllegalArgumentException when calling a non-Existing Task</td> <td class="success">Create a new TaskManager and test Connecton</td>
<td class="success">assertExceptionOnCallingANonextistingTask()</td> <td class="success">assertCreateNewTaskManager()</td>
<td class="success">0s</td> <td class="success">4.103s</td>
<td class="success">passed</td> <td class="success">passed</td>
</tr> </tr>
<tr> <tr>
<td class="success">Assert an IllegalArgumentException when you create a new Task with no or wrong Name, Description</td> <td class="failures">Assert an IllegalArgumentException when calling a non-Existing Task</td>
<td class="success">assertExceptionOnCreateNewTask()</td> <td class="failures">assertExceptionOnCallingANonextistingTask()</td>
<td class="success">0.001s</td> <td class="failures">4.381s</td>
<td class="success">passed</td> <td class="failures">failed</td>
</tr> </tr>
<tr> <tr>
<td class="success">Assert an IllegalArgumentException when you create a new Task with the same Name of a exits Task</td> <td class="failures">Assert an IllegalArgumentException when you create a new Task with no or wrong Name, Description</td>
<td class="success">assertExceptionOnCreateNewTaskWithExitsName()</td> <td class="failures">assertExceptionOnCreateNewTask()</td>
<td class="success">0.001s</td> <td class="failures">4.102s</td>
<td class="success">passed</td> <td class="failures">failed</td>
</tr> </tr>
<tr> <tr>
<td class="success">Assert an IllegalArgumentException when delete a existing Task with wrong arguments</td> <td class="failures">Assert an IllegalArgumentException when you create a new Task with the same Name of a exits Task</td>
<td class="success">assertExceptionOnDeletingTask()</td> <td class="failures">assertExceptionOnCreateNewTaskWithExitsName()</td>
<td class="success">0.001s</td> <td class="failures">4.368s</td>
<td class="success">passed</td> <td class="failures">failed</td>
</tr> </tr>
<tr> <tr>
<td class="success">Assert an IllegalArgumentException when you edit a exits Task</td> <td class="failures">Assert an IllegalArgumentException when delete a existing Task with wrong arguments</td>
<td class="success">assertExceptionOnEditATask()</td> <td class="failures">assertExceptionOnDeletingTask()</td>
<td class="success">0.008s</td> <td class="failures">4.204s</td>
<td class="success">passed</td> <td class="failures">failed</td>
</tr> </tr>
<tr> <tr>
<td class="success">Get a Exeption by setWorker and getWorker</td> <td class="failures">Assert an IllegalArgumentException when you edit a exits Task</td>
<td class="success">assertExeptionBySetAndGetAuthorOfATask()</td> <td class="failures">assertExceptionOnEditATask()</td>
<td class="success">0s</td> <td class="failures">5.676s</td>
<td class="success">passed</td> <td class="failures">failed</td>
</tr>
<tr>
<td class="failures">Get a Exeption by setWorker and getWorker</td>
<td class="failures">assertExeptionBySetAndGetAuthorOfATask()</td>
<td class="failures">4.155s</td>
<td class="failures">failed</td>
</tr> </tr>
</table> </table>
</div> </div>
@@ -121,7 +217,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 03.12.2025, 18:31:10</p> <a href="https://www.gradle.org">Gradle 8.14</a> at 07.12.2025, 14:40:13</p>
</div> </div>
</div> </div>
</body> </body>

View File

@@ -23,13 +23,13 @@
<tr> <tr>
<td> <td>
<div class="infoBox" id="tests"> <div class="infoBox" id="tests">
<div class="counter">5</div> <div class="counter">6</div>
<p>tests</p> <p>tests</p>
</div> </div>
</td> </td>
<td> <td>
<div class="infoBox" id="failures"> <div class="infoBox" id="failures">
<div class="counter">0</div> <div class="counter">6</div>
<p>failures</p> <p>failures</p>
</div> </div>
</td> </td>
@@ -41,7 +41,7 @@
</td> </td>
<td> <td>
<div class="infoBox" id="duration"> <div class="infoBox" id="duration">
<div class="counter">0.003s</div> <div class="counter">24.847s</div>
<p>duration</p> <p>duration</p>
</div> </div>
</td> </td>
@@ -50,8 +50,8 @@
</div> </div>
</td> </td>
<td> <td>
<div class="infoBox success" id="successRate"> <div class="infoBox failures" id="successRate">
<div class="percent">100%</div> <div class="percent">0%</div>
<p>successful</p> <p>successful</p>
</div> </div>
</td> </td>
@@ -61,10 +61,109 @@
<div class="tab-container"> <div class="tab-container">
<ul class="tabLinks"> <ul class="tabLinks">
<li> <li>
<a href="#">Failed tests</a>
</li>
<li>
<a href="#">Tests</a> <a href="#">Tests</a>
</li> </li>
</ul> </ul>
<div class="tab"> <div class="tab">
<h2>Failed tests</h2>
<div class="test">
<a name="assertCheckTaskListForTask()"></a>
<h3 class="failures">Check TaskList if Task there</h3>
<span class="code">
<pre>hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
at app//project.GoodCaseTaskTest.assertCheckTaskListForTask(GoodCaseTaskTest.java:89)
at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
</pre>
</span>
</div>
<div class="test">
<a name="assertCreateNewTask()"></a>
<h3 class="failures">Create a new Task</h3>
<span class="code">
<pre>hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
at app//project.GoodCaseTaskTest.assertCreateNewTask(GoodCaseTaskTest.java:47)
at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
</pre>
</span>
</div>
<div class="test">
<a name="assertCreateNewTaskManager()"></a>
<h3 class="failures">Create a new TaskManager and test Connecton</h3>
<span class="code">
<pre>org.opentest4j.AssertionFailedError: Unexpected exception thrown: hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:152)
at app//org.junit.jupiter.api.AssertDoesNotThrow.createAssertionFailedError(AssertDoesNotThrow.java:84)
at app//org.junit.jupiter.api.AssertDoesNotThrow.assertDoesNotThrow(AssertDoesNotThrow.java:75)
at app//org.junit.jupiter.api.AssertDoesNotThrow.assertDoesNotThrow(AssertDoesNotThrow.java:58)
at app//org.junit.jupiter.api.Assertions.assertDoesNotThrow(Assertions.java:3224)
at app//project.GoodCaseTaskTest.assertCreateNewTaskManager(GoodCaseTaskTest.java:33)
at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
Caused by: hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
at app//project.GoodCaseTaskTest.lambda$assertCreateNewTaskManager$0(GoodCaseTaskTest.java:33)
at app//org.junit.jupiter.api.AssertDoesNotThrow.assertDoesNotThrow(AssertDoesNotThrow.java:71)
... 6 more
</pre>
</span>
</div>
<div class="test">
<a name="assertDeleteTask()"></a>
<h3 class="failures">Delete Task</h3>
<span class="code">
<pre>hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
at app//project.GoodCaseTaskTest.assertDeleteTask(GoodCaseTaskTest.java:63)
at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
</pre>
</span>
</div>
<div class="test">
<a name="assertEditATask()"></a>
<h3 class="failures">Edit Task</h3>
<span class="code">
<pre>hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
at app//project.GoodCaseTaskTest.assertEditATask(GoodCaseTaskTest.java:120)
at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
</pre>
</span>
</div>
<div class="test">
<a name="assertSetAuthorOfATask()"></a>
<h3 class="failures">Set Author of a Task</h3>
<span class="code">
<pre>hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
at app//project.GoodCaseTaskTest.assertSetAuthorOfATask(GoodCaseTaskTest.java:145)
at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
</pre>
</span>
</div>
</div>
<div class="tab">
<h2>Tests</h2> <h2>Tests</h2>
<table> <table>
<thead> <thead>
@@ -76,34 +175,40 @@
</tr> </tr>
</thead> </thead>
<tr> <tr>
<td class="success">Check TaskList if Task there</td> <td class="failures">Check TaskList if Task there</td>
<td class="success">assertCheckTaskListForTask()</td> <td class="failures">assertCheckTaskListForTask()</td>
<td class="success">0s</td> <td class="failures">4.108s</td>
<td class="success">passed</td> <td class="failures">failed</td>
</tr> </tr>
<tr> <tr>
<td class="success">Create a new Task</td> <td class="failures">Create a new Task</td>
<td class="success">assertCreateNewTask()</td> <td class="failures">assertCreateNewTask()</td>
<td class="success">0.001s</td> <td class="failures">4.096s</td>
<td class="success">passed</td> <td class="failures">failed</td>
</tr> </tr>
<tr> <tr>
<td class="success">Delete Task</td> <td class="failures">Create a new TaskManager and test Connecton</td>
<td class="success">assertDeleteTask()</td> <td class="failures">assertCreateNewTaskManager()</td>
<td class="success">0.001s</td> <td class="failures">4.345s</td>
<td class="success">passed</td> <td class="failures">failed</td>
</tr> </tr>
<tr> <tr>
<td class="success">Edit Task</td> <td class="failures">Delete Task</td>
<td class="success">assertEditATask()</td> <td class="failures">assertDeleteTask()</td>
<td class="success">0.001s</td> <td class="failures">4.094s</td>
<td class="success">passed</td> <td class="failures">failed</td>
</tr> </tr>
<tr> <tr>
<td class="success">Set Author of a Task</td> <td class="failures">Edit Task</td>
<td class="success">assertSetAuthorOfATask()</td> <td class="failures">assertEditATask()</td>
<td class="success">0s</td> <td class="failures">4.092s</td>
<td class="success">passed</td> <td class="failures">failed</td>
</tr>
<tr>
<td class="failures">Set Author of a Task</td>
<td class="failures">assertSetAuthorOfATask()</td>
<td class="failures">4.112s</td>
<td class="failures">failed</td>
</tr> </tr>
</table> </table>
</div> </div>
@@ -115,7 +220,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 03.12.2025, 18:31:10</p> <a href="https://www.gradle.org">Gradle 8.14</a> at 07.12.2025, 14:40:13</p>
</div> </div>
</div> </div>
</body> </body>

View File

@@ -20,13 +20,13 @@
<tr> <tr>
<td> <td>
<div class="infoBox" id="tests"> <div class="infoBox" id="tests">
<div class="counter">11</div> <div class="counter">13</div>
<p>tests</p> <p>tests</p>
</div> </div>
</td> </td>
<td> <td>
<div class="infoBox" id="failures"> <div class="infoBox" id="failures">
<div class="counter">0</div> <div class="counter">12</div>
<p>failures</p> <p>failures</p>
</div> </div>
</td> </td>
@@ -38,7 +38,7 @@
</td> </td>
<td> <td>
<div class="infoBox" id="duration"> <div class="infoBox" id="duration">
<div class="counter">0.014s</div> <div class="counter">55.836s</div>
<p>duration</p> <p>duration</p>
</div> </div>
</td> </td>
@@ -47,8 +47,8 @@
</div> </div>
</td> </td>
<td> <td>
<div class="infoBox success" id="successRate"> <div class="infoBox failures" id="successRate">
<div class="percent">100%</div> <div class="percent">7%</div>
<p>successful</p> <p>successful</p>
</div> </div>
</td> </td>
@@ -58,6 +58,9 @@
<div class="tab-container"> <div class="tab-container">
<ul class="tabLinks"> <ul class="tabLinks">
<li> <li>
<a href="#">Failed tests</a>
</li>
<li>
<a href="#">Packages</a> <a href="#">Packages</a>
</li> </li>
<li> <li>
@@ -65,6 +68,59 @@
</li> </li>
</ul> </ul>
<div class="tab"> <div class="tab">
<h2>Failed tests</h2>
<ul class="linkList">
<li>
<a href="classes/project.BadCaseTaskTest.html">BadCaseTaskTest</a>.
<a href="classes/project.BadCaseTaskTest.html#assertExceptionOnCallingANonextistingTask()">Assert an IllegalArgumentException when calling a non-Existing Task</a>
</li>
<li>
<a href="classes/project.BadCaseTaskTest.html">BadCaseTaskTest</a>.
<a href="classes/project.BadCaseTaskTest.html#assertExceptionOnCreateNewTask()">Assert an IllegalArgumentException when you create a new Task with no or wrong Name, Description</a>
</li>
<li>
<a href="classes/project.BadCaseTaskTest.html">BadCaseTaskTest</a>.
<a href="classes/project.BadCaseTaskTest.html#assertExceptionOnCreateNewTaskWithExitsName()">Assert an IllegalArgumentException when you create a new Task with the same Name of a exits Task</a>
</li>
<li>
<a href="classes/project.BadCaseTaskTest.html">BadCaseTaskTest</a>.
<a href="classes/project.BadCaseTaskTest.html#assertExceptionOnDeletingTask()">Assert an IllegalArgumentException when delete a existing Task with wrong arguments</a>
</li>
<li>
<a href="classes/project.BadCaseTaskTest.html">BadCaseTaskTest</a>.
<a href="classes/project.BadCaseTaskTest.html#assertExceptionOnEditATask()">Assert an IllegalArgumentException when you edit a exits Task</a>
</li>
<li>
<a href="classes/project.BadCaseTaskTest.html">BadCaseTaskTest</a>.
<a href="classes/project.BadCaseTaskTest.html#assertExeptionBySetAndGetAuthorOfATask()">Get a Exeption by setWorker and getWorker</a>
</li>
<li>
<a href="classes/project.GoodCaseTaskTest.html">GoodCaseTaskTest</a>.
<a href="classes/project.GoodCaseTaskTest.html#assertCheckTaskListForTask()">Check TaskList if Task there</a>
</li>
<li>
<a href="classes/project.GoodCaseTaskTest.html">GoodCaseTaskTest</a>.
<a href="classes/project.GoodCaseTaskTest.html#assertCreateNewTask()">Create a new Task</a>
</li>
<li>
<a href="classes/project.GoodCaseTaskTest.html">GoodCaseTaskTest</a>.
<a href="classes/project.GoodCaseTaskTest.html#assertCreateNewTaskManager()">Create a new TaskManager and test Connecton</a>
</li>
<li>
<a href="classes/project.GoodCaseTaskTest.html">GoodCaseTaskTest</a>.
<a href="classes/project.GoodCaseTaskTest.html#assertDeleteTask()">Delete Task</a>
</li>
<li>
<a href="classes/project.GoodCaseTaskTest.html">GoodCaseTaskTest</a>.
<a href="classes/project.GoodCaseTaskTest.html#assertEditATask()">Edit Task</a>
</li>
<li>
<a href="classes/project.GoodCaseTaskTest.html">GoodCaseTaskTest</a>.
<a href="classes/project.GoodCaseTaskTest.html#assertSetAuthorOfATask()">Set Author of a Task</a>
</li>
</ul>
</div>
<div class="tab">
<h2>Packages</h2> <h2>Packages</h2>
<table> <table>
<thead> <thead>
@@ -79,14 +135,14 @@
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td class="success"> <td class="failures">
<a href="packages/project.html">project</a> <a href="packages/project.html">project</a>
</td> </td>
<td>11</td> <td>13</td>
<td>12</td>
<td>0</td> <td>0</td>
<td>0</td> <td>55.836s</td>
<td>0.014s</td> <td class="failures">7%</td>
<td class="success">100%</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -106,24 +162,24 @@
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td class="success"> <td class="failures">
<a href="classes/project.BadCaseTaskTest.html">project.BadCaseTaskTest</a> <a href="classes/project.BadCaseTaskTest.html">project.BadCaseTaskTest</a>
</td> </td>
<td>7</td>
<td>6</td> <td>6</td>
<td>0</td> <td>0</td>
<td>0</td> <td>30.989s</td>
<td>0.011s</td> <td class="failures">14%</td>
<td class="success">100%</td>
</tr> </tr>
<tr> <tr>
<td class="success"> <td class="failures">
<a href="classes/project.GoodCaseTaskTest.html">project.GoodCaseTaskTest</a> <a href="classes/project.GoodCaseTaskTest.html">project.GoodCaseTaskTest</a>
</td> </td>
<td>5</td> <td>6</td>
<td>6</td>
<td>0</td> <td>0</td>
<td>0</td> <td>24.847s</td>
<td>0.003s</td> <td class="failures">0%</td>
<td class="success">100%</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -136,7 +192,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 03.12.2025, 18:31:10</p> <a href="https://www.gradle.org">Gradle 8.14</a> at 07.12.2025, 14:40:13</p>
</div> </div>
</div> </div>
</body> </body>

View File

@@ -22,13 +22,13 @@
<tr> <tr>
<td> <td>
<div class="infoBox" id="tests"> <div class="infoBox" id="tests">
<div class="counter">11</div> <div class="counter">13</div>
<p>tests</p> <p>tests</p>
</div> </div>
</td> </td>
<td> <td>
<div class="infoBox" id="failures"> <div class="infoBox" id="failures">
<div class="counter">0</div> <div class="counter">12</div>
<p>failures</p> <p>failures</p>
</div> </div>
</td> </td>
@@ -40,7 +40,7 @@
</td> </td>
<td> <td>
<div class="infoBox" id="duration"> <div class="infoBox" id="duration">
<div class="counter">0.014s</div> <div class="counter">55.836s</div>
<p>duration</p> <p>duration</p>
</div> </div>
</td> </td>
@@ -49,8 +49,8 @@
</div> </div>
</td> </td>
<td> <td>
<div class="infoBox success" id="successRate"> <div class="infoBox failures" id="successRate">
<div class="percent">100%</div> <div class="percent">7%</div>
<p>successful</p> <p>successful</p>
</div> </div>
</td> </td>
@@ -60,10 +60,66 @@
<div class="tab-container"> <div class="tab-container">
<ul class="tabLinks"> <ul class="tabLinks">
<li> <li>
<a href="#">Failed tests</a>
</li>
<li>
<a href="#">Classes</a> <a href="#">Classes</a>
</li> </li>
</ul> </ul>
<div class="tab"> <div class="tab">
<h2>Failed tests</h2>
<ul class="linkList">
<li>
<a href="../classes/project.BadCaseTaskTest.html">BadCaseTaskTest</a>.
<a href="../classes/project.BadCaseTaskTest.html#assertExceptionOnCallingANonextistingTask()">Assert an IllegalArgumentException when calling a non-Existing Task</a>
</li>
<li>
<a href="../classes/project.BadCaseTaskTest.html">BadCaseTaskTest</a>.
<a href="../classes/project.BadCaseTaskTest.html#assertExceptionOnCreateNewTask()">Assert an IllegalArgumentException when you create a new Task with no or wrong Name, Description</a>
</li>
<li>
<a href="../classes/project.BadCaseTaskTest.html">BadCaseTaskTest</a>.
<a href="../classes/project.BadCaseTaskTest.html#assertExceptionOnCreateNewTaskWithExitsName()">Assert an IllegalArgumentException when you create a new Task with the same Name of a exits Task</a>
</li>
<li>
<a href="../classes/project.BadCaseTaskTest.html">BadCaseTaskTest</a>.
<a href="../classes/project.BadCaseTaskTest.html#assertExceptionOnDeletingTask()">Assert an IllegalArgumentException when delete a existing Task with wrong arguments</a>
</li>
<li>
<a href="../classes/project.BadCaseTaskTest.html">BadCaseTaskTest</a>.
<a href="../classes/project.BadCaseTaskTest.html#assertExceptionOnEditATask()">Assert an IllegalArgumentException when you edit a exits Task</a>
</li>
<li>
<a href="../classes/project.BadCaseTaskTest.html">BadCaseTaskTest</a>.
<a href="../classes/project.BadCaseTaskTest.html#assertExeptionBySetAndGetAuthorOfATask()">Get a Exeption by setWorker and getWorker</a>
</li>
<li>
<a href="../classes/project.GoodCaseTaskTest.html">GoodCaseTaskTest</a>.
<a href="../classes/project.GoodCaseTaskTest.html#assertCheckTaskListForTask()">Check TaskList if Task there</a>
</li>
<li>
<a href="../classes/project.GoodCaseTaskTest.html">GoodCaseTaskTest</a>.
<a href="../classes/project.GoodCaseTaskTest.html#assertCreateNewTask()">Create a new Task</a>
</li>
<li>
<a href="../classes/project.GoodCaseTaskTest.html">GoodCaseTaskTest</a>.
<a href="../classes/project.GoodCaseTaskTest.html#assertCreateNewTaskManager()">Create a new TaskManager and test Connecton</a>
</li>
<li>
<a href="../classes/project.GoodCaseTaskTest.html">GoodCaseTaskTest</a>.
<a href="../classes/project.GoodCaseTaskTest.html#assertDeleteTask()">Delete Task</a>
</li>
<li>
<a href="../classes/project.GoodCaseTaskTest.html">GoodCaseTaskTest</a>.
<a href="../classes/project.GoodCaseTaskTest.html#assertEditATask()">Edit Task</a>
</li>
<li>
<a href="../classes/project.GoodCaseTaskTest.html">GoodCaseTaskTest</a>.
<a href="../classes/project.GoodCaseTaskTest.html#assertSetAuthorOfATask()">Set Author of a Task</a>
</li>
</ul>
</div>
<div class="tab">
<h2>Classes</h2> <h2>Classes</h2>
<table> <table>
<thead> <thead>
@@ -77,24 +133,24 @@
</tr> </tr>
</thead> </thead>
<tr> <tr>
<td class="success"> <td class="failures">
<a href="../classes/project.BadCaseTaskTest.html">BadCaseTaskTest</a> <a href="../classes/project.BadCaseTaskTest.html">BadCaseTaskTest</a>
</td> </td>
<td>7</td>
<td>6</td> <td>6</td>
<td>0</td> <td>0</td>
<td>0</td> <td>30.989s</td>
<td>0.011s</td> <td class="failures">14%</td>
<td class="success">100%</td>
</tr> </tr>
<tr> <tr>
<td class="success"> <td class="failures">
<a href="../classes/project.GoodCaseTaskTest.html">GoodCaseTaskTest</a> <a href="../classes/project.GoodCaseTaskTest.html">GoodCaseTaskTest</a>
</td> </td>
<td>5</td> <td>6</td>
<td>6</td>
<td>0</td> <td>0</td>
<td>0</td> <td>24.847s</td>
<td>0.003s</td> <td class="failures">0%</td>
<td class="success">100%</td>
</tr> </tr>
</table> </table>
</div> </div>
@@ -106,7 +162,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 03.12.2025, 18:31:10</p> <a href="https://www.gradle.org">Gradle 8.14</a> at 07.12.2025, 14:40:13</p>
</div> </div>
</div> </div>
</body> </body>

View File

@@ -1,12 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<testsuite name="project.BadCaseTaskTest" tests="6" skipped="0" failures="0" errors="0" timestamp="2025-12-03T17:31:10.173Z" hostname="Mac.fritz.box" time="0.012"> <testsuite name="project.BadCaseTaskTest" tests="7" skipped="0" failures="6" errors="0" timestamp="2025-12-07T13:39:17.658Z" hostname="Mac.fritz.box" time="30.995">
<properties/> <properties/>
<testcase name="Assert an IllegalArgumentException when you edit a exits Task" classname="project.BadCaseTaskTest" time="0.008"/> <testcase name="Assert an IllegalArgumentException when you edit a exits Task" classname="project.BadCaseTaskTest" time="5.676">
<testcase name="Assert an IllegalArgumentException when you create a new Task with no or wrong Name, Description" classname="project.BadCaseTaskTest" time="0.001"/> <failure message="hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)" type="hhn.temp.project.expections.SQLNoConectionException">hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
<testcase name="Assert an IllegalArgumentException when you create a new Task with the same Name of a exits Task" classname="project.BadCaseTaskTest" time="0.001"/> at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
<testcase name="Assert an IllegalArgumentException when delete a existing Task with wrong arguments" classname="project.BadCaseTaskTest" time="0.001"/> at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
<testcase name="Get a Exeption by setWorker and getWorker" classname="project.BadCaseTaskTest" time="0.0"/> at app//project.BadCaseTaskTest.assertExceptionOnEditATask(BadCaseTaskTest.java:69)
<testcase name="Assert an IllegalArgumentException when calling a non-Existing Task" classname="project.BadCaseTaskTest" time="0.0"/> at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
</failure>
</testcase>
<testcase name="Create a new TaskManager and test Connecton" classname="project.BadCaseTaskTest" time="4.103"/>
<testcase name="Assert an IllegalArgumentException when you create a new Task with no or wrong Name, Description" classname="project.BadCaseTaskTest" time="4.102">
<failure message="hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)" type="hhn.temp.project.expections.SQLNoConectionException">hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
at app//project.BadCaseTaskTest.assertExceptionOnCreateNewTask(BadCaseTaskTest.java:41)
at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
</failure>
</testcase>
<testcase name="Assert an IllegalArgumentException when you create a new Task with the same Name of a exits Task" classname="project.BadCaseTaskTest" time="4.368">
<failure message="hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)" type="hhn.temp.project.expections.SQLNoConectionException">hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
at app//project.BadCaseTaskTest.assertExceptionOnCreateNewTaskWithExitsName(BadCaseTaskTest.java:56)
at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
</failure>
</testcase>
<testcase name="Assert an IllegalArgumentException when delete a existing Task with wrong arguments" classname="project.BadCaseTaskTest" time="4.204">
<failure message="hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)" type="hhn.temp.project.expections.SQLNoConectionException">hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
at app//project.BadCaseTaskTest.assertExceptionOnDeletingTask(BadCaseTaskTest.java:101)
at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
</failure>
</testcase>
<testcase name="Get a Exeption by setWorker and getWorker" classname="project.BadCaseTaskTest" time="4.155">
<failure message="hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)" type="hhn.temp.project.expections.SQLNoConectionException">hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
at app//project.BadCaseTaskTest.assertExeptionBySetAndGetAuthorOfATask(BadCaseTaskTest.java:118)
at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
</failure>
</testcase>
<testcase name="Assert an IllegalArgumentException when calling a non-Existing Task" classname="project.BadCaseTaskTest" time="4.381">
<failure message="hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)" type="hhn.temp.project.expections.SQLNoConectionException">hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
at app//project.BadCaseTaskTest.assertExceptionOnCallingANonextistingTask(BadCaseTaskTest.java:85)
at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
</failure>
</testcase>
<system-out><![CDATA[]]></system-out> <system-out><![CDATA[]]></system-out>
<system-err><![CDATA[]]></system-err> <system-err><![CDATA[]]></system-err>
</testsuite> </testsuite>

View File

@@ -1,11 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<testsuite name="project.GoodCaseTaskTest" tests="5" skipped="0" failures="0" errors="0" timestamp="2025-12-03T17:31:10.186Z" hostname="Mac.fritz.box" time="0.003"> <testsuite name="project.GoodCaseTaskTest" tests="6" skipped="0" failures="6" errors="0" timestamp="2025-12-07T13:39:48.657Z" hostname="Mac.fritz.box" time="24.852">
<properties/> <properties/>
<testcase name="Edit Task" classname="project.GoodCaseTaskTest" time="0.001"/> <testcase name="Create a new TaskManager and test Connecton" classname="project.GoodCaseTaskTest" time="4.345">
<testcase name="Create a new Task" classname="project.GoodCaseTaskTest" time="0.001"/> <failure message="org.opentest4j.AssertionFailedError: Unexpected exception thrown: hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)" type="org.opentest4j.AssertionFailedError">org.opentest4j.AssertionFailedError: Unexpected exception thrown: hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
<testcase name="Check TaskList if Task there" classname="project.GoodCaseTaskTest" time="0.0"/> at app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:152)
<testcase name="Delete Task" classname="project.GoodCaseTaskTest" time="0.001"/> at app//org.junit.jupiter.api.AssertDoesNotThrow.createAssertionFailedError(AssertDoesNotThrow.java:84)
<testcase name="Set Author of a Task" classname="project.GoodCaseTaskTest" time="0.0"/> at app//org.junit.jupiter.api.AssertDoesNotThrow.assertDoesNotThrow(AssertDoesNotThrow.java:75)
at app//org.junit.jupiter.api.AssertDoesNotThrow.assertDoesNotThrow(AssertDoesNotThrow.java:58)
at app//org.junit.jupiter.api.Assertions.assertDoesNotThrow(Assertions.java:3224)
at app//project.GoodCaseTaskTest.assertCreateNewTaskManager(GoodCaseTaskTest.java:33)
at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
Caused by: hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
at app//project.GoodCaseTaskTest.lambda$assertCreateNewTaskManager$0(GoodCaseTaskTest.java:33)
at app//org.junit.jupiter.api.AssertDoesNotThrow.assertDoesNotThrow(AssertDoesNotThrow.java:71)
... 6 more
</failure>
</testcase>
<testcase name="Edit Task" classname="project.GoodCaseTaskTest" time="4.092">
<failure message="hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)" type="hhn.temp.project.expections.SQLNoConectionException">hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
at app//project.GoodCaseTaskTest.assertEditATask(GoodCaseTaskTest.java:120)
at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
</failure>
</testcase>
<testcase name="Create a new Task" classname="project.GoodCaseTaskTest" time="4.096">
<failure message="hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)" type="hhn.temp.project.expections.SQLNoConectionException">hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
at app//project.GoodCaseTaskTest.assertCreateNewTask(GoodCaseTaskTest.java:47)
at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
</failure>
</testcase>
<testcase name="Check TaskList if Task there" classname="project.GoodCaseTaskTest" time="4.108">
<failure message="hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)" type="hhn.temp.project.expections.SQLNoConectionException">hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
at app//project.GoodCaseTaskTest.assertCheckTaskListForTask(GoodCaseTaskTest.java:89)
at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
</failure>
</testcase>
<testcase name="Delete Task" classname="project.GoodCaseTaskTest" time="4.094">
<failure message="hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)" type="hhn.temp.project.expections.SQLNoConectionException">hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
at app//project.GoodCaseTaskTest.assertDeleteTask(GoodCaseTaskTest.java:63)
at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
</failure>
</testcase>
<testcase name="Set Author of a Task" classname="project.GoodCaseTaskTest" time="4.112">
<failure message="hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)" type="hhn.temp.project.expections.SQLNoConectionException">hhn.temp.project.expections.SQLNoConectionException: Cant connect to the database (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
at app//hhn.temp.project.provider.MySql.connect(MySql.java:35)
at app//hhn.temp.project.TaskManager.&lt;init&gt;(TaskManager.java:19)
at app//project.GoodCaseTaskTest.assertSetAuthorOfATask(GoodCaseTaskTest.java:145)
at java.base@17.0.16/java.lang.reflect.Method.invoke(Method.java:569)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base@17.0.16/java.util.ArrayList.forEach(ArrayList.java:1511)
</failure>
</testcase>
<system-out><![CDATA[]]></system-out> <system-out><![CDATA[]]></system-out>
<system-err><![CDATA[]]></system-err> <system-err><![CDATA[]]></system-err>
</testsuite> </testsuite>

9
schema.sql Normal file
View File

@@ -0,0 +1,9 @@
CREATE TABLE `task` (
`taskID` int(11) NOT NULL,
`taskName` varchar(255) NOT NULL,
`taskDescription` varchar(255) NOT NULL,
`taskStatus` enum('OPEN','CLOSED','INPROCESS','') NOT NULL DEFAULT 'OPEN',
`taskWorker` varchar(255) DEFAULT NULL,
`createdDate` timestamp NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`taskID`)
);

View File

@@ -1,6 +1,7 @@
package hhn.temp.project; package hhn.temp.project;
import hhn.temp.project.expections.TaskHasNoWorkerException; import hhn.temp.project.expections.TaskHasNoWorkerException;
import hhn.temp.project.provider.MySql;
public class Task { public class Task {
@@ -8,17 +9,17 @@ public class Task {
private String description; private String description;
private TaskStatus taskStatus; private TaskStatus taskStatus;
private int taskID; private int taskID;
private static int idCounter = 0;
private String workername; private String workername;
private MySql mySql;
public Task(String name, String description) { public Task(int id, String name, String description, String workername, TaskStatus status, MySql mySql) {
this.taskID = id;
this.name = name; this.name = name;
this.description = description; this.description = description;
this.taskStatus = TaskStatus.OPEN; this.taskStatus = status;
//TODO when DB then auto IDs this.workername = workername;
this.taskID = idCounter++; this.mySql = mySql;
} }
public int getTaskID() { public int getTaskID() {
@@ -43,6 +44,7 @@ public class Task {
throw new IllegalArgumentException("Description is null!"); throw new IllegalArgumentException("Description is null!");
} }
this.mySql.updateDescription(taskID, description);
this.description = description; this.description = description;
} }
@@ -52,6 +54,7 @@ public class Task {
throw new IllegalArgumentException("TaskStatus is null!"); throw new IllegalArgumentException("TaskStatus is null!");
} }
this.mySql.updateStatus(taskID, taskStatus);
this.taskStatus = taskStatus; this.taskStatus = taskStatus;
} }
@@ -62,6 +65,9 @@ public class Task {
if(!checkOnlyLetter(workerName)){ if(!checkOnlyLetter(workerName)){
throw new IllegalArgumentException("Only Lettery as Worker Name!"); throw new IllegalArgumentException("Only Lettery as Worker Name!");
} }
this.mySql.updateStatus(taskID, TaskStatus.INPROCESS);
this.mySql.updateWorker(taskID, workerName);
this.workername = workerName; this.workername = workerName;
this.setStatus(TaskStatus.INPROCESS); this.setStatus(TaskStatus.INPROCESS);
} }

View File

@@ -1,6 +1,7 @@
package hhn.temp.project; package hhn.temp.project;
import hhn.temp.project.expections.TaskAlreadyExistsException; import hhn.temp.project.expections.TaskAlreadyExistsException;
import hhn.temp.project.provider.MySql;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@@ -10,9 +11,18 @@ import java.util.Map;
public class TaskManager { public class TaskManager {
private Map<Integer, Task> taskMap; private Map<Integer, Task> taskMap;
private MySql mysql;
public TaskManager() { public TaskManager(String user, String password, String port, String host) {
taskMap = new HashMap<>(); taskMap = new HashMap<>();
this.mysql = new MySql(user, password, port, host);
this.mysql.connect();
}
/**
* only for Testing
*/
public void resetTest() {
this.mysql.reset();
} }
public Task createTask(String name, String description) { public Task createTask(String name, String description) {
@@ -28,31 +38,35 @@ public class TaskManager {
throw new IllegalArgumentException("Only Letters or Digit are allowed in the name: " + name); throw new IllegalArgumentException("Only Letters or Digit are allowed in the name: " + name);
} }
boolean taskExited = this.mysql.existTask(name);
boolean taskExited = this.taskMap.values().stream().anyMatch(task -> task.getName().equals(name));
if(taskExited) { if(taskExited) {
throw new TaskAlreadyExistsException("Task already exits, with the name: " + name); throw new TaskAlreadyExistsException("Task already exits, with the name: " + name);
} }
int taskId = this.mysql.createTask(name, description);
Task task = this.mysql.getTask(taskId);
Task task = new Task(name, description); //taskMap.put(task.getTaskID(), task);
taskMap.put(task.getTaskID(), task);
return task; return task;
} }
public List<Task> getTaskList() { public List<Task> getTaskList() {
return new ArrayList<>(this.taskMap.values());
return this.mysql.getTaskList();
} }
public Task getTask(String name) { public Task getTask(String name) {
return taskMap.values().stream().filter(t -> t.getName().equals(name)).findFirst() if(!this.mysql.existTask(name)) {
.orElseThrow(() -> new IllegalArgumentException("Wrong name")); throw new IllegalArgumentException("Wrong name");
}
return this.mysql.getTask(name);
} }
public Task getTask(int taskID) { public Task getTask(int taskID) {
if(!this.taskMap.containsKey(taskID)) { if(!this.mysql.existTask(taskID)) {
throw new IllegalArgumentException("Wrong id"); throw new IllegalArgumentException("Wrong id");
} }
return this.taskMap.get(taskID); return this.mysql.getTask(taskID);
} }
public void deleteTask(String name) { public void deleteTask(String name) {
@@ -60,12 +74,11 @@ public class TaskManager {
throw new IllegalArgumentException("Name is null!"); throw new IllegalArgumentException("Name is null!");
} }
if(name.isEmpty() || this.taskMap.values().stream().noneMatch(t -> t.getName().equals(name))) { if(name.isEmpty() || !this.mysql.existTask(name)) {
throw new IllegalArgumentException("Wrong name!"); throw new IllegalArgumentException("Wrong name!");
} }
this.taskMap.remove(this.taskMap.values().stream().filter(t -> t.getName().equals(name)).findFirst() this.mysql.deleteTask(name);
.orElseThrow().getTaskID());
} }

View File

@@ -0,0 +1,9 @@
package hhn.temp.project.expections;
public class SQLNoConectionException extends RuntimeException {
public SQLNoConectionException(String message, Exception e) {
super(message + " ("+ e.getMessage()+")");
}
}

View File

@@ -0,0 +1,9 @@
package hhn.temp.project.expections;
public class SQLStatmentException extends RuntimeException {
public SQLStatmentException(String message) {
super(message);
}
}

View File

@@ -0,0 +1,9 @@
package hhn.temp.project.expections;
public class TaskNotExistsException extends RuntimeException {
public TaskNotExistsException(String message) {
super(message);
}
}

View File

@@ -0,0 +1,226 @@
package hhn.temp.project.provider;
import hhn.temp.project.Task;
import hhn.temp.project.TaskStatus;
import hhn.temp.project.expections.SQLNoConectionException;
import hhn.temp.project.expections.SQLStatmentException;
import hhn.temp.project.expections.TaskNotExistsException;
import java.sql.*;
import java.util.ArrayList;
import java.util.List;
public class MySql {
private String user;
private String password;
private String db;
private String host;
private Connection connection;
public MySql(String user, String password, String db, String host) {
this.user = user;
this.password = password;
this.db = db;
this.host = host;
}
public void connect() {
String url = "jdbc:mysql://" + host + ":3306/" + db + "?autoReconnect=true&useSSL=false";
try {
Class.forName("com.mysql.cj.jdbc.Driver");
connection = DriverManager.getConnection(url, user, password);
} catch (SQLException e) {
throw new SQLNoConectionException("Cant connect to the database", e);
} catch (ClassNotFoundException e) {
throw new SQLNoConectionException("Cant connect to the database: Driver class not found!", e);
}
}
public void reset() {
try {
PreparedStatement stmt = connection.prepareStatement("TRUNCATE task");
stmt.executeUpdate();
} catch (SQLException e) {
throw new SQLStatmentException("Cant insert data in database");
}
}
public int createTask(String name, String description) {
try {
PreparedStatement stmt = connection.prepareStatement("INSERT INTO task ( taskName, taskDescription) VALUES ( ? , ? )", Statement.RETURN_GENERATED_KEYS);
stmt.setString(1, name);
stmt.setString(2, description);
stmt.executeUpdate();
ResultSet rs = stmt.getGeneratedKeys();
if(rs.next()) {
return rs.getInt(1);
}else{
throw new SQLStatmentException("Can insert data but not select");
}
} catch (SQLException e) {
throw new SQLStatmentException("Cant insert data in database");
}
}
// public void deleteTask(int id) {
// try {
// PreparedStatement stmt = connection.prepareStatement("DELETE task WHERE taskID=?");
// stmt.setString(1, ""+id);
// stmt.executeUpdate();
// } catch (SQLException e) {
// throw new SQLStatmentException("Cant delete data in database");
// }
// }
public boolean existTask(String name) {
try {
PreparedStatement stmt = connection.prepareStatement("Select * FROM task WHERE taskName=?");
stmt.setString(1, name);
ResultSet rs = stmt.executeQuery();
return rs.next();
} catch (SQLException e) {
throw new SQLStatmentException("Cant select data from database");
}
}
public boolean existTask(int id) {
try {
PreparedStatement stmt = connection.prepareStatement("Select * FROM task WHERE taskID=?");
stmt.setString(1, ""+id);
ResultSet rs = stmt.executeQuery();
return rs.next();
} catch (SQLException e) {
throw new SQLStatmentException("Cant select data from database");
}
}
public void deleteTask(String name) {
try {
PreparedStatement stmt = connection.prepareStatement("DELETE FROM task WHERE taskName=?");
stmt.setString(1, name);
stmt.executeUpdate();
} catch (SQLException e) {
throw new SQLStatmentException("Cant delete data in database");
}
}
public void updateDescription(int id, String description) {
try {
PreparedStatement stmt = connection.prepareStatement("UPDATE task SET taskDescription=? WHERE taskID=?");
stmt.setString(1, description);
stmt.setString(2, ""+id);
stmt.executeUpdate();
} catch (SQLException e) {
throw new SQLStatmentException("Cant update data in database");
}
}
// public void updateDescription(String name, String description) {
// try {
// PreparedStatement stmt = connection.prepareStatement("UPDATE task SET taskDescription=? WHERE taskName=?");
// stmt.setString(1, description);
// stmt.setString(2, name);
// stmt.executeUpdate();
//
// } catch (SQLException e) {
// throw new SQLStatmentException("Cant update data in database");
// }
// }
public void updateStatus(int id, TaskStatus status) {
try {
PreparedStatement stmt = connection.prepareStatement("UPDATE task SET taskStatus=? WHERE taskID=?");
stmt.setString(1, status.name());
stmt.setString(2, ""+id);
stmt.executeUpdate();
} catch (SQLException e) {
throw new SQLStatmentException("Cant update data in database");
}
}
// public void updateStatus(String name, TaskStatus status) {
// try {
// PreparedStatement stmt = connection.prepareStatement("UPDATE task SET taskStatus=? WHERE taskName=?");
// stmt.setString(1, status.name());
// stmt.setString(2, name);
// stmt.executeUpdate();
//
// } catch (SQLException e) {
// throw new SQLStatmentException("Cant update data in database");
// }
// }
public void updateWorker(int id, String worker) {
try {
PreparedStatement stmt = connection.prepareStatement("UPDATE task SET taskWorker=? WHERE taskID=?");
stmt.setString(1, worker);
stmt.setString(2, ""+id);
stmt.executeUpdate();
} catch (SQLException e) {
throw new SQLStatmentException("Cant update data in database");
}
}
// public void updateWorker(String name, String worker) {
// try {
// PreparedStatement stmt = connection.prepareStatement("UPDATE task SET taskWorker=? WHERE taskName=?");
// stmt.setString(1, worker);
// stmt.setString(2, name);
// stmt.executeUpdate();
//
// } catch (SQLException e) {
// throw new SQLStatmentException("Cant update data in database");
// }
// }
public Task getTask(int id) {
try {
PreparedStatement stmt = connection.prepareStatement("SELECT * FROM task WHERE taskID=?");
stmt.setString(1, ""+id);
ResultSet rs = stmt.executeQuery();
if(rs.next()) {
return getTaskFromDatabase(rs);
} else {
throw new TaskNotExistsException("No Task found in databse with id: " + id);
}
} catch (SQLException e) {
throw new SQLStatmentException("Cant select data from database");
}
}
public Task getTask(String name) {
try {
PreparedStatement stmt = connection.prepareStatement("SELECT * FROM task WHERE taskName=?");
stmt.setString(1, name);
ResultSet rs = stmt.executeQuery();
if(rs.next()) {
return getTaskFromDatabase(rs);
}else{
throw new TaskNotExistsException("No Task found in databse with name: " + name);
}
} catch (SQLException e) {
throw new SQLStatmentException("Cant select data from database");
}
}
public List<Task> getTaskList() {
try {
PreparedStatement stmt = connection.prepareStatement("SELECT * FROM task");
ResultSet rs = stmt.executeQuery();
List<Task> taskList = new ArrayList<>();
while(rs.next()) {
taskList.add(getTaskFromDatabase(rs));
}
return taskList;
} catch (SQLException e) {
throw new SQLStatmentException("Cant select data from database");
}
}
private Task getTaskFromDatabase(ResultSet rs) throws SQLException {
Task task = new Task(rs.getInt("taskID"), rs.getString("taskName"), rs.getString("taskDescription"), rs.getString("taskWorker"),TaskStatus.valueOf(rs.getString("taskStatus")), this);
return task;
}
}

View File

@@ -1,7 +1,11 @@
GROUP,PACKAGE,CLASS,INSTRUCTION_MISSED,INSTRUCTION_COVERED,BRANCH_MISSED,BRANCH_COVERED,LINE_MISSED,LINE_COVERED,COMPLEXITY_MISSED,COMPLEXITY_COVERED,METHOD_MISSED,METHOD_COVERED GROUP,PACKAGE,CLASS,INSTRUCTION_MISSED,INSTRUCTION_COVERED,BRANCH_MISSED,BRANCH_COVERED,LINE_MISSED,LINE_COVERED,COMPLEXITY_MISSED,COMPLEXITY_COVERED,METHOD_MISSED,METHOD_COVERED
GSE2TaskTracker,hhn.temp.project,Task,0,115,0,16,0,36,0,19,0,11 GSE2TaskTracker,hhn.temp.project,Task,0,138,0,16,0,41,0,18,0,10
GSE2TaskTracker,hhn.temp.project,TaskManager,0,191,0,22,0,35,0,23,0,12 GSE2TaskTracker,hhn.temp.project,TaskManager,0,158,0,24,0,39,0,20,0,8
GSE2TaskTracker,hhn.temp.project,Main,0,3,0,0,0,1,0,1,0,1 GSE2TaskTracker,hhn.temp.project,Main,0,3,0,0,0,1,0,1,0,1
GSE2TaskTracker,hhn.temp.project,TaskStatus,0,21,0,0,0,2,0,1,0,1 GSE2TaskTracker,hhn.temp.project,TaskStatus,0,21,0,0,0,2,0,1,0,1
GSE2TaskTracker,hhn.temp.project.provider,MySql,89,266,3,5,27,73,3,15,0,14
GSE2TaskTracker,hhn.temp.project.expections,TaskNotExistsException,4,0,0,0,2,0,1,0,1,0
GSE2TaskTracker,hhn.temp.project.expections,SQLNoConectionException,0,4,0,0,0,2,0,1,0,1
GSE2TaskTracker,hhn.temp.project.expections,SQLStatmentException,4,0,0,0,2,0,1,0,1,0
GSE2TaskTracker,hhn.temp.project.expections,TaskAlreadyExistsException,0,4,0,0,0,2,0,1,0,1 GSE2TaskTracker,hhn.temp.project.expections,TaskAlreadyExistsException,0,4,0,0,0,2,0,1,0,1
GSE2TaskTracker,hhn.temp.project.expections,TaskHasNoWorkerException,0,4,0,0,0,2,0,1,0,1 GSE2TaskTracker,hhn.temp.project.expections,TaskHasNoWorkerException,0,4,0,0,0,2,0,1,0,1
1 GROUP PACKAGE CLASS INSTRUCTION_MISSED INSTRUCTION_COVERED BRANCH_MISSED BRANCH_COVERED LINE_MISSED LINE_COVERED COMPLEXITY_MISSED COMPLEXITY_COVERED METHOD_MISSED METHOD_COVERED
2 GSE2TaskTracker hhn.temp.project Task 0 115 138 0 16 0 36 41 0 19 18 0 11 10
3 GSE2TaskTracker hhn.temp.project TaskManager 0 191 158 0 22 24 0 35 39 0 23 20 0 12 8
4 GSE2TaskTracker hhn.temp.project Main 0 3 0 0 0 1 0 1 0 1
5 GSE2TaskTracker hhn.temp.project TaskStatus 0 21 0 0 0 2 0 1 0 1
6 GSE2TaskTracker hhn.temp.project.provider MySql 89 266 3 5 27 73 3 15 0 14
7 GSE2TaskTracker hhn.temp.project.expections TaskNotExistsException 4 0 0 0 2 0 1 0 1 0
8 GSE2TaskTracker hhn.temp.project.expections SQLNoConectionException 0 4 0 0 0 2 0 1 0 1
9 GSE2TaskTracker hhn.temp.project.expections SQLStatmentException 4 0 0 0 2 0 1 0 1 0
10 GSE2TaskTracker hhn.temp.project.expections TaskAlreadyExistsException 0 4 0 0 0 2 0 1 0 1
11 GSE2TaskTracker hhn.temp.project.expections TaskHasNoWorkerException 0 4 0 0 0 2 0 1 0 1

View File

@@ -3,6 +3,8 @@ import hhn.temp.project.Main;
import hhn.temp.project.Task; import hhn.temp.project.Task;
import hhn.temp.project.TaskManager; import hhn.temp.project.TaskManager;
import hhn.temp.project.TaskStatus; import hhn.temp.project.TaskStatus;
import hhn.temp.project.expections.SQLNoConectionException;
import hhn.temp.project.expections.SQLStatmentException;
import hhn.temp.project.expections.TaskAlreadyExistsException; import hhn.temp.project.expections.TaskAlreadyExistsException;
import hhn.temp.project.expections.TaskHasNoWorkerException; import hhn.temp.project.expections.TaskHasNoWorkerException;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
@@ -16,17 +18,27 @@ import static org.junit.jupiter.api.Assertions.*;
public class BadCaseTaskTest { public class BadCaseTaskTest {
private TaskManager taskManager; private TaskManager taskManager;
private String user = "hhn";
private String password = "!9oSmhsiwYO.m)_x";
private String db = "hhn";
private String host = "0.0.0.0";
@BeforeEach @BeforeEach
public void setup() { public void setup() {
Main main = new Main(); Main main = new Main();
taskManager = new TaskManager();
} }
@Test
@DisplayName("Create a new TaskManager and test Connecton")
public void assertCreateNewTaskManager() {
assertThrows(SQLNoConectionException.class,() -> taskManager = new TaskManager("deep", "deep", db, host));
}
@Test @Test
@DisplayName("Assert an IllegalArgumentException when you create a new Task with no or wrong Name, Description") @DisplayName("Assert an IllegalArgumentException when you create a new Task with no or wrong Name, Description")
public void assertExceptionOnCreateNewTask() { public void assertExceptionOnCreateNewTask() {
taskManager = new TaskManager(user, password, db, host);
assertThrows(IllegalArgumentException.class,() -> taskManager.createTask("", null)); assertThrows(IllegalArgumentException.class,() -> taskManager.createTask("", null));
assertThrows(IllegalArgumentException.class,() -> taskManager.createTask(null, "")); assertThrows(IllegalArgumentException.class,() -> taskManager.createTask(null, ""));
assertThrows(IllegalArgumentException.class,() -> taskManager.createTask(null, null)); assertThrows(IllegalArgumentException.class,() -> taskManager.createTask(null, null));
@@ -34,21 +46,27 @@ public class BadCaseTaskTest {
assertThrows(IllegalArgumentException.class,() -> taskManager.createTask("", "test")); assertThrows(IllegalArgumentException.class,() -> taskManager.createTask("", "test"));
assertThrows(IllegalArgumentException.class,() -> taskManager.createTask("ä#eadsew2", "test")); assertThrows(IllegalArgumentException.class,() -> taskManager.createTask("ä#eadsew2", "test"));
assertDoesNotThrow(() -> taskManager.resetTest());
} }
@Test @Test
@DisplayName("Assert an IllegalArgumentException when you create a new Task with the same Name of a exits Task") @DisplayName("Assert an IllegalArgumentException when you create a new Task with the same Name of a exits Task")
public void assertExceptionOnCreateNewTaskWithExitsName() { public void assertExceptionOnCreateNewTaskWithExitsName() {
taskManager = new TaskManager(user, password, db, host);
String name = "Name"; String name = "Name";
String description = "Description"; String description = "Description";
assertDoesNotThrow(() -> taskManager.createTask(name, description)); assertDoesNotThrow(() -> taskManager.createTask(name, description));
assertThrows(TaskAlreadyExistsException.class, () -> taskManager.createTask(name, description)); assertThrows(TaskAlreadyExistsException.class, () -> taskManager.createTask(name, description));
assertDoesNotThrow(() -> taskManager.resetTest());
} }
@Test @Test
@DisplayName("Assert an IllegalArgumentException when you edit a exits Task") @DisplayName("Assert an IllegalArgumentException when you edit a exits Task")
public void assertExceptionOnEditATask() { public void assertExceptionOnEditATask() {
taskManager = new TaskManager(user, password, db, host);
String name = "Name"; String name = "Name";
String description = "Description"; String description = "Description";
Task task = taskManager.createTask(name, description); Task task = taskManager.createTask(name, description);
@@ -56,12 +74,15 @@ public class BadCaseTaskTest {
assertThrows(IllegalArgumentException.class, () -> task.setDescription(null)); assertThrows(IllegalArgumentException.class, () -> task.setDescription(null));
assertThrows(IllegalArgumentException.class, () -> task.setStatus(null)); assertThrows(IllegalArgumentException.class, () -> task.setStatus(null));
assertDoesNotThrow(() -> taskManager.resetTest());
} }
@Test @Test
@DisplayName("Assert an IllegalArgumentException when calling a non-Existing Task") @DisplayName("Assert an IllegalArgumentException when calling a non-Existing Task")
public void assertExceptionOnCallingANonextistingTask (){ public void assertExceptionOnCallingANonextistingTask (){
taskManager = new TaskManager(user, password, db, host);
String wrongName = "Manager"; String wrongName = "Manager";
String name = "Name"; String name = "Name";
String description = "Description"; String description = "Description";
@@ -70,11 +91,14 @@ public class BadCaseTaskTest {
assertThrows(IllegalArgumentException.class, () -> taskManager.getTask(wrongName)); assertThrows(IllegalArgumentException.class, () -> taskManager.getTask(wrongName));
assertThrows(IllegalArgumentException.class, () -> taskManager.getTask(23)); assertThrows(IllegalArgumentException.class, () -> taskManager.getTask(23));
assertDoesNotThrow(() -> taskManager.resetTest());
} }
@Test @Test
@DisplayName("Assert an IllegalArgumentException when delete a existing Task with wrong arguments") @DisplayName("Assert an IllegalArgumentException when delete a existing Task with wrong arguments")
public void assertExceptionOnDeletingTask (){ public void assertExceptionOnDeletingTask (){
taskManager = new TaskManager(user, password, db, host);
String wrongName = "Manager"; String wrongName = "Manager";
String name = "Name"; String name = "Name";
String description = "Description"; String description = "Description";
@@ -84,11 +108,14 @@ public class BadCaseTaskTest {
assertThrows(IllegalArgumentException.class, () -> taskManager.deleteTask("")); assertThrows(IllegalArgumentException.class, () -> taskManager.deleteTask(""));
assertThrows(IllegalArgumentException.class, () -> taskManager.deleteTask(wrongName)); assertThrows(IllegalArgumentException.class, () -> taskManager.deleteTask(wrongName));
assertDoesNotThrow(() -> taskManager.resetTest());
} }
@Test @Test
@DisplayName("Get a Exeption by setWorker and getWorker") @DisplayName("Get a Exeption by setWorker and getWorker")
public void assertExeptionBySetAndGetAuthorOfATask() { public void assertExeptionBySetAndGetAuthorOfATask() {
taskManager = new TaskManager(user, password, db, host);
String name = "Name"; String name = "Name";
String description = "Description"; String description = "Description";
String workerName = "worker"; String workerName = "worker";
@@ -99,6 +126,8 @@ public class BadCaseTaskTest {
assertThrows(IllegalArgumentException.class, () -> task.setWorker("")); assertThrows(IllegalArgumentException.class, () -> task.setWorker(""));
assertThrows(IllegalArgumentException.class, () -> task.setWorker("ewrgi43rfoiw2öa#-")); assertThrows(IllegalArgumentException.class, () -> task.setWorker("ewrgi43rfoiw2öa#-"));
assertDoesNotThrow(() -> taskManager.resetTest());
} }
} }

View File

@@ -14,17 +14,38 @@ import static org.junit.jupiter.api.Assertions.*;
public class GoodCaseTaskTest { public class GoodCaseTaskTest {
private TaskManager taskManager; private TaskManager taskManager;
private String user = "hhn";
private String password = "!9oSmhsiwYO.m)_x";
private String db = "hhn";
private String host = "0.0.0.0";
@BeforeEach @BeforeEach
public void setup() { public void setup() {
Main main = new Main(); Main main = new Main();
taskManager = new TaskManager();
}
@Test
@DisplayName("Create a new TaskManager and test Connecton")
public void assertCreateNewTaskManager() {
assertDoesNotThrow(() -> taskManager = new TaskManager(user, password, db, host));
assertDoesNotThrow(() -> taskManager.resetTest());
String name = "Name";
String description = "Description";
assertDoesNotThrow(() -> taskManager.createTask(name, description));
assertDoesNotThrow(() -> taskManager.resetTest());
} }
@Test @Test
@DisplayName("Create a new Task") @DisplayName("Create a new Task")
public void assertCreateNewTask() { public void assertCreateNewTask() {
taskManager = new TaskManager(user, password, db, host);
assertDoesNotThrow(() -> taskManager.resetTest());
String name = "Name"; String name = "Name";
String description = "Description"; String description = "Description";
Task task = taskManager.createTask(name, description); Task task = taskManager.createTask(name, description);
@@ -33,10 +54,14 @@ public class GoodCaseTaskTest {
assertEquals(description, task.getDescription()); assertEquals(description, task.getDescription());
assertEquals(TaskStatus.OPEN, task.getStatus()); assertEquals(TaskStatus.OPEN, task.getStatus());
assertDoesNotThrow(() -> taskManager.resetTest());
} }
@Test @Test
@DisplayName("Delete Task") @DisplayName("Delete Task")
public void assertDeleteTask(){ public void assertDeleteTask(){
taskManager = new TaskManager(user, password, db, host);
assertDoesNotThrow(() -> taskManager.resetTest());
String name = "Name"; String name = "Name";
String description = "Description"; String description = "Description";
String deletingTask = "Name"; String deletingTask = "Name";
@@ -45,29 +70,55 @@ public class GoodCaseTaskTest {
List<Task> tasklist = taskManager.getTaskList(); List<Task> tasklist = taskManager.getTaskList();
assertNotNull(tasklist); assertNotNull(tasklist);
assertTrue(tasklist.stream().anyMatch( t -> t.getName().equals(deletingTask))); assertTrue(tasklist.stream().anyMatch( t -> t.getName().equals(deletingTask)));
assertEquals(task, taskManager.getTask(name)); Task dbTask = taskManager.getTask(name);
assertNotNull(dbTask);
assertEquals(task.getName(), dbTask.getName());
assertEquals(task.getTaskID(), dbTask.getTaskID());
assertEquals(task.getStatus(), dbTask.getStatus());
taskManager.deleteTask(deletingTask); taskManager.deleteTask(deletingTask);
assertDoesNotThrow(() -> taskManager.resetTest());
} }
@Test @Test
@DisplayName("Check TaskList if Task there") @DisplayName("Check TaskList if Task there")
public void assertCheckTaskListForTask() { public void assertCheckTaskListForTask() {
taskManager = new TaskManager(user, password, db, host);
assertDoesNotThrow(() -> taskManager.resetTest());
String name = "Name"; String name = "Name";
String description = "Description"; String description = "Description";
Task task = taskManager.createTask(name, description); Task task = taskManager.createTask(name, description);
List<Task> taskList = taskManager.getTaskList(); List<Task> taskList = taskManager.getTaskList();
assertNotNull(taskList); assertNotNull(taskList);
assertTrue(taskList.stream().anyMatch(t -> t.equals(task))); assertTrue(taskList.stream().anyMatch(t -> t.getName().equals(task.getName())));
assertEquals(task, taskManager.getTask(name)); Task dbTask = taskManager.getTask(name);
assertEquals(task, taskManager.getTask(task.getTaskID()));
assertNotNull(dbTask);
assertEquals(task.getName(), dbTask.getName());
assertEquals(task.getTaskID(), dbTask.getTaskID());
assertEquals(task.getStatus(), dbTask.getStatus());
Task dbTaskWithId = taskManager.getTask(task.getTaskID());
assertNotNull(dbTaskWithId);
assertEquals(task.getName(), dbTaskWithId.getName());
assertEquals(task.getTaskID(), dbTaskWithId.getTaskID());
assertEquals(task.getStatus(), dbTaskWithId.getStatus());
assertDoesNotThrow(() -> taskManager.resetTest());
} }
@Test @Test
@DisplayName("Edit Task") @DisplayName("Edit Task")
public void assertEditATask() { public void assertEditATask() {
taskManager = new TaskManager(user, password, db, host);
assertDoesNotThrow(() -> taskManager.resetTest());
String name = "Name"; String name = "Name";
String description = "Description"; String description = "Description";
//String newName = "Name2"; //String newName = "Name2";
@@ -83,12 +134,16 @@ public class GoodCaseTaskTest {
task.setStatus(TaskStatus.INPROCESS); task.setStatus(TaskStatus.INPROCESS);
assertEquals(TaskStatus.INPROCESS, task.getStatus()); assertEquals(TaskStatus.INPROCESS, task.getStatus());
assertDoesNotThrow(() -> taskManager.resetTest());
} }
@Test @Test
@DisplayName("Set Author of a Task") @DisplayName("Set Author of a Task")
public void assertSetAuthorOfATask() { public void assertSetAuthorOfATask() {
taskManager = new TaskManager(user, password, db, host);
assertDoesNotThrow(() -> taskManager.resetTest());
String name = "Name"; String name = "Name";
String description = "Description"; String description = "Description";
String workerName = "worker"; String workerName = "worker";
@@ -101,8 +156,11 @@ public class GoodCaseTaskTest {
assertEquals(workerName, task.getWorker()); assertEquals(workerName, task.getWorker());
assertEquals(TaskStatus.INPROCESS, task.getStatus()); assertEquals(TaskStatus.INPROCESS, task.getStatus());
assertDoesNotThrow(() -> taskManager.resetTest());
} }
} }