|
@ -21,4 +21,17 @@ public class BowlingCalculatorTest { |
|
|
assertThat("calculated value", calculatedResult, CoreMatchers.equalTo(expectedValue)); |
|
|
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)); |
|
|
|
|
|
} |
|
|
} |
|
|
} |