mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 14:31:28 +00:00
672 B
672 B
Gilded Rose Kata - Java
$ mvn clean compile
$ mvn clean verify
How to add a new updater
Within this version of Gilded Rose kata, updateQuality() method is refactored by using template method pattern.
From now on it is easy to add another standard, custom or legendary item to the shop. How to do that;
- Add a new Updater class which extends either
StandardItemUpdater,CustomItemUpdaterorLegendaryItemUpdater - Implement required methods as your requirement.
- Add a new registry to
registeredItemUpdatersviaItemUpdaterFactory.registerCustomUpdater() - You are ready to call
updateQuality()method of aGildedRoseinstance.