This sample project helps you to get started with a TDD kata.
  • Swift 55.2%
  • JavaScript 14.7%
  • Java 12.1%
  • PHP 10.6%
  • Go 7.4%
Find a file Use this template
2023-11-21 16:11:09 +01:00
kata-go-start first commit 2023-11-21 16:11:09 +01:00
kata-java-start first commit 2023-11-21 16:11:09 +01:00
kata-js-start first commit 2023-11-21 16:11:09 +01:00
kata-php-start first commit 2023-11-21 16:11:09 +01:00
kata-swift-start first commit 2023-11-21 16:11:09 +01:00
.gitignore first commit 2023-11-21 16:11:09 +01:00
README.md first commit 2023-11-21 16:11:09 +01:00
red-green-refactor.jpg first commit 2023-11-21 16:11:09 +01:00

Starter Projects Kata

This sample project helps you to get started with the FizzBuzz TDD kata

FizzBuzz

Problem Description

Write a program that prints the numbers from 1 to 100. But for multiples of three print Fizz instead of the number and for the multiples of five print Buzz. For numbers which are multiples of both three and five print FizzBuzz.

Sample output:

1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
16
17
Fizz
19
Buzz
... etc up to 100

Rules

First Rule

You can not write production code until you have written a failing unit test.

Second Rule

You can not write more of an unit test than is sufficient to fail, and not compiling is a failing.

Third Rule

You can not write more production code than is sufficient to pass the currently failing test.

TDD loop

  • Red : make a failing test case;
  • Green : make the test pass;
  • Refactoring : improve the design of your code
    • Duplication
    • Variables/Methods names not clear
    • Code hard to understand
    • etc.

TDD Loop