mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 22:41:30 +00:00
🐛 fix conjured item regression based on use-case
This commit is contained in:
parent
c87de2fe50
commit
39a0e60141
@ -16,7 +16,7 @@ public class ConjuredItem implements ItemType {
|
||||
public void updateQuality() {
|
||||
item.decrementSellInDate();
|
||||
if (item.beforeSellInDate()) {
|
||||
item.decrementQuality();
|
||||
item.decrementQualityBy2();
|
||||
} else {
|
||||
item.decrementQualityBy4();
|
||||
}
|
||||
|
||||
@ -18,8 +18,8 @@ class ConjuredItemTest {
|
||||
|
||||
@Test
|
||||
@Order(1)
|
||||
void decrementQualityByOneSuccess() {
|
||||
testItem(item, 2, 3, 18);
|
||||
void decrementQualityByTwoSuccess() {
|
||||
testItem(item, 2, 3, 16);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Loading…
Reference in New Issue
Block a user