|
|
@ -7,12 +7,13 @@ import org.junit.Test; |
|
|
|
|
|
|
|
public class BowlingCalculatorTest { |
|
|
|
|
|
|
|
private final BownlingCalculator bownlingCalculator = new BownlingCalculator(); |
|
|
|
|
|
|
|
@Test |
|
|
|
public void returnsZeroWhenNoPinIsHit() { |
|
|
|
// arrange |
|
|
|
String listOfThrows = "-- -- -- -- -- -- -- -- -- --"; |
|
|
|
int expectedValue = 0; |
|
|
|
BownlingCalculator bownlingCalculator = new BownlingCalculator(); |
|
|
|
|
|
|
|
// act |
|
|
|
int calculatedResult = bownlingCalculator.evaluate(listOfThrows); |
|
|
@ -26,7 +27,6 @@ public class BowlingCalculatorTest { |
|
|
|
// 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); |
|
|
|