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()