Sample code that illustrates three advanced developer testing techniques as they apply to the Gilded Rose Kata.
The three testing techniques are:
To practice your own refactoring supported by a hash-based characterization test:
git checkout tags/ready_to_refactor -b practice_characterization
To practice your own refactoring supported by an approval test:
git checkout tags/ready_to_add_conjured_item -b practice_approval
If you want to follow along with how I chose to perform the refactoring you can see each stage in a separate branch:
git checkout preparatory_refactoring
git checkout item_adaptor_refactoring
git checkout replace_case_with_polymorphism
Michael Feathers
Working Effectively with Legacy Code
Gerard Mezsaros
xUnit Test Patterns
Nat Pryce
Can Approval Testing and Specification by Example Work Together?
Emily Bache
The Coding Dojo Handbook
Martin Fowler
Workflows of Refactoring