From e6d56675d32eea40c4a6e44fb3504b6ce6ae186a Mon Sep 17 00:00:00 2001 From: Julian Hinxlage Date: Thu, 16 May 2019 14:56:02 +0200 Subject: [PATCH] ~changed WeekOverview to use Costumer count instead of Artikel count --- .../java/de/hsel/spm/baudas/analysis/WeekOverview.java | 7 +------ .../java/de/hsel/spm/baudas/analysis/WeekOverviewTest.java | 3 +-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main/java/de/hsel/spm/baudas/analysis/WeekOverview.java b/src/main/java/de/hsel/spm/baudas/analysis/WeekOverview.java index 7c54043..58f1443 100644 --- a/src/main/java/de/hsel/spm/baudas/analysis/WeekOverview.java +++ b/src/main/java/de/hsel/spm/baudas/analysis/WeekOverview.java @@ -48,18 +48,13 @@ public class WeekOverview implements Analysis(0.0, 0)); } result.put(day, new AbstractMap.SimpleEntry<>( result.get(day).getKey() + amount, - result.get(day).getValue() + count + result.get(day).getValue() + 1 ) ); } diff --git a/src/test/java/de/hsel/spm/baudas/analysis/WeekOverviewTest.java b/src/test/java/de/hsel/spm/baudas/analysis/WeekOverviewTest.java index 0f6f283..be3ea77 100644 --- a/src/test/java/de/hsel/spm/baudas/analysis/WeekOverviewTest.java +++ b/src/test/java/de/hsel/spm/baudas/analysis/WeekOverviewTest.java @@ -30,8 +30,7 @@ class WeekOverviewTest { AtomicReference>> result = new AtomicReference<>(); - assertTimeout(Duration.ofMillis(1), () -> result.set(overview.getResult())); - + assertTimeout(Duration.ofMillis(2), () -> result.set(overview.getResult())); assertEquals(2477, result.get().get("Montag").getKey()); assertEquals(3359, result.get().get("Dienstag").getKey());