7

Bowling Game

Now let’s look at another traditional TDD exercise: the Bowling Game kata. What follows is a much-abbreviated version of that kata that appeared in Clean Craftsmanship.1 A related video, Bowling Game, is also available. You can access the video by registering at https://informit.com/functionaldesign.

1. Robert C. Martin, Clean Craftsmanship (Addison-Wesley, 2021).

Java Version

We begin, as always, with a test that does nothing, just to prove we can compile and execute:

public class BowlingTest {
  @Test
  public void nothing() throws Exception {
  }
}

Next, we assert that we can create an instance of ...

Get Functional Design: Principles, Patterns, and Practices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.