From b6bd8c572ab073b53fd97e6126168b45a56110d4 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 --- .../java/de/juplo/kafka/AdderBusinessLogicTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/java/de/juplo/kafka/AdderBusinessLogicTest.java b/src/test/java/de/juplo/kafka/AdderBusinessLogicTest.java index 0325c63..435f036 100644 --- a/src/test/java/de/juplo/kafka/AdderBusinessLogicTest.java +++ b/src/test/java/de/juplo/kafka/AdderBusinessLogicTest.java @@ -59,6 +59,16 @@ public class AdderBusinessLogicTest assertThatNoException().isThrownBy(() -> adder.endSum("foo")); } + @Test + @DisplayName("An existing sum is removed, if ended") + public void testEndSumRemovesSumIfSumExists() + { + AdderBusinessLogic adder = new AdderBusinessLogic(); + adder.startSum("foo"); + adder.endSum("foo"); + assertThat(adder.getSum("foo")).isEmpty(); + } + @Test @DisplayName("An existing Sum returns a non-null value, if ended") public void testEndSumReturnsNonNullValueIfSumExists() -- 2.20.1