Skip to content

Commit 64b400c

Browse files
Sync tests for practice exercise bowling (#2530)
1 parent 477240a commit 64b400c

File tree

3 files changed

+25
-7
lines changed

3 files changed

+25
-7
lines changed

exercises/practice/bowling/.meta/tests.toml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
# This is an auto-generated file. Regular comments will be removed when this
2-
# file is regenerated. Regenerating will not touch any manually added keys,
3-
# so comments can be added in a "comment" key.
1+
# This is an auto-generated file.
2+
#
3+
# Regenerating this file via `configlet sync` will:
4+
# - Recreate every `description` key/value pair
5+
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
6+
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
7+
# - Preserve any other key/value pair
8+
#
9+
# As user-added comments (using the # character) will be removed when this file
10+
# is regenerated, comments can be added via a `comment` key.
411

512
[656ae006-25c2-438c-a549-f338e7ec7441]
613
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
3845
[576faac1-7cff-4029-ad72-c16bcada79b5]
3946
description = "strikes with the two roll bonus do not get bonus rolls"
4047

48+
[efb426ec-7e15-42e6-9b96-b4fca3ec2359]
49+
description = "last two strikes followed by only last bonus with non strike points"
50+
4151
[72e24404-b6c6-46af-b188-875514c0377b]
4252
description = "a strike with the one roll bonus after a spare in the last frame does not get a bonus"
4353

exercises/practice/bowling/.meta/version

Lines changed: 0 additions & 1 deletion
This file was deleted.

exercises/practice/bowling/src/test/java/BowlingGameTest.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import static org.assertj.core.api.Assertions.assertThat;
2-
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
3-
41
import org.junit.Ignore;
52
import org.junit.Test;
63

4+
import static org.assertj.core.api.Assertions.assertThat;
5+
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
6+
77
public class BowlingGameTest {
88
private BowlingGame game = new BowlingGame();
99

@@ -120,6 +120,15 @@ public void strikesWithTheTwoRollBonusDoNotGetBonusRolls() {
120120
assertThat(game.score()).isEqualTo(30);
121121
}
122122

123+
@Ignore("Remove to run test")
124+
@Test
125+
public void lastTwoStrikesFollowedByOnlyLastBonusWithNonStrikePoints() {
126+
int[] rolls = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 1};
127+
128+
playGame(rolls);
129+
assertThat(game.score()).isEqualTo(31);
130+
}
131+
123132
@Ignore("Remove to run test")
124133
@Test
125134
public void aStrikeWithTheOneRollBonusAfterASpareInTheLastFrameDoesNotGetABonus() {

0 commit comments

Comments
 (0)