mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-16 06:51:27 +00:00
Revert "- Increase project information in README.md"
This reverts commit 6c7e1f4b06.
This commit is contained in:
parent
6c7e1f4b06
commit
58cf291e65
@ -2,28 +2,16 @@ package com.gildedrose;
|
|||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import java.util.stream.IntStream;
|
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
class GildedRoseTest {
|
class GildedRoseTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void dexterityVestShouldDecreaseSellInAndQualityEachUpdate() {
|
void foo() {
|
||||||
String name = "+5 Dexterity Vest";
|
Item[] items = new Item[] { new Item("foo", 0, 0) };
|
||||||
int sellIn = 10;
|
|
||||||
int quality = 20;
|
|
||||||
int days = 2;
|
|
||||||
|
|
||||||
Item[] items = new Item[]{new Item(name, sellIn, quality)};
|
|
||||||
GildedRose app = new GildedRose(items);
|
GildedRose app = new GildedRose(items);
|
||||||
IntStream.rangeClosed(1, days).forEach(index -> {
|
app.updateQuality();
|
||||||
app.updateQuality();
|
assertEquals("fixme", app.items[0].name);
|
||||||
assertEquals(name, app.items[0].name);
|
|
||||||
assertEquals(sellIn - index, app.items[0].sellIn);
|
|
||||||
assertEquals(quality - index, app.items[0].quality);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user