projects
/
demos
/
kafka
/
training
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix: Fehlerhafte Erwartung korrigiert
[demos/kafka/training]
/
src
/
test
/
java
/
de
/
juplo
/
kafka
/
AdderBusinessLogicTest.java
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}")