Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 1.09 KB

README.md

File metadata and controls

16 lines (12 loc) · 1.09 KB

TDD Kata - FizzBuzz

This code was created during a 30-minute TDD Kata presentation on 2015-01-07 using feedback from the KCPUG audience.

One thing to notice about this kata is that we are using the tests to define what the final form of the class should do. We are thinking about the various rules and promises we are making about the FizzBuzz class as we create more tests and assertions.

More can be done to the tests to make the FizzBuzz class more complete.

Questions to maybe ask that can be proven via tests:

  • What should happen when a zero is analyzed?
  • What should happen when a string like "One" or "Foo" is analyzed?
  • What should happen if I want two other numbers to be Fizz and Buzz?
  • What should happen if those numbers aren't mutually prime?
  • What should happen if I decide to add a rule, like "all 11s are 'Bang'"?
  • Anything else?

Any of these questsions can change the layout and format of the FizzBuzz class. Maybe one question will require a constructor, an error thrown, some basic assumptions thrown into private methods of the class, or the class gets extended by another class.