
This is a Fizz Buzz generator using test driven development.
Problem statement:
The Fizz buzz generator is a simple program, it’s method say generate accepts the numeric input and produces the output string based on the rules and input number.
Rules
The generate method returns the string
FizzBuzzwhen input parameter is divisible by 3 and 5.Fizzwhen input parameter is divisible by 3.Buzzwhen input parameter is divisible by 5.String representation of given numberwhen input parameter neither divisible by 3 or 5.
It is clear that there are four use cases to implement
- FizzBuzz As a fizz buzz generator, I should be able to generate a
string FizzBuzzfor a given input number when the number is divisible by 3 and 5. - Fizz As a fizz buzz generator, I should be able to generate a
string Fizzfor a given input number when the number is divisible by 3. - Buzz As a fizz buzz generator, I should be able to generate a
string Buzzfor a given input number when the number is divisible by 5. - Number (converted to
string ) As a fizz buzz generator, I should be able to generate a string format of input number for a given input number whennumber is neither divisible by 3 or 5.
Visit the github repository fizz-buzz-generator for TDD implementation.
Don’t forget to go through commit by commit to witness the test driven development journey.

Leave a Reply