mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 22:41:30 +00:00
Code Refactoring : Extracted logic of sellin days to new method.
This commit is contained in:
parent
0fda48419e
commit
8fb53ac4d3
@ -60,6 +60,7 @@ class GildedRose {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void updateSellInDays(Item item) {
|
private void updateSellInDays(Item item) {
|
||||||
item.sellIn--;
|
item.sellIn--;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import org.junit.jupiter.api.Test;
|
|||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
class GildedRoseTest {
|
class GildedRoseTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testUpdateSellInDaysForAgedBrie() {
|
void testUpdateSellInDaysForAgedBrie() {
|
||||||
Item[] items = new Item[] { new Item("Aged Brie", 1, 1) };
|
Item[] items = new Item[] { new Item("Aged Brie", 1, 1) };
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user