Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Bowling game kata test - ultimate test for nasty bug
@Test
public void nastyBug() {
rollStrike();
game.roll(0);
game.roll(10); // spare
game.roll(0);
game.roll(2);
rollMany(14, 0);
Assert.assertEquals(32, game.score());
}
This will occur when the isStrike and isSpare if conditions are in the wrong order. Correct order is:
isStrike
isSpare
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.