GildedRose-Refactoring-Kata/Java
Luciano Minuzzi deb9a3a5c9 - Group actual system information in README.md;
- Create tests based on TexttestFixture class;
2020-05-02 22:49:00 +02:00
..
gradle/wrapper add gradle build capabilities 2019-11-18 17:42:08 +01:00
src - Group actual system information in README.md; 2020-05-02 22:49:00 +02:00
.gitignore add gradle build capabilities 2019-11-18 17:42:08 +01:00
build.gradle add gradle build capabilities 2019-11-18 17:42:08 +01:00
gradlew add gradle build capabilities 2019-11-18 17:42:08 +01:00
gradlew.bat add gradle build capabilities 2019-11-18 17:42:08 +01:00
pom.xml migrate to JUnit 5 2019-11-18 17:05:22 +01:00
README.md - Group actual system information in README.md; 2020-05-02 22:49:00 +02:00
settings.gradle add gradle build capabilities 2019-11-18 17:42:08 +01:00

How to Run Tests

  • CLI - gradlew :cleanTest :test --tests "com.gildedrose.GildedRoseTest.foo"
  • Intellij
    • Tasks: :cleanTest :test
    • Arguments: --tests "com.gildedrose.GildedRoseTest.foo"

The System

  • All items have a SellIn value which denotes the number of days we have to sell the item.
  • All items have a Quality value which denotes how valuable the item is.
  • At the end of each day our system lowers both values for every item.
  • Once the sell by date has passed, Quality degrades twice as fast
  • The Quality of an item is never negative
  • "Aged Brie" actually increases in Quality the older it gets
  • The Quality of an item is never more than 50
  • "Sulfuras", being a legendary item, never has to be sold or decreases in Quality
  • "Backstage passes", like aged brie, increases in Quality as its SellIn value approaches;
    • Quality increases by 2 when there are 10 days or less and by 3 when there are 5 days or less but
    • Quality drops to 0 after the concert

New Requirement

  • Conjured" items degrade in Quality twice as fast as normal items

Restrictions

  • Do not alter the Item class or Items property
  • An item can never have its Quality increase above 50, however "Sulfuras" is a legendary item and as such its Quality is 80 and it never alters.

Original Output

OMGHAI!
-------- day 0 --------
name sellIn quality
+5 Dexterity Vest 10 20
Aged Brie 2 0
Elixir of the Mongoose 5 7
Sulfuras, Hand of Ragnaros 0 80
Sulfuras, Hand of Ragnaros -1 80
Backstage passes to a TAFKAL80ETC concert 15 20
Backstage passes to a TAFKAL80ETC concert 10 49
Backstage passes to a TAFKAL80ETC concert 5 49
Conjured Mana Cake 3 6
-------- day 1 --------
name sellIn quality
+5 Dexterity Vest 9 19
Aged Brie 1 1
Elixir of the Mongoose 4 6
Sulfuras, Hand of Ragnaros 0 80
Sulfuras, Hand of Ragnaros -1 80
Backstage passes to a TAFKAL80ETC concert 14 21
Backstage passes to a TAFKAL80ETC concert 9 50
Backstage passes to a TAFKAL80ETC concert 4 50
Conjured Mana Cake 2 5