mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-16 06:51:27 +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() {
|
public void updateQuality() {
|
||||||
item.decrementSellInDate();
|
item.decrementSellInDate();
|
||||||
if (item.beforeSellInDate()) {
|
if (item.beforeSellInDate()) {
|
||||||
item.decrementQuality();
|
item.decrementQualityBy2();
|
||||||
} else {
|
} else {
|
||||||
item.decrementQualityBy4();
|
item.decrementQualityBy4();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,8 +18,8 @@ class ConjuredItemTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Order(1)
|
@Order(1)
|
||||||
void decrementQualityByOneSuccess() {
|
void decrementQualityByTwoSuccess() {
|
||||||
testItem(item, 2, 3, 18);
|
testItem(item, 2, 3, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user