Browse Source

test code refactored

master
Thomas Papendieck 6 years ago
parent
commit
a38e8ee435
  1. 4
      TDD-pure-function/src/test/java/de/edu/hsfulda/ciip/tdd/BowlingCalculatorTest.java

4
TDD-pure-function/src/test/java/de/edu/hsfulda/ciip/tdd/BowlingCalculatorTest.java

@ -7,12 +7,13 @@ import org.junit.Test;
public class BowlingCalculatorTest { public class BowlingCalculatorTest {
private final BownlingCalculator bownlingCalculator = new BownlingCalculator();
@Test @Test
public void returnsZeroWhenNoPinIsHit() { public void returnsZeroWhenNoPinIsHit() {
// arrange // arrange
String listOfThrows = "-- -- -- -- -- -- -- -- -- --"; String listOfThrows = "-- -- -- -- -- -- -- -- -- --";
int expectedValue = 0; int expectedValue = 0;
BownlingCalculator bownlingCalculator = new BownlingCalculator();
// act // act
int calculatedResult = bownlingCalculator.evaluate(listOfThrows); int calculatedResult = bownlingCalculator.evaluate(listOfThrows);
@ -26,7 +27,6 @@ public class BowlingCalculatorTest {
// arrange // arrange
String listOfThrows = "11 22 33 44 54 63 72 81 -9 --"; String listOfThrows = "11 22 33 44 54 63 72 81 -9 --";
int expectedValue = 65; int expectedValue = 65;
BownlingCalculator bownlingCalculator = new BownlingCalculator();
// act // act
int calculatedResult = bownlingCalculator.evaluate(listOfThrows); int calculatedResult = bownlingCalculator.evaluate(listOfThrows);

Loading…
Cancel
Save