From 06d7dacb51009e77147cd097adf0ea602bd82dd0 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 13 Aug 2022 17:57:38 +0200 Subject: [PATCH] =?utf8?q?ROT:=20=C3=9Cbersehene=20Erwartung=20an=20SumBus?= =?utf8?q?inesLogic.endSum(String)=20erg=C3=A4nzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/test/java/de/juplo/kafka/SumBusinessLogicTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/java/de/juplo/kafka/SumBusinessLogicTest.java b/src/test/java/de/juplo/kafka/SumBusinessLogicTest.java index 2519083..ca8716e 100644 --- a/src/test/java/de/juplo/kafka/SumBusinessLogicTest.java +++ b/src/test/java/de/juplo/kafka/SumBusinessLogicTest.java @@ -59,6 +59,16 @@ public class SumBusinessLogicTest assertThatNoException().isThrownBy(() -> sumBusinessLogic.endSum("foo")); } + @Test + @DisplayName("An existing sum is removed, if ended") + public void testEndSumRemovesSumIfSumExists() + { + SumBusinessLogic sumBusinessLogic = new SumBusinessLogic(); + sumBusinessLogic.startSum("foo"); + sumBusinessLogic.endSum("foo"); + assertThat(sumBusinessLogic.getSum("foo")).isEmpty(); + } + @Test @DisplayName("An existing Sum returns a non-null value, if ended") public void testEndSumReturnsNonNullValueIfSumExists() -- 2.20.1