From 3e3eedc95dcdf1bd787f6c92a4aa23bfe046337d Mon Sep 17 00:00:00 2001 From: binsky Date: Wed, 24 Nov 2021 10:36:06 +0100 Subject: [PATCH] test incomplete frames --- README.md | 1 + src/test/java/BowlingCalculatorTest.java | 11 ++++------- .../test-classes/BowlingCalculatorTest.class | Bin 1637 -> 1758 bytes 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 03440f9..f2dc9f0 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # bowling-kata +try "test driven development" \ No newline at end of file diff --git a/src/test/java/BowlingCalculatorTest.java b/src/test/java/BowlingCalculatorTest.java index edaedda..9453b41 100644 --- a/src/test/java/BowlingCalculatorTest.java +++ b/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 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) + ); } } diff --git a/target/test-classes/BowlingCalculatorTest.class b/target/test-classes/BowlingCalculatorTest.class index 82ff973bfd02beec03d9fdbba9672b444a924058..d29062de621c2f9d9e229d1d3187043c8b2c686a 100644 GIT binary patch delta 534 zcmX|+-A)rx6otQY+G&SU4V2It12PIq2SzBA9{~jw@dtkZdo}Sw4XFlVtuiFunD_|9 z%rkfo@xsOgAHWMA!8>2WxMomuGVAPp)>?bk{#E>Ws_^~y*KfcgkBFdh%t z@jjO!L*ZR}FWUEBK5sQ$&d1NpNcS)!c`g>Y#AtkA7Tf{+B4aWcyB@k+Hk6}wtLg2$ z-fp+vylU<@y%&4(M=q0w(ONJSOb7L#rZbb`Y>IO!Ca>w~W{T-N^c<~v;{)4o=01P2yLNLHtN4(?;E)r}tDDqqbUR~TFh?pZSA+=-T`UNTCjxE0qz_S!N}j<#SzC636ETHx;Q1k5z7IQZHv% z)0@L>@fE4=$a6R19_uRZKfy#iprG#|@0CNUZSq1`agG@XGr41Im?@oWgxQkU2%Sua u3yls{^?#`#p(aH2^#9{J)DAVmr0buoRMzh+)D>unGLOVsHl)~0tF1o`KT2Hy delta 402 zcmYk1%PvDv6o$XO+tYg^N?ekIqUb4Y(Ymy#`>j-(bkrCbh(sb1l^A*kIZt3{rZLb+ zNXH(+%-9={_ZHA9=KE5LvvbaQ#txQ?HlT$~0N zvhP$PJj{rn(Fh5~?6xX|CrJ9SBBYqKt14qFU5wAe+d89WpT6|D zuFjz4C-9&!@CoLm%1Trcjnp%$DTyX8=(M4OIl;)UfO!_Af<+3V%GnP_@z&AC@CtSl zq=!!WNYd}lmBa4fY7h+ovLXh$`=H0H*I1UH8PyTHPBPtkn%qi+HWYc#Ek=(W!s8nUsam90+^p GW|bf1v@kIM