From 069348f865eef5b3005c844946c175d1893a8e00 Mon Sep 17 00:00:00 2001 From: Sander Ploegsma Date: Sun, 22 Oct 2023 19:55:54 +0200 Subject: [PATCH] Sync tests for practice exercise `bowling` --- exercises/practice/bowling/.meta/tests.toml | 16 +++++++++++++--- exercises/practice/bowling/.meta/version | 1 - .../bowling/src/test/java/BowlingGameTest.java | 15 ++++++++++++--- 3 files changed, 25 insertions(+), 7 deletions(-) delete mode 100644 exercises/practice/bowling/.meta/version diff --git a/exercises/practice/bowling/.meta/tests.toml b/exercises/practice/bowling/.meta/tests.toml index 963df175a..19042607d 100644 --- a/exercises/practice/bowling/.meta/tests.toml +++ b/exercises/practice/bowling/.meta/tests.toml @@ -1,6 +1,13 @@ -# This is an auto-generated file. Regular comments will be removed when this -# file is regenerated. Regenerating will not touch any manually added keys, -# so comments can be added in a "comment" key. +# This is an auto-generated file. +# +# Regenerating this file via `configlet sync` will: +# - Recreate every `description` key/value pair +# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications +# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion) +# - Preserve any other key/value pair +# +# As user-added comments (using the # character) will be removed when this file +# is regenerated, comments can be added via a `comment` key. [656ae006-25c2-438c-a549-f338e7ec7441] description = "should be able to score a game with all zeros" @@ -38,6 +45,9 @@ description = "rolling a spare with the two roll bonus does not get a bonus roll [576faac1-7cff-4029-ad72-c16bcada79b5] description = "strikes with the two roll bonus do not get bonus rolls" +[efb426ec-7e15-42e6-9b96-b4fca3ec2359] +description = "last two strikes followed by only last bonus with non strike points" + [72e24404-b6c6-46af-b188-875514c0377b] description = "a strike with the one roll bonus after a spare in the last frame does not get a bonus" diff --git a/exercises/practice/bowling/.meta/version b/exercises/practice/bowling/.meta/version deleted file mode 100644 index 26aaba0e8..000000000 --- a/exercises/practice/bowling/.meta/version +++ /dev/null @@ -1 +0,0 @@ -1.2.0 diff --git a/exercises/practice/bowling/src/test/java/BowlingGameTest.java b/exercises/practice/bowling/src/test/java/BowlingGameTest.java index 59b2852cc..4630eea78 100644 --- a/exercises/practice/bowling/src/test/java/BowlingGameTest.java +++ b/exercises/practice/bowling/src/test/java/BowlingGameTest.java @@ -1,9 +1,9 @@ -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatExceptionOfType; - import org.junit.Ignore; import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; + public class BowlingGameTest { private BowlingGame game = new BowlingGame(); @@ -120,6 +120,15 @@ public void strikesWithTheTwoRollBonusDoNotGetBonusRolls() { assertThat(game.score()).isEqualTo(30); } + @Ignore("Remove to run test") + @Test + public void lastTwoStrikesFollowedByOnlyLastBonusWithNonStrikePoints() { + int[] rolls = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 1}; + + playGame(rolls); + assertThat(game.score()).isEqualTo(31); + } + @Ignore("Remove to run test") @Test public void aStrikeWithTheOneRollBonusAfterASpareInTheLastFrameDoesNotGetABonus() {