Merge branch 'SPM-11' of Studium/Softwareprojektmanagement into master

This commit is contained in:
Johannes Theiner 2019-05-08 16:42:34 +00:00 committed by Gitea
commit cdb743ca0a
30 changed files with 514 additions and 102 deletions

View File

@ -44,7 +44,7 @@
<property name="allowNonPrintableEscapes" value="true"/>
</module>
<module name="LineLength">
<property name="max" value="100"/>
<property name="max" value="200"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
</module>
<module name="AvoidStarImport"/>
@ -55,13 +55,14 @@
<property name="tokens"
value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
</module>
<module name="NeedBraces"/>
<module name="NeedBraces">
<property name="tokens" value="LITERAL_DO"/>
</module>
<module name="LeftCurly"/>
<module name="RightCurly">
<property name="id" value="RightCurlySame"/>
<property name="tokens"
value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE,
LITERAL_DO"/>
value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_DO, LITERAL_IF, LITERAL_ELSE"/>
</module>
<module name="RightCurly">
<property name="id" value="RightCurlyAlone"/>

View File

@ -1,11 +1,13 @@
package de.hsel.spm.baudas.analysis;
/**
* Indexes for all attributes.
*
* @author Johannes Theiner
* @version 0.1
* @since 0.1
**/
public class Attribute {
class Attribute {
static final int SEX = 0;
static final int AGE = 1;

View File

@ -1,5 +1,6 @@
package de.hsel.spm.baudas.analysis;
import org.jetbrains.annotations.NotNull;
import weka.clusterers.SimpleKMeans;
import weka.core.Instances;
import weka.filters.Filter;
@ -31,51 +32,51 @@ public class Cluster implements Analysis<Map<Integer, Map<String, String>>> {
*/
@Override
public Map<Integer, Map<String, String>> getResult() {
if(result == null) {
result = new HashMap<>();
//TODO: anpassen wenn #SPM-17 gemerged ist.
int[] keepIndexes = new int[]{0, 1, 3, 5, 6, 7};
Remove remove = new Remove();
if (result != null) {
return result;
}
result = new HashMap<>();
int[] keepIndexes = new int[]{Attribute.SEX, Attribute.AGE, Attribute.MARITAL_STATUS, Attribute.SHOPPING_DAY, Attribute.SHOPPING_HOUR, Attribute.RESIDENCE};
Remove remove = new Remove();
try {
remove.setAttributeIndicesArray(keepIndexes);
remove.setInvertSelection(true);
remove.setInputFormat(instances);
instances = Filter.useFilter(instances, remove);
} catch (Exception e) {
e.printStackTrace();
}
try {
remove.setAttributeIndicesArray(keepIndexes);
remove.setInvertSelection(true);
remove.setInputFormat(instances);
instances = Filter.useFilter(instances, remove);
} catch (Exception e) {
e.printStackTrace();
}
//creating a single cluster to get average, weka has no way to get that from a bigger one.
SimpleKMeans fullMeans = new SimpleKMeans();
Instances fullCentroids = null;
try {
fullMeans.setNumClusters(1);
fullMeans.setPreserveInstancesOrder(true);
fullMeans.buildClusterer(instances);
fullCentroids = fullMeans.getClusterCentroids();
//creating a single cluster to get average, weka has no way to get that from a bigger one.
SimpleKMeans averageMeans = new SimpleKMeans();
Instances averageCentroids = null;
try {
averageMeans.setNumClusters(1);
averageMeans.setPreserveInstancesOrder(true);
averageMeans.buildClusterer(instances);
averageCentroids = averageMeans.getClusterCentroids();
} catch (Exception ex) {
ex.printStackTrace();
}
assert fullCentroids != null;
} catch (Exception ex) {
ex.printStackTrace();
}
assert averageCentroids != null;
//creating real cluster
SimpleKMeans kMeans = new SimpleKMeans();
try {
kMeans.setNumClusters(5);
kMeans.setPreserveInstancesOrder(true);
kMeans.buildClusterer(instances);
//creating real cluster
SimpleKMeans fullMeans = new SimpleKMeans();
try {
fullMeans.setNumClusters(5);
fullMeans.setPreserveInstancesOrder(true);
fullMeans.buildClusterer(instances);
int count = 0;
count = putIntoMap(fullCentroids, count);
int count = 0;
count = putIntoMap(averageCentroids, count);
Instances centroids = kMeans.getClusterCentroids();
putIntoMap(centroids, count);
Instances centroids = fullMeans.getClusterCentroids();
putIntoMap(centroids, count);
} catch (Exception ex) {
ex.printStackTrace();
}
} catch (Exception ex) {
ex.printStackTrace();
}
return result;
}
@ -84,10 +85,10 @@ public class Cluster implements Analysis<Map<Integer, Map<String, String>>> {
* puts data into map.
*
* @param centroids cluster analysis result
* @param count current insert count
* @param count current insert count
* @return count increment
*/
private int putIntoMap(Instances centroids, int count) {
private int putIntoMap(@NotNull Instances centroids, int count) {
for (int i = 0; i < centroids.numInstances(); i++) {
Map<String, String> map = new HashMap<>();
for (int j = 0; j < centroids.numAttributes(); j++) {

View File

@ -5,6 +5,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* object to better handle day, hour combinations.
*
* @author Johannes Theiner
* @version 0.1
* @since 0.1

View File

@ -31,17 +31,19 @@ public class ShoppingTimes implements Analysis<Map<DayHour, Integer>> {
*/
@Override
public Map<DayHour, Integer> getResult() {
if (result == null) {
result = new HashMap<>();
if (result != null) {
return result;
}
for(Instance instance : instances) {
DayHour dayHour = new DayHour(instance.stringValue(Attribute.SHOPPING_DAY), instance.stringValue(Attribute.SHOPPING_HOUR));
int tmp = 1;
if(result.containsKey(dayHour))
tmp = result.get(dayHour) + 1;
result = new HashMap<>();
result.put(dayHour, tmp);
}
for (Instance instance : instances) {
DayHour dayHour = new DayHour(instance.stringValue(Attribute.SHOPPING_DAY), instance.stringValue(Attribute.SHOPPING_HOUR));
int tmp = 1;
if (result.containsKey(dayHour))
tmp = result.get(dayHour) + 1;
result.put(dayHour, tmp);
}
return result;
}

View File

@ -1,16 +1,18 @@
package de.hsel.spm.baudas.analysis;
import java.io.*;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.HashMap;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import weka.core.Instance;
import weka.core.Instances;
import java.io.File;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* get sum for every article and sort them ascending.
*
* @author Karsten Eden
* @version 0.1
* @since 0.1
@ -22,29 +24,34 @@ public class TopFlopArticle implements Analysis<Map<String, Integer>> {
private Instances instances;
private Map<String, Integer> results;
public TopFlopArticle(File file){
results = new HashMap<>();
public TopFlopArticle(File file) {
instances = load(file);
}
/**
* get sum for every article and sort them asending
* get result of analysis.
*
* @return Map of Name of Products and Sum of Values
*/
public Map<String, Integer> getResult() {
if (results != null) {
return results;
}
results = new HashMap<>();
String name;
Double sum = 0.0;
for(int i=11; i<=25; i++) {
double sum = 0.0;
for (int i = 11; i <= 25; i++) {
for (Instance instance : instances) {
sum += instance.value(i);
}
name = instances.attribute(i).name();
results.put(name, sum.intValue());
results.put(name, (int) sum);
sum = 0.0;
}
//Sort Map in ascending order
Stream<Map.Entry<String, Integer>> sorted = results.entrySet().stream().sorted(Map.Entry.comparingByValue());
results = sorted.collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue(), (e1, e2) -> e2, LinkedHashMap::new));
results = sorted.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e2, LinkedHashMap::new));
return results;
}

View File

@ -9,7 +9,7 @@ import java.util.HashMap;
import java.util.Map;
/**
* Week Overview Analysis.
* Week WeekOverviewDiagram Analysis.
*
* @author Julian Hinxlage
* @version 0.1
@ -21,19 +21,26 @@ public class WeekOverview implements Analysis<Map<String, Map.Entry<Double, Inte
private Map<String, Map.Entry<Double, Integer>> result;
public WeekOverview(File file) {
result = new HashMap<>();
instances = load(file);
}
/**
* get results for analysis.
*
* @return day, amount, count
*/
@Override
public Map<String, Map.Entry<Double, Integer>> getResult() {
if (result != null) {
return result;
}
result = new HashMap<>();
int dayIndex = Attribute.SHOPPING_DAY;
int amountIndex = Attribute.PURCHASE_AMOUNT;
//TODO: replace values when #SPM-17 is merged
int dayIndex = 5;
int amountIndex = 10;
int startArticles = 11;
int endArticles = 26;
int startArticles = Attribute.POWER_TOOLS;
int endArticles = Attribute.GARDENING_TOOLS + 1;
for (int i = 0; i < instances.numInstances(); i++) {
Instance instance = instances.get(i);

View File

@ -56,6 +56,6 @@ public class Upload extends HttpServlet {
Files.copy(inputStream, path, StandardCopyOption.REPLACE_EXISTING);
resp.sendRedirect("index.jsf");
resp.sendRedirect("");
}
}

View File

@ -0,0 +1,89 @@
package de.hsel.spm.baudas.web;
import com.google.gson.Gson;
import de.hsel.spm.baudas.analysis.WeekOverview;
import org.jetbrains.annotations.NotNull;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* changes data from week overview into readable format for chart.js
*
* @author Johannes Theiner
* @version 0.1
* @since 0.1
**/
@WebServlet("/week_overview")
public class WeekOverviewDiagram extends HttpServlet {
/**
* do get.
*
* @param req request
* @param resp response
* @throws IOException writer could not be retrieved
*/
@Override
protected void doGet(@NotNull HttpServletRequest req, @NotNull HttpServletResponse resp) throws IOException {
req.setCharacterEncoding(StandardCharsets.UTF_8.name());
resp.setCharacterEncoding(StandardCharsets.UTF_8.name());
resp.setContentType("application/json");
PrintWriter out = resp.getWriter();
List<String> definedOrder = Arrays.asList("Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag");
Map<String, List<String>> result = new HashMap<>();
Gson gson = new Gson();
SavedFile file = Data.getFiles().peek();
if (file == null) {
result.put("labels", definedOrder);
result.put("count", new ArrayList<>());
result.put("revenue", new ArrayList<>());
out.print(gson.toJson(result));
return;
}
assert file.getUuid() != null;
WeekOverview overview = new WeekOverview(Data.get(file.getUuid()));
List<String> labels = new ArrayList<>();
List<String> count = new ArrayList<>();
List<String> revenue = new ArrayList<>();
for (Map.Entry<String, Map.Entry<Double, Integer>> entry : overview.getResult().entrySet()) {
labels.add(entry.getKey());
count.add(entry.getValue().getKey().toString());
revenue.add(entry.getValue().getValue().toString());
}
Comparator<String> comparator = Comparator.comparingInt(definedOrder::indexOf);
labels.sort(comparator);
for (String label : labels) {
Map.Entry<Double, Integer> entry = overview.getResult().get(label);
count.add(entry.getKey().toString());
revenue.add(entry.getValue().toString());
}
result.put("labels", labels);
result.put("count", count);
result.put("revenue", revenue);
out.print(gson.toJson(result));
}
}

View File

@ -0,0 +1,20 @@
<!--Anfang Skriptbereich-->
<!--Script für Diagramme-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.bundle.min.js" integrity="sha256-xKeoJ50pzbUGkpQxDYHD7o7hxe0LaOGeguUidbq6vis=" crossorigin="anonymous"></script>
<!--Script für Materlialize-->
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<script type="text/javascript" src="js/materialize_components.js"></script>
<script src="js/overview.js"></script>
<script src="js/shoping_times.js"></script>
<script src="js/sold_articles.js"></script>
<script src="js/top_articles.js"></script>
<script src="js/flop_articles.js"></script>
<!--Ende Skriptbereich-->
</body>
</html>

View File

@ -0,0 +1,95 @@
<% response.setCharacterEncoding(StandardCharsets.UTF_8.name()); %>
<% request.setCharacterEncoding(StandardCharsets.UTF_8.name()); %>
<!DOCTYPE html>
<html lang="de">
<head>
<title>BauDas</title>
<!--Import Google Icon Font-->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css" media="screen,projection" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.css" integrity="sha256-aa0xaJgmK/X74WM224KMQeNQC2xYKwlAt08oZqjeF0E=" crossorigin="anonymous" />
<meta charset="UTF-8">
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=utf-8">
<!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body class="blue-grey lighten-5">
<!--Navbar-->
<div class="navbar-fixed">
<nav class="nav-extended blue-grey lighten-3 white-text row">
<a href="#" class="brand-logo hide-on-small-and-down center">BauDas</a>
<!--Navbar Tabs-->
<div class="nav-content col 12 ">
<ul class="tabs tabs-transparent blue-grey lighten-3 white-text">
<li class="tab"><a class="active" href="#analysis"><i class="material-icons left">poll</i>Analyse</a></li>
<li class="tab"><a href="#marketing"><i class="material-icons left">public</i>Marketing</a></li>
</ul>
</div>
<!--Navbar Items-->
<div class="nav-wrapper col 2 right">
<ul class="right hide-on-med-and-down">
<li><a data-target="slide-out" class="sidenav-trigger show-on-large"><i class="material-icons left">menu</i>Men&uuml;</a></li><!--Sidenav-->
<li><a href="login.html"><i class="material-icons left">person_outline</i>Logout</a></li><!--Logout-->
</ul>
<ul class="right">
<li><a href="#" data-target="slide-out" class="sidenav-trigger"><i class="material-icons">menu</i></a></li><!--Sidenav-->
<li><a href="login.html" class="sidenav-trigger"><i class="material-icons">person_outline</i></a></li><!--Logout-->
</ul>
</div>
</nav>
</div>
<br>
<!--Sidenav Content-->
<ul id="slide-out" class="sidenav">
<li><div class="user-view">
<div class="background">
<img style="width: 100%" src="logoOrginal.gif">
</div>
<br>
<br>
</div></li>
<li><div class="divider"></div></li>
<li><div class="input-field container">
<label>Gruppenauswahl</label>
<br>
<select>
<option value="0">alle</option>
<option value="1">Gruppe 1</option>
<option value="2">Gruppe 2</option>
<option value="3">Gruppe 3</option>
</select>
</div></li>
<li><div class="input-field container">
<label>Datensatzauswahl</label>
<br>
<select>
<option value="0">aktuell</option>
<option value="1">Datensatz 1</option>
<option value="2">Datensatz 2</option>
<option value="3">Datensatz 3</option>
<option value="4">Datensatz 4</option>
<option value="5">Datensatz 5</option>
</select>
<br>
</div></li>
<li><div class="divider"></div></li>
<li><form action="upload" method="post" enctype="multipart/form-data">
<br>
<div class="file-field input-field container">
<div class="btn blue-grey lighten-2">
<span>File</span>
<input type="file" name="file">
</div>
<div class="file-path-wrapper">
<input class="file-path validate" type="text" placeholder="Datei hochladen">
</div>
</div>
<button class="btn blue-grey waves-effect waves-light" type="submit" name="action">Hochladen<i class="material-icons right">file_upload</i>
</button>
</form></li>
</ul>

197
src/main/webapp/index.jsp Normal file
View File

@ -0,0 +1,197 @@
<%@ page import="java.nio.charset.StandardCharsets" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@include file="header.jsp"%>
<% response.setCharacterEncoding(StandardCharsets.UTF_8.name()); %>
<% request.setCharacterEncoding(StandardCharsets.UTF_8.name()); %>
<!--Cards-->
<!--Analyse-Cards-->
<div id="analysis" class="row container">
<!--Übersicht-->
<div class="col s12 m12">
<div id="overview" class="card white">
<div class="center">
<span class="card-title center">Übersicht</span>
</div>
<div class="card-action center">
<a href="#">Tagesübersicht</a>
<a href="#">Wochenübersicht</a>
</div>
<div class="card-content">
<div>
<canvas id="overview_chart" width="1000" height="400"></canvas>
</div>
</div>
</div>
</div>
<!--Einkaufszeiten-->
<div class="col s12 m6">
<div id="shoping_times" class="card white">
<div class="card-content">
<div class="center">
<span class="card-title">Einkaufszeiten</span>
</div>
<div class="center">
<div class="input-field col s12">
<select>
<option value="0">Montag</option>
<option value="1">Dienstag</option>
<option value="2">Mittwoch</option>
<option value="3">Donnerstag</option>
<option value="4">Freitag</option>
<option value="5">Samstag</option>
<option value="6">Sonntag</option>
</select>
<label>Wochentag</label>
</div>
</div>
<div>
<canvas id="shoping_times_chart" width="1000" height="400"></canvas>
</div>
</div>
</div>
</div>
<!--Verkaufte Artikel-->
<div class="col s12 m6">
<div id="sold_articles" class="card white">
<div class="card-content">
<div class="center">
<span class="card-title center">Verkaufte Artikel</span>
</div>
<div class="center">
<div class="input-field col s12">
<select>
<option value="0">Artikel 1</option>
<option value="1">Artikel 2</option>
<option value="2">Artikel 3</option>
</select>
<label>Artikel</label>
</div>
</div>
<div>
<canvas id="sold_articles_cake" width="1000" height="400"></canvas>
</div>
</div>
</div>
</div>
<!--Top Artikel-->
<div class="col s12 m6">
<div id="top_articles" class="card white">
<div class="center">
<span class="card-title center">Top Artikel</span>
</div>
<div class="card-action center">
<a href="#">Umsatz</a>
<a href="#">Stückzahl</a>
</div>
<div class="card-content">
<div>
<canvas id="top_articles_chart" width="1000" height="400"></canvas>
</div>
</div>
</div>
</div>
<!--Flop Artikel-->
<div class="col s12 m6">
<div id="flop_articles" class="card white">
<div class="center">
<span class="card-title center">Flop Artikel</span>
</div>
<div class="card-action center">
<a href="#">Umsatz</a>
<a href="#">Stückzahl</a>
</div>
<div class="card-content">
<div>
<canvas id="flop_articles_chart" width="1000" height="400"></canvas>
</div>
</div>
</div>
</div>
<!--Warenkorbanlyse-->
<div id="shopping_card_analysis" class="col s12 m6">
<div class="card white">
<div class="card-content">
<div class="center">
<span class="card-title center">Warenkorbanalyse</span>
</div>
<div>
<p>Coming Soon</p>
</div>
</div>
</div>
</div>
<!--Gruppenübersicht-->
<div class="col s12 m6">
<div id="group_overview" class="card white">
<div class="card-content">
<div class="center">
<span class="card-title center">Gruppenübersicht</span>
</div>
<div>
<p>Coming Soon</p>
</div>
</div>
</div>
</div>
</div>
<!--Marketing-Cards-->
<div id="marketing" class="row container">
<div class="col s12 m6">
<div id="marketing_tip_1" class="card white">
<div class="card-content">
<div class="center">
<span class="card-title center">Marketingmaßnahme 1</span>
</div>
<div>
<p>Coming Soon</p>
</div>
</div>
</div>
</div>
<div class="col s12 m6">
<div id="marketing_tip_2" class="card white">
<div class="card-content">
<div class="center">
<span class="card-title center">Marketingmaßnahme 2</span>
</div>
<div>
<p>Coming Soon</p>
</div>
</div>
</div>
</div>
<div class="col s12 m6">
<div id="marketing_tip_3" class="card white">
<div class="card-content">
<div class="center">
<span class="card-title center">Marketingmaßnahme 3</span>
</div>
<div>
<p>Coming Soon</p>
</div>
</div>
</div>
</div>
<div class="col s12 m6">
<div id="marketing_tip_4" class="card white">
<div class="card-content">
<div class="center">
<span class="card-title center">Marketingmaßnahme 4</span>
</div>
<div>
<p>Coming Soon</p>
</div>
</div>
</div>
</div>
</div>
<%@include file="footer.jsp"%>

View File

@ -1,5 +1,5 @@
$.ajax({
url: 'data/overview.json',
url: 'week_overview',
dataType: 'json'
}).done(function (results) {
new Chart(document.getElementById("overview_chart"), {
@ -8,16 +8,16 @@ $.ajax({
labels: results.labels,
datasets: [{
label: "Warenanzahl",
data: results.data1,
data: results.count,
fill: true,
backgroundColor: 'rgba(113, 114, 231, 0.7)',
lineTension: 0,
lineTension: 0
}, {
label: "Einnahmen in €",
data: results.data2,
data: results.revenue,
fill: true,
backgroundColor: 'rgba(104, 216, 154, 0.8)',
lineTension: 0,
lineTension: 0
}]
},
options: {
@ -31,7 +31,7 @@ $.ajax({
},
tooltips: {
mode: 'index',
intersect: false,
intersect: false
},
hover: {
mode: 'nearest',
@ -50,7 +50,7 @@ $.ajax({
}
}],
yAxes: [{
display: true,
display: true
}]
}
}

View File

@ -3,7 +3,7 @@ $.ajax({
dataType: 'json'
}).done(function (results) {
new Chart(document.getElementById("top_articles_chart"), {
type: 'phorizontalBarie',
type: 'horizontalBar',
data: {
labels: results.labels,
datasets: [{

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -44,7 +44,7 @@
<ul id="slide-out" class="sidenav">
<li><div class="user-view">
<div class="background">
<img style="width: 100%" src="logoOrginal.gif">
<img style="width: 100%" src="../logoOrginal.gif">
</div>
<br>
<br>

View File

@ -18,7 +18,7 @@
<div class="card white col s6 push-s3">
<div class="card-content">
<div class="center">
<img style="width: 50%" src="logoOrginal.gif">
<img style="width: 50%" src="../logoOrginal.gif">
</div>
<div class="divider"></div>
<div class="row">

View File

@ -21,7 +21,7 @@
</div>
<div class="card-content">
<div>
<img style="width: 100%" src="logoOrginal.gif">
<img style="width: 100%" src="../logoOrginal.gif">
</div>
<div class="divider"></div>
<div class="row">

View File

@ -1,11 +0,0 @@
<!doctype html>
<html>
<body>
<form action="upload" method="post" enctype="multipart/form-data">
<input type="file" name="file">
<button type="submit">
Hochladen
</button>
</form>
</body>
</html>

View File

@ -29,7 +29,7 @@ class ClusterTest {
AtomicReference<Map<Integer, Map<String, String>>> results = new AtomicReference<>();
assertTimeout(Duration.ofMillis(2000), () -> results.set(cluster.getResult()));
assertTimeout(Duration.ofMillis(10000), () -> results.set(cluster.getResult()));
assertEquals("m", results.get().get(0).get("Geschlecht"));
}

View File

@ -13,7 +13,7 @@ import static org.junit.jupiter.api.Assertions.assertTimeout;
/**
* Week Overview Analysis Test.
* Week WeekOverviewDiagram Analysis Test.
*
* @author Johannes Theiner
* @version 0.1
@ -84,7 +84,7 @@ class WeekOverviewTest {
AtomicReference<Map<String, Map.Entry<Double, Integer>>> result = new AtomicReference<>();
assertTimeout(Duration.ofMillis(15), () -> result.set(overview.getResult()));
assertTimeout(Duration.ofMillis(30), () -> result.set(overview.getResult()));
assertEquals(295688, result.get().get("Montag").getKey());