March 20, 2007 - How Are Those Acceptance Tests?

With the code for strikes written, it's time to run the acceptance tests to see if they agree that we are done.

There are only a handful of failures and two of them are about spares - which we have not implemented yet.

When I investigate the cause of the first failure I notice that the test for 12 strikes is only rolling 10 strikes:

      public void twelveStrikesScoresThreeHundred() {
        for(int frame = 0; frame < 10; frame++) {

        assertThat(scoreForFrame(10), is("300"));

No harm done though. I fix the test; it passes and I move on.

The other strike-related failure, tenthFrameHasThreeBallsIfStrikeIsScored fails with

      java.lang.AssertionError: thirdBallInFrame is not implemented yet
      at bowling.acceptance.SingleGameScoring.notImplementedYet(
      at bowling.acceptance.SingleGameScoring.thirdBallInFrame(
      at bowling.acceptance.SingleGameScoring.tenthFrameHasThreeBallsIfStrikeIsScored(

and after I hook up thirdBallInFrame, that test passes too.

Cool! On to spares...

Posted by Kevin Lawrence at March 20, 2007 04:50 PM

Trackback Pings

TrackBack URL for this entry:


Post a comment

Remember Me?