Go to file
Daniel Koch 1306ab2005 workshop results 2019-09-20 11:24:26 +02:00
src workshop results 2019-09-20 11:24:26 +02:00
tests workshop results 2019-09-20 11:24:26 +02:00
.gitignore workshop results 2019-09-20 11:24:26 +02:00
Makefile workshop results 2019-09-20 11:24:26 +02:00
README.md workshop results 2019-09-20 11:24:26 +02:00
composer.json workshop results 2019-09-20 11:24:26 +02:00
phpunit.xml workshop results 2019-09-20 11:24:26 +02:00
psalm.xml workshop results 2019-09-20 11:24:26 +02:00

README.md

TDD Workshop exercise

Task

Write a generator for Roman Numbers (https://en.wikipedia.org/wiki/Roman_numerals).

Rules & expectations

Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
  • Assume that integers between 1 and 3000 are being passed.
  • Develop in a test-driven manner, writing a minimal failing test, then just as much code as you need to make the test pass.
  • Only refactor on green.
  • Do NOT try to think about the structure up front. The design will emerge through refactoring.
  • You should probably start with the following test: 1 -> I

Remember:

The goal is not to get as far as possible, but to practice the TDD process. Do not rush to get as much as possible completed, but put a strong focus on the red/green/refactor cycle.

If you get bored:

Try parsing Roman Numbers as well.