Inventory system for a store that buys and sells high-quality products. In this system, items decrease in quality (Quality) as their sale date approaches, and this depreciation is updated automatically.
This inventory system was developed by a person who is no longer available to make new implementations.
Below, we will explain how the current system works so you can quickly integrate
- Given an
item
with initial values ofSellIn
andQuality
- When a day passes
- Then the value of
SellIn
decreases by 1 - And the value of
Quality
decreases by 1
- Given an
item
withSellIn
less than 0 - When a day passes
- Then the value of
Quality
decreases by 2
- Given an
item
withQuality
equal to 0 - When a day passes
- Then the value of
Quality
remains 0
- Given an
item
withQuality
equal to 50 - When a day passes
- Then the value of
Quality
remains 50
- Given an
item
named "Aged Brie" - When a day passes
- Then the value of
Quality
increases by 1 - And if
SellIn
is less than 0, the value ofQuality
increases by 2
- Given an
item
named "Sulfuras, Hand of Ragnaros" - When a day passes
- Then the value of
SellIn
andQuality
remain unchanged - And the value of
Quality
is always 80
- Given an
item
named "Backstage passes to a TAFKAL80ETC concert" - When
SellIn
is greater than 10 - Then the value of
Quality
increases by 1 - When
SellIn
is 10 or less - Then the value of
Quality
increases by 2 - When
SellIn
is 5 or less - Then the value of
Quality
increases by 3 - When
SellIn
is less than 0 - Then the value of
Quality
is 0