|
@ -34,4 +34,16 @@ public class BowlingCalculatorTest { |
|
|
// assert |
|
|
// assert |
|
|
assertThat("calculated value", calculatedResult, CoreMatchers.equalTo(expectedValue)); |
|
|
assertThat("calculated value", calculatedResult, CoreMatchers.equalTo(expectedValue)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
public void throwAfterSpareCountsTwice() { |
|
|
|
|
|
// arrange |
|
|
|
|
|
String listOfThrows = "1/ 11 -- -- -- -- -- -- -- --"; |
|
|
|
|
|
int expectedValue = 13; |
|
|
|
|
|
// act |
|
|
|
|
|
int calculatedResult = bownlingCalculator.evaluate(listOfThrows); |
|
|
|
|
|
|
|
|
|
|
|
// assert |
|
|
|
|
|
assertThat("calculated value", calculatedResult, CoreMatchers.equalTo(expectedValue)); |
|
|
|
|
|
} |
|
|
} |
|
|
} |