CODEX
Roman numerals as an example of TDD refactoring in Java
The test-driven development (TDD) cycle consists of fail (red), pass (green) and refactor (blue). However, refactoring tends to get short shrift in most tutorials, it’s barely mentioned.
Or, when it’s mentioned, it feels unrealistic, especially if the intended program is of little practical value. Roman numeral arithmetic doesn’t have…