projects
/
demos
/
kafka
/
training
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a2e8fc9
)
fix: Fehlerhafte Erwartung korrigiert
author
Kai Moritz
<kai@juplo.de>
Mon, 15 Aug 2022 16:53:10 +0000
(18:53 +0200)
committer
Kai Moritz
<kai@juplo.de>
Mon, 15 Aug 2022 16:53:10 +0000
(18:53 +0200)
src/test/java/de/juplo/kafka/AdderBusinessLogicTest.java
patch
|
blob
|
history
diff --git
a/src/test/java/de/juplo/kafka/AdderBusinessLogicTest.java
b/src/test/java/de/juplo/kafka/AdderBusinessLogicTest.java
index
435f036
..
63447e3
100644
(file)
--- a/
src/test/java/de/juplo/kafka/AdderBusinessLogicTest.java
+++ b/
src/test/java/de/juplo/kafka/AdderBusinessLogicTest.java
@@
-122,13
+122,14
@@
public class AdderBusinessLogicTest
assertThatIllegalArgumentException().isThrownBy(() -> adder.addToSum("foo", value));
}
assertThatIllegalArgumentException().isThrownBy(() -> adder.addToSum("foo", value));
}
- @
Test
+ @
ParameterizedTest(name = "{index}: Adding {0}")
@DisplayName("Can add a positive value to an existing sum")
@DisplayName("Can add a positive value to an existing sum")
- public void testAddSumWithPositiveValuePossibleIfSumExists()
+ @ValueSource(ints = { 1, 3, 6, 66, 7, 9 })
+ public void testAddSumWithPositiveValuePossibleIfSumExists(int value)
{
AdderBusinessLogic adder = new AdderBusinessLogic();
adder.startSum("foo");
{
AdderBusinessLogic adder = new AdderBusinessLogic();
adder.startSum("foo");
- assertThat
IllegalArgumentException().isThrownBy(() -> adder.addToSum("foo", -1
));
+ assertThat
NoException().isThrownBy(() -> adder.addToSum("foo", value
));
}
@ParameterizedTest(name = "{index}: Summing up {0}")
}
@ParameterizedTest(name = "{index}: Summing up {0}")