Created
October 11, 2012 21:41
-
-
Save stefanhendriks/3875680 to your computer and use it in GitHub Desktop.
Bowling game kata test - ultimate test for nasty bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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