Browse Source

test incomplete frames

master
binsky 2 years ago
parent
commit
3e3eedc95d
  1. 1
      README.md
  2. 11
      src/test/java/BowlingCalculatorTest.java
  3. BIN
      target/test-classes/BowlingCalculatorTest.class

1
README.md

@ -1,2 +1,3 @@
# bowling-kata
try "test driven development"

11
src/test/java/BowlingCalculatorTest.java

@ -1,11 +1,5 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.aggregator.AggregateWith;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.CsvFileSource;
import org.junit.jupiter.params.provider.CsvSource;
import org.junit.jupiter.params.provider.MethodSource;
import java.util.stream.Stream;
@ -25,6 +19,9 @@ public class BowlingCalculatorTest {
}
private static Stream<Arguments> playerResults() {
return Stream.of(Arguments.of("worst game", "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0", 0)); // 16x 0
return Stream.of(
Arguments.of("worst game", "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0", 0), // 20x 0
Arguments.of("some incomplete frames", "0,1,2,3,0,0,4,0,0,5,0,0,6,0,0,0,0,0,0,0", 21)
);
}
}

BIN
target/test-classes/BowlingCalculatorTest.class

Loading…
Cancel
Save