From 874ad6981476283faab9edeebb27fbebbfef7f5e Mon Sep 17 00:00:00 2001 From: Thomas Papendieck Date: Wed, 28 Nov 2018 17:49:27 +0100 Subject: [PATCH] next failing test --- .../edu/hsfulda/ciip/tdd/BowlingCalculatorTest.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/TDD-pure-function/src/test/java/de/edu/hsfulda/ciip/tdd/BowlingCalculatorTest.java b/TDD-pure-function/src/test/java/de/edu/hsfulda/ciip/tdd/BowlingCalculatorTest.java index 1fd196a..c41e87b 100644 --- a/TDD-pure-function/src/test/java/de/edu/hsfulda/ciip/tdd/BowlingCalculatorTest.java +++ b/TDD-pure-function/src/test/java/de/edu/hsfulda/ciip/tdd/BowlingCalculatorTest.java @@ -21,4 +21,17 @@ public class BowlingCalculatorTest { assertThat("calculated value", calculatedResult, CoreMatchers.equalTo(expectedValue)); } + @Test + public void createsSumOfAllIncompleteFrames() { + // arrange + String listOfThrows = "11 22 33 44 54 63 72 81 -9 --"; + int expectedValue = 65; + BownlingCalculator bownlingCalculator = new BownlingCalculator(); + + // act + int calculatedResult = bownlingCalculator.evaluate(listOfThrows); + + // assert + assertThat("calculated value", calculatedResult, CoreMatchers.equalTo(expectedValue)); + } }